omni.usd.find_spec_on_session_or_its_sublayers(stage: Stage, path: Path, predicate: Optional[Callable[[Spec], bool]] = None)

Finds spec in the session layer or its sublayers.

  • stage (Usd.Stage) – Stage instance.

  • path (Sdf.Path) – Spec path to find.

  • predicate (Callable[[Sdf.Spec], bool]) – If it’s provided, the spec to find must pass the predicate.


Layer that the spec resides in, and the spec handle. Or (None, None) if it cannot be found.

Return type

(Sdf.Layer, Sdf.Spec)