UngroupFabricPrimsCommand
- class omni.fabric.commands.scripts.extension.UngroupFabricPrimsCommand(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)
Bases:
Command
,FabricStageHelper
A command to ungroup Fabric prims from their common parent group.
This command moves the specified prims from under their group parent prim to the parent path of the group prim. It is useful for flattening the scene hierarchy as needed.
- Parameters
prim_paths (List[str]) – Prim paths that will be grouped.
stage (usdrt.Usd.Stage) – Stage to operate. Optional.
context_name (str) – The usd context to operate. Optional.
Methods
__init__
(prim_paths[, stage, context_name])Initializes a command to ungroup Fabric prims from their common parent group
do
()Ungroups the specified Fabric prims from their parent group prim.
undo
()Restores the original group structure by regrouping the previously ungrouped prims.
- __init__(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)
Initializes a command to ungroup Fabric prims from their common parent group
- do()
Ungroups the specified Fabric prims from their parent group prim.
The prims will be moved to the parent path of the group prim.
If there are no prims specified or the group prim is not valid, the command does nothing.
- undo()
Restores the original group structure by regrouping the previously ungrouped prims.
Recreates the group prim that was deleted during the do() action and moves the prims back under it.