UsdPropertiesWidget#
- class omni.kit.property.usd.UsdPropertiesWidget(
- title: str,
- collapsed: bool,
- multi_edit: bool = True,
- enable_adapter: bool = False,
- maintain_property_order: bool = False,
- clipboard_id: str = 'usd_general',
- context_menu_title='All Property Values',
Bases:
SimplePropertyWidgetUsdPropertiesWidget provides functionalities to automatically populates UsdProperties on given prim(s). The UI will and models be generated according to UsdProperties’s value type. Multi-prim editing works for shared Properties between all selected prims if instantiated with multi_edit = True.
Methods
__init__(title, collapsed[, multi_edit, ...])Constructor.
add_custom_schema_attribute(attribute_name, ...)Adds a custom schema attribute.
Adds custom attributes (See is_custom_schema_attribute_used).
add_listener_adapters(attr_names)Adds change tracker to attribute name.
See SimplePropertyWidget.build_items
build_nested_group_frames(stage, display_group)Override this function to build group frames differently.
build_property_item(stage, ui_prop, prim_paths)Override this function to customize property building.
clean()See PropertyWidget.clean
get_additional_kwargs(ui_prop)Override this function if you want to supply additional arguments when building the label or ui widget.
get_valid_stage_adapter(prim_path, attr_name)Gets stage adapter for prim.
Checks if the custom schema attribute is used.
on_new_payload(payload)See PropertyWidget.on_new_payload
post_notification(message[, info, duration])Post a notification via omni.kit.notification_manager.
remove_custom_schema_attribute(attribute_name)Removes a custom schema attribute.
Request the widget to rebuild.
reset()See PropertyWidget.reset
Reset model states.
- __init__(
- title: str,
- collapsed: bool,
- multi_edit: bool = True,
- enable_adapter: bool = False,
- maintain_property_order: bool = False,
- clipboard_id: str = 'usd_general',
- context_menu_title='All Property Values',
Constructor.
- Parameters:
title (str) – title of the widget.
collapsed (bool) – whether the collapsable frame should be collapsed for this widget.
multi_edit (bool) – whether multi-editing is supported.
enable_adapter (bool) – use stage_adapters
maintain_property_order (bool) – _customize_props_layout returns a list of properties to display on the widget.
- add_custom_schema_attribute(
- attribute_name,
- classify_fn,
- create_fn,
- display_group,
- value_dict,
Adds a custom schema attribute.
- Parameters:
attribute_name (str) – The name of the attribute.
classify_fn (function) – The function to classify the attribute.
- add_custom_schema_attributes_to_props(
- props,
Adds custom attributes (See is_custom_schema_attribute_used).
- Parameters:
props (list) – list of props.
- add_listener_adapters(attr_names)#
Adds change tracker to attribute name.
- Parameters:
attr_names (list) – list of attributes.
- build_items()#
See SimplePropertyWidget.build_items
- build_nested_group_frames(
- stage,
- display_group: UiDisplayGroup,
Override this function to build group frames differently.
- build_property_item(
- stage,
- ui_prop: UsdPropertyUiEntry,
- prim_paths: List[Path],
Override this function to customize property building.
- clean()#
See PropertyWidget.clean
- get_additional_kwargs(
- ui_prop: UsdPropertyUiEntry,
Override this function if you want to supply additional arguments when building the label or ui widget.
- get_valid_stage_adapter(prim_path, attr_name)#
Gets stage adapter for prim.
- Parameters:
prim_path (str) – prim path.
attr_name (str) – attribute/property name.
- Returns:
Stage adapter for prim/attribute.
- Return type:
StageAdapter
- is_custom_schema_attribute_used(prim) list#
Checks if the custom schema attribute is used.
- Parameters:
prim (Usd.Prim) – The prim to check.
- on_new_payload(payload)#
See PropertyWidget.on_new_payload
- post_notification(
- message: str,
- info: bool = False,
- duration: int = 10,
Post a notification via omni.kit.notification_manager.
- Parameters:
message (str) – The notification text.
info (bool) – notification is NotificationStatus.INFO when True otherwise NotificationStatus.WARNING
duration (int) – The duration (in seconds) after which the notification will be hidden. This duration only works if hide_after_timeout is True.
- remove_custom_schema_attribute(attribute_name)#
Removes a custom schema attribute.
- Parameters:
attribute_name (str) – The name of the attribute.
- request_rebuild()#
Request the widget to rebuild. It will be rebuilt on next frame.
- reset()#
See PropertyWidget.reset
- reset_models()#
Reset model states. Release allocations etc.