CreatePrimCommand#
- class omni.usd.commands.CreatePrimCommand(
- prim_type: str,
- prim_path: str | None = None,
- select_new_prim: bool = True,
- attributes: Dict[str, Any] = {},
- create_default_xform=True,
- stage: Stage | None = None,
- context_name: str | None = None,
Bases:
CreatePrimWithDefaultXformCommand
Create a primitive to stage. It is the same as
CreatePrimWithDefaultXformCommand
and kept for backward compatibility.Methods
__init__
(prim_type[, prim_path, ...])Constructor.
- __init__(
- prim_type: str,
- prim_path: str | None = None,
- select_new_prim: bool = True,
- attributes: Dict[str, Any] = {},
- create_default_xform=True,
- stage: Stage | None = None,
- context_name: str | None = None,
Constructor.
- Parameters:
prim_type (str) – Primitive type supported by USD, e.g. “Xform”, “Camera”, “Sphere”, “Cube” etc.
prim_path (str, optional) – 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. Default is None.
select_new_prim (bool, optional) – Whether to select the prim after it’s created. Default is True.
attributes (Dict[str, object], optional) – Attributes dict to set after creation. Default is {}.
create_default_xform (bool, optional) – Whether to create default xform operators. Default is True.
stage (Usd.Stage, optional) – Stage to operate. Default is None, which means the stage in the default UsdContext is used.
context_name (str, optional) – The usd context to operate. Default is None, which means the default UsdContext is used. Param `stage`, to some extent, is duplicate to this param. They are both kept for back-compatibility.