GroupFabricPrimsCommand

class omni.fabric.commands.scripts.extension.GroupFabricPrimsCommand(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)

Bases: Command, FabricStageHelper

A command to group multiple Fabric prims under a new Xform prim.

This command creates a new ‘group’ Xform prim at the common parent path of the specified prims and moves the prims under this new parent. It is useful for organizing prims in the scene hierarchy. Supports undo and redo operations.

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])

Create a command to group multiple Fabric prims under a new Xform prim.

do()

Groups a set of prims under a new Xform prim.

undo()

Undoes the grouping operation, effectively ungrouping the prims.

__init__(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)

Create a command to group multiple Fabric prims under a new Xform prim.

do()

Groups a set of prims under a new Xform prim.

Parameters
  • prim_paths (List[Union[str, Sdf.Path]]) – Prim paths that will be grouped.

  • stage (Optional[usdrt.Usd.Stage], optional) – Stage to operate. Defaults to None, which uses the default stage.

  • context_name (Optional[str], optional) – The USD context to operate. Defaults to None, which uses the default context.

undo()

Undoes the grouping operation, effectively ungrouping the prims.