SkelAnimationAttributesWidget#

class omni.kit.property.skel.SkelAnimationAttributesWidget(title: str)#

Bases: UsdPropertiesWidget

A widget for managing skeletal animation attributes on USD primitives.

This widget extends the base properties widget to provide a specialized user interface for interacting with skeletal animation settings. In particular, it facilitates the handling of the ‘skel:animationSource’ property on skeletal primitives such as Skeleton and Root types. The widget adds a menu entry for animation and skeletal animation operations and processes selection payloads to execute binding commands for the skeletal animation API.

The widget validates the selection of primitives at runtime to ensure that operations are performed on valid skeletal animation objects. It also provides a customized layout for the ‘skel:animationSource’ property, including support for additional configuration such as filtering by target picker type and limiting target selections.

Parameters:

title (str) – The title displayed on the widget header.

Methods

__init__(title)

Initializes the SkelAnimationAttributesWidget instance with the given title.

destroy()

Removes button menu entries and cleans up the widget configuration.

get_additional_kwargs(ui_attr)

Determines additional keyword arguments based on the UI attribute and selection context.

on_click(payload)

Handles a click event by processing the selection payload.

on_new_payload(payload)

Processes a new payload to determine if the animation attributes are applicable.

on_show(objects)

Evaluates if the widget should be displayed based on provided objects.

__init__(title: str)#

Initializes the SkelAnimationAttributesWidget instance with the given title.

destroy()#

Removes button menu entries and cleans up the widget configuration.

get_additional_kwargs(ui_attr)#

Determines additional keyword arguments based on the UI attribute and selection context.

Parameters:

ui_attr (object) – The UI attribute used to determine extra configuration.

Returns:

A tuple with the first element as None and the second as a dictionary of additional keyword arguments.

Return type:

tuple

on_click(
payload: PrimSelectionPayload,
)#

Handles a click event by processing the selection payload.

Parameters:

payload (PrimSelectionPayload) – The selection payload to process.

Returns:

Sdf.Path.emptyPath if payload is None; otherwise, None.

Return type:

object

on_new_payload(payload)#

Processes a new payload to determine if the animation attributes are applicable.

Parameters:

payload (object) – The payload to be examined for animation attributes.

Returns:

True if conditions are met; False otherwise.

Return type:

bool

on_show(objects: dict)#

Evaluates if the widget should be displayed based on provided objects.

Parameters:

objects (dict) – Dictionary containing prim_list and stage keys for evaluation.