LayerEventPayload
- class omni.kit.usd.layers.LayerEventPayload(event: IEvent)
Bases:
object
LayerEventPayload is a wrapper to carb.events.IEvent sent from module omni.kit.usd.layers. Through which, you can query event payload easier with properties.
Methods
__init__
(event)is_layer_influenced
(layer_identifier_or_handle)Checks if specific layer is influenced by the event.
Attributes
Layer event type, it's None when the event type is unknown.
The influenced layers or prim specs if any.
This property is non-empty when any layers are influenced.
It is non-empty if event type is INFO_CHANGED, of which key is the layer identifier that its metadata has changed, and value is the set of strings that represent the metadata tokens that's modified.
The influenced spec paths for each layer.
It's useful if event type is LIVE_SESSION_MERGE_STARTED or LIVE_SESSION_MERGE_ENDED, which means if merge of a Live Session is successful or not.
It's non-empty if event type is LIVE_SESSION_USER_JOINED or LIVE_SESSION_USER_LEFT.
It's non-empty if event type is LIVE_SESSION_USER_JOINED or LIVE_SESSION_USER_LEFT.
- __init__(event: IEvent) None
- is_layer_influenced(layer_identifier_or_handle: Union[str, Layer]) bool
Checks if specific layer is influenced by the event.
- property event_type: LayerEventType
Layer event type, it’s None when the event type is unknown.
- property identifiers_or_spec_paths: List[str]
The influenced layers or prim specs if any. When event type is LayerEventType.SPECS_LOCKING_CHANGED, it hosts all influenced prim specs. Otherwise, it hosts all influenced layers for the event.
- property layer_identifier: str
This property is non-empty when any layers are influenced. If multiple layers are influenced, it’s the first one of identifiers_or_spec_paths to keep compatibility.
- property layer_info_data: Dict[str, List[str]]
It is non-empty if event type is INFO_CHANGED, of which key is the layer identifier that its metadata has changed, and value is the set of strings that represent the metadata tokens that’s modified. Currently, only the following tokens are notified when they are modified:
UsdGeom.Tokens.upAxis
UsdGeom.Tokens.metersPerUnit
Sdf.Layer.StartTimeCodeKey
Sdf.Layer.EndTimeCodeKey
Sdf.Layer.FramesPerSecond
Sdf.Layer.TimeCodesPerSecond
Sdf.Layer.CommentKey
Sdf.Layer.Documentation
“subLayerOffsets_offset” # String as there is no python binding from USD.
“subLayerOffsets_scale”
- property layer_spec_paths: Dict[str, List[str]]
The influenced spec paths for each layer. It’s non-empty if event type is PRIM_SPECS_CHANGED or SPECS_LINKING_CHANGED, of which, the key is the layer identifier, and value is the list of spec paths.
- property success: bool
It’s useful if event type is LIVE_SESSION_MERGE_STARTED or LIVE_SESSION_MERGE_ENDED, which means if merge of a Live Session is successful or not.
- property user_id: str
It’s non-empty if event type is LIVE_SESSION_USER_JOINED or LIVE_SESSION_USER_LEFT.
- property user_name: str
It’s non-empty if event type is LIVE_SESSION_USER_JOINED or LIVE_SESSION_USER_LEFT.