ChangePropertyCommand

class omni.usd.commands.ChangePropertyCommand(prop_path: str, value: Any, prev: Any, timecode=Usd.TimeCode.Default(), type_to_create_if_not_exist: Optional[ValueTypeNames] = None, target_layer: Optional[Layer] = None, usd_context_name: Union[str, UsdContext, Stage] = '', is_custom: bool = False, variability: Variability = Sdf.VariabilityVarying)

Bases: Command

Change prim property undoable Command.

Parameters
  • prop_path (str) – Prim property path.

  • value (Any) – Value to change to. If it’s None, current attribute value is cleared.

  • prev (Any) – Value to undo to.

  • timecode (Usd.TimeCode) – The timecode to set property value to.

  • type_to_create_if_not_exist (Sdf.ValueTypeName) – If not None AND property does not already exist, a new property will be created with given type and value.

  • target_layer (sdf.Layer) – Target layer to write value to. Leave to None to use current stage’s EditTarget.

  • usd_context_name (Union[str, Usd.Stage]) – Union that could be: * Name of the usd context to work on. Leave to “” to use default USD context. * Instance of UsdContext. * Or stage instance.

  • is_custom (bool) – If the property is created, specifiy if it is a ‘custom’ property (not part of the Schema).

  • variability (Sdf.Variability) – If the property is created, specify the variability.

Methods

__init__(prop_path, value, prev[, timecode, ...])

do()

undo()

Attributes

overriden_notification

__init__(prop_path: str, value: Any, prev: Any, timecode=Usd.TimeCode.Default(), type_to_create_if_not_exist: Optional[ValueTypeNames] = None, target_layer: Optional[Layer] = None, usd_context_name: Union[str, UsdContext, Stage] = '', is_custom: bool = False, variability: Variability = Sdf.VariabilityVarying)