CreatePayloadCommand#

class omni.usd.commands.CreatePayloadCommand(
usd_context: UsdContext,
path_to: Path,
asset_path: str | None = None,
prim_path: Path | None = None,
instanceable: bool = True,
select_prim: bool = True,
)#

Bases: CreatePrimCommandBase

Create a new prim with payload.

Methods

__init__(usd_context, path_to[, asset_path, ...])

Constructor.

do()

undo()

__init__(
usd_context: UsdContext,
path_to: Path,
asset_path: str | None = None,
prim_path: Path | None = None,
instanceable: bool = True,
select_prim: bool = True,
)#

Constructor.

Parameters:
  • usd_context (omni.usd.UsdContext) – UsdContext this command to run on.

  • path_to (Sdf.Path) – Path to create a new prim.

  • asset_path (str, optional) – The asset path to payload. Defaults to None.

  • prim_path (Sdf.Path) – The prim path to payload. Defaults to None.

  • instanceable (bool, optional) – If to set the prim instanceable. It works together with `/persistent/app/stage/instanceableOnCreatingReference` setting. Defaults to True.

  • select_prim (bool) – If to select the created primitive. Defaults to True.