PrimCaching#
- class omni.usd.PrimCaching(
 - usd_type: Any,
 - stage: Stage,
 - on_changed: Callable[[], None] | None = None,
 Bases:
objectInternal. Utility class that monitors changes from specific prim type.
Methods
__init__(usd_type, stage[, on_changed])Constructor.
destroy()Gets cache state.
Gets listened stage handle.
set_cache_state(state)Sets cache state.
- __init__(
 - usd_type: Any,
 - stage: Stage,
 - on_changed: Callable[[], None] | None = None,
 Constructor.
- Parameters:
 usd_type (Any) – Usd prim type, like UsdShade.Material, UsdShade.Shader, etc.
stage (Usd.Stage) – The stage to listen.
on_changed (Callable[[], None], optional) – The callback to invoke when interested prims are changed or any prims are removed. Defaults to None.
- get_cache_state() bool#
 Gets cache state.
- Returns:
 True if cached, or False otherwise.
- Return type:
 bool
- get_stage() Stage | None#
 Gets listened stage handle.
- Returns:
 Stage handle or None.
- Return type:
 Optional[Usd.Stage]
- set_cache_state(state: bool)#
 Sets cache state.
- Parameters:
 state (bool) – True for cached, and False for non-cached.