GeometryPropertyExtension#

class omni.kit.property.geometry.GeometryPropertyExtension#

Bases: IExt

A class for extending and modifying geometry properties in the USD stage.

This extension registers widgets and menu entries to manage geometry and visual attributes associated with prims. It integrates with the application window to provide interactive controls for toggling various rendering and property settings such as instanceable state, wireframe display, and shadow properties, among others. The extension also supports the registration of custom visual attributes, allowing dynamic updates to prim properties based on user interaction.

Designed to interface with the Omniverse Kit SDK, the class carefully validates prim selection and type before executing property commands. It leverages the underlying command system to update attribute states and ensures the property widgets are correctly registered and unregistered during the extension lifecycle.

Example usage: .. code-block:: python

extension = GeometryPropertyExtension() extension.on_startup(‘my_extension’)

Methods

__init__()

Initializes a new GeometryPropertyExtension instance.

deregister_custom_visual_attribute(...)

Removes the custom visual attribute from the visual property widget.

on_shutdown()

Handles shutdown operations by unregistering widgets and releasing the extension instance.

on_startup(ext_id)

Handles startup operations including widget registration and menu entry creation.

register_custom_visual_attribute(...[, ...])

Add custom attribute with placeholder.

__init__()#

Initializes a new GeometryPropertyExtension instance.

deregister_custom_visual_attribute(
attribute_name: str,
)#

Removes the custom visual attribute from the visual property widget.

Parameters:

attribute_name (str) – Name of the attribute to remove.

on_shutdown()#

Handles shutdown operations by unregistering widgets and releasing the extension instance.

on_startup(ext_id)#

Handles startup operations including widget registration and menu entry creation.

Parameters:

ext_id (str) – Extension identifier for startup configuration.

register_custom_visual_attribute(
attribute_name: str,
display_name: str,
type_name: str,
default_value: Any,
predicate: Callable[[Any], bool] = None,
)#

Add custom attribute with placeholder.

Parameters:
  • attribute_name (str) – Name of the attribute.

  • display_name (str) – Display name for the attribute.

  • type_name (str) – Type name of the attribute.

  • default_value (Any) – Default value assigned to the attribute.

  • predicate (Callable[[Any], bool]) – Function returning a boolean for attribute condition.