MovePrimsCommand

class omni.usd.commands.MovePrimsCommand(paths_to_move: Dict[str, str], time_code: TimeCode = Usd.TimeCode.Default(), keep_world_transform: bool = True, on_move_fn: Optional[Callable] = None, destructive=True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)

Bases: Command

Move primitives undoable Command.

Parameters
  • Dict[str (paths_to_move) – dictionary contaning entry of path_from : path_to.

  • str] – dictionary contaning entry of path_from : path_to.

  • time_code (Usd.TimeCode) – Current timecode of the stage.

  • keep_world_transform (bool) – True to keep world transform after prim path is moved. False to keep local transfrom only.

  • destructive (bool) – If it’s false, it will not remove original prim but deactivate it. By default, it’s true for back compatibility.

  • stage_or_context – (Union[str, Usd.Stage, omni.usd.UsdContext]): Stage or UsdContext applies the changes to. It can be instance of Usd.Stage or omni.usd.UsdContext, or context name. By default, it will apply the changes to the stage in default UsdContext.

Methods

__init__(paths_to_move[, time_code, ...])

do()

undo()

__init__(paths_to_move: Dict[str, str], time_code: TimeCode = Usd.TimeCode.Default(), keep_world_transform: bool = True, on_move_fn: Optional[Callable] = None, destructive=True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)