PrimVarCommand#

class omni.kit.property.geometry.PrimVarCommand(
prim_path: List[str],
prim_name: str,
prim_type: str,
value: Any,
usd_context_name: str | None = '',
)#

Bases: Command

Set undoable primvar command.

Parameters:
  • prim_path (list) – List of paths of prims.

  • prim_name (str) – Primvar name.

  • prim_type (str) – Primvar variable type (E.g. Sdf.ValueTypeNames.Bool).

  • value (any) – New primvar value. If primvar does not exist, it will be created.

  • usd_context_name (Optional[str]) – USD context name.

Methods

__init__(prim_path, prim_name, prim_type, value)

Initializes a PrimVarCommand instance for updating primvar values.

do()

Performs the update of primvar values on the specified prim paths and stores the original values for undo.

undo()

Reverts the primvar values to their original state by using the stored undo information.

__init__(
prim_path: List[str],
prim_name: str,
prim_type: str,
value: Any,
usd_context_name: str | None = '',
)#

Initializes a PrimVarCommand instance for updating primvar values. Sets up internal state for execution.

do()#

Performs the update of primvar values on the specified prim paths and stores the original values for undo.

undo()#

Reverts the primvar values to their original state by using the stored undo information.