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 a list of primitives to new locations.
This command is a batch version of command
MovePrimCommand
Methods
__init__
(paths_to_move[, time_code, ...])Constructor.
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)
Constructor.
- Parameters
paths_to_move (Dict[str, str]) – The dictionary contains entry of {path_from : path_to}.
time_code (Usd.TimeCode, optional) – Current timecode of the stage. Default is Usd.TimeCode.Default().
keep_world_transform (bool, optional) – True to keep world transform after prim path is moved. False to keep local transfrom only. Default is True.
on_move_fn (Callable, optional) – Function to call when prim is renamed. Default is None.
destructive (bool, optional) – If it’s false, it will not remove original prim but deactivate it. Default is 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.