CreatePayloadCommand

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

Bases: CreatePrimCommandBase

Create payload undoable Command.

It creates a new prim and adds the asset and path as payloads.

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) – The asset it’s necessary to add to payloads.

  • prim_path (Sdf.Path) – The prim in asset to payload.

  • instanceable (bool) – Whether to set the prim instanceable. It works together with `/persistent/app/stage/instanceableOnCreatingReference` setting.

  • select_prim (bool) – = True, Whether to select the newly created UsdPrim or not.

Methods

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

do()

undo()

__init__(usd_context: UsdContext, path_to: Path, asset_path: Optional[str] = None, prim_path: Optional[Path] = None, instanceable: bool = True, select_prim: bool = True)