CreateShaderPrimFromSdrCommand

class omni.usd.commands.CreateShaderPrimFromSdrCommand(parent_path: str, identifier: str, name: Optional[str] = None, select_new_prim: bool = False, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)

Bases: Command

Load the shader specified by ‘identifier’ from the SDR registry and create and a shader prim under

the location specified by parent_path. The parent location must be of type UsdShade.Material or UsdShade.NodeGraph

Parameters
  • parent_path (str) – The path of the parent UsdShade.Material or UsdShade.NodeGraph

  • identifier (str) – The identifer of the node Sdr registry which will be used to define the shader.

  • name (str) – The name of the UsdShade.Shader prim to be created, if empty identifier will be used. Optional

  • select_new_prim (bool) – Optional

  • stage_or_context – (Union[str, Usd.Stage, omni.usd.UsdContext]): Stage or UsdContext applies the changes to. It can be instance of Usd.Stage or omni.usd.UsdContext, or context name. By default, it will apply the changes to the stage in default UsdContext.

Methods

__init__(parent_path, identifier[, name, ...])

do()

undo()

__init__(parent_path: str, identifier: str, name: Optional[str] = None, select_new_prim: bool = False, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)