CreateMdlMaterialPrimCommand#
- class omni.usd.commands.CreateMdlMaterialPrimCommand(
- mtl_url: str,
- mtl_name: str,
- mtl_path: str,
- select_new_prim: bool = False,
- stage: Stage | None = None,
- context_name: str | None = None,
Bases:
Command
,UsdStageHelper
Create a MDL Material.
Methods
__init__
(mtl_url, mtl_name, mtl_path[, ...])Constructor.
do
()undo
()- __init__(
- mtl_url: str,
- mtl_name: str,
- mtl_path: str,
- select_new_prim: bool = False,
- stage: Stage | None = None,
- context_name: str | None = None,
Constructor.
- Parameters:
mtl_url (str) – MDL file path.
mtl_name (str) – MDL material name.
mtl_path (str) – Target prim path to create in the stage.
select_new_prim (bool, optional) – If to select the new created material after creation. Default is False.
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.