CreateFabricPrimCommand

class omni.fabric.commands.scripts.extension.CreateFabricPrimCommand(prim_type: str, prim_path: Optional[str] = None, select_new_prim: bool = True, attributes: Dict[str, Any] = {}, create_default_xform=True, stage: Optional[Stage] = None, context_name: Optional[str] = None)

Bases: CreateFabricPrimWithDefaultXformCommand

A command to create a Fabric prim with a default transform.

This command creates a new prim of the specified type, at the given path, and applies a default transform to it. The newly created prim can be automatically selected.

Parameters
  • prim_type – str The type of prim to create (e.g., ‘Sphere’, ‘Cube’).

  • prim_path – Optional[str] The path where the prim will be created. If None, it will be placed at the stage root or under default prim using the type name.

  • select_new_prim – bool Indicates whether to select the prim after creation.

  • attributes – Optional[Dict[str, Any]] Optional dictionary of attributes to set after creation.

  • create_default_xform – bool Determines whether to create default transform attributes for the prim.

  • stage – Optional[usdrt.Usd.Stage] The stage where the prim will be created. If not provided, the default stage is used.

  • context_name – Optional[str] The name of the context to use for the operation. If not provided, the default context is used.

Methods

__init__(prim_type[, prim_path, ...])

Initializes a command to create a Fabric prim with a default transform.

Attributes

__init__(prim_type: str, prim_path: Optional[str] = None, select_new_prim: bool = True, attributes: Dict[str, Any] = {}, create_default_xform=True, stage: Optional[Stage] = None, context_name: Optional[str] = None)

Initializes a command to create a Fabric prim with a default transform.