AttributeContextMenu#
- class omni.kit.property.usd.AttributeContextMenu#
Bases:
objectAttribute context menu.
Methods
__init__()Initialize the attribute context menu.
destroy()Destroy the attribute context menu.
Get the instance of the attribute context menu.
Get list of registered schema handlers.
Get the schema registry instance.
on_mouse_event(event)On mouse event.
register_schema(schema_registration)Register a schema handler.
register_schema_by_name(schema_name[, ...])Register a schema handler.
unregister_schema(schema_registration)Unregister a schema handler.
unregister_schema_by_name(schema_name)Unregister a schema handler.
- __init__()#
Initialize the attribute context menu.
- destroy()#
Destroy the attribute context menu.
- classmethod get_instance()#
Get the instance of the attribute context menu.
- classmethod get_registered_schemas()#
Get list of registered schema handlers.
- Returns:
List of AttributeSchemaRegistration instances
- Return type:
list
- classmethod get_schema_registry()#
Get the schema registry instance.
- Returns:
The registry instance
- Return type:
AttributeMenuSchemaRegistry
- on_mouse_event(
- event: AttributeContextMenuEvent,
On mouse event.
- Parameters:
event (AttributeContextMenuEvent) – The event.
- classmethod register_schema(
- schema_registration: AttributeSchemaRegistration,
Register a schema handler.
- Parameters:
schema_registration (AttributeSchemaRegistration) – Schema registration instance
- classmethod register_schema_by_name(
- schema_name: str,
- can_apply: Callable = None,
- priority: int = 0,
Register a schema handler.
- Parameters:
schema_name (str) – The name of the schema to register
can_apply (Callable) – custom can apply function
priority (int) – Priority for ordering in menus (higher = first, default = 0)
- classmethod unregister_schema(
- schema_registration: AttributeSchemaRegistration,
Unregister a schema handler.
- Parameters:
schema_registration (AttributeSchemaRegistration) – Schema registration instance
- classmethod unregister_schema_by_name(schema_name: str)#
Unregister a schema handler.
- Parameters:
schema_name (str) – The name of the schema to unregister