MoveFabricPrimsCommand
- class omni.fabric.commands.scripts.commands.MoveFabricPrimsCommand(paths_to_move: Dict[str, str], time_code: TimeCode = Usd.TimeCode.Default(), keep_world_transform: bool = True, on_move_fn: Optional[Callable] = None, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
Bases:
Command
A command for moving multiple prims within a Fabric stage.
This command allows multiple prims to be moved to new locations, updating the scene graph accordingly. Supports undo and redo.
- Parameters
paths_to_move – (Dict[str, str]) A dictionary containing path mappings from source to destination.
time_code – (usdrt.Usd.TimeCode, optional) The timecode at which the move operation is performed. Defaults to usdrt.Usd.TimeCode.Default().
keep_world_transform – (bool, optional) If set to True, the world transform of the prims is maintained after moving. Defaults to True.
on_move_fn – (Callable, optional) An optional callback function to be called after the move operation. Defaults to None.
stage_or_context (Union[str, usdrt.Usd.Stage, omni.usd.UsdContext], optional) – The stage or context to which the changes are applied. It can be a stage instance, context instance, or context name. By default, it will apply the changes to the stage in the default context.
Methods
__init__
(paths_to_move[, time_code, ...])Creates a command for moving multiple Fabric prims to new locations.
do
()Executes the move of multiple prims.
undo
()Undoes the move of multiple prims.
- __init__(paths_to_move: Dict[str, str], time_code: TimeCode = Usd.TimeCode.Default(), keep_world_transform: bool = True, on_move_fn: Optional[Callable] = None, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
Creates a command for moving multiple Fabric prims to new locations.
- do()
Executes the move of multiple prims.
- undo()
Undoes the move of multiple prims.