CreatePrimCommand

class omni.usd.commands.CreatePrimCommand(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: CreatePrimWithDefaultXformCommand

Create primitive undoable Command. It is same as `CreatePrimWithDefaultXformCommand`. Kept for backward compatibility.

Parameters
  • prim_type (str) – Primitive type, e.g. “Sphere”, “Cube” etc.

  • prim_path (str) – Path of the primitive to be created at. If None is provided, it will be placed at stage root or under default prim using Type name.

  • select_new_prim (bool) – Whether to select the prim after it’s created.

  • attributes (Dict[str, object]) – optional attributes dict to set after creation.

Methods

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

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