UnparentPrimsCommand
- class omni.usd.commands.UnparentPrimsCommand(paths: List[str], on_move_fn: Optional[callable] = None, keep_world_transform: bool = True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
Bases:
Command
Moves prims into root “/” primitive.
Methods
__init__
(paths[, on_move_fn, ...])- param paths
prim path to become parent of child_paths
do
()undo
()- __init__(paths: List[str], on_move_fn: Optional[callable] = None, keep_world_transform: bool = True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
- Parameters
paths – prim path to become parent of child_paths
on_move_fn (Callable[[Sdf.Path, Sdf.Path], None], optional) – Function to call when prim is re-parented, that the first param is the source path, and second one is the target path. Defaults to None.
keep_world_transform (bool, optional) – If it needs to keep the world transform after parenting. Defaults to True
stage_or_context (Union[str, Usd.Stage, omni.usd.UsdContext], optional) – 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.