CreateReferenceCommand#

class omni.usd.commands.CreateReferenceCommand(
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 reference.

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 for reference. If not specified, it’s a prim reference. Defaults to None.

  • prim_path (Sdf.Path) – The prim path to reference. 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.