TransformPrimCommand

class omni.usd.commands.TransformPrimCommand(path: str, new_transform_matrix: Matrix4d, old_transform_matrix: Optional[Matrix4d] = None, time_code: TimeCode = Usd.TimeCode.Default(), had_transform_at_key: bool = False, usd_context_name: str = '')

Bases: Command

Set primitive’s local transform.

Methods

__init__(path, new_transform_matrix[, ...])

Constructor.

do()

undo()

__init__(path: str, new_transform_matrix: Matrix4d, old_transform_matrix: Optional[Matrix4d] = None, time_code: TimeCode = Usd.TimeCode.Default(), had_transform_at_key: bool = False, usd_context_name: str = '')

Constructor.

Parameters
  • path (str) – Prim path.

  • new_transform_matrix (Gf.Matrix4d) – New local transform matrix.

  • old_transform_matrix (Gf.Matrix4d, optional) – Old local transform matrix that is used for undo. If it’s not given, it’s the current local transform matrix when this command is instantiated. Default is None.

  • time_code (Usd.TimeCode) – The timecode to change. Default is Usd.TimeCode.Default().

  • had_transform_at_key (bool) – If the local transform is set already before this command. This is used for undo to decide if it needs to clear the new value. Default is False.

  • usd_context_name (str) – The UsdContext to operate. Default is empty, which means the default UsdContext is used.