omni::connect::core::createMdlShader

Defined in omni/connect/core/MaterialAlgo.h

pxr::UsdShadeShader omni::connect::core::createMdlShader(pxr::UsdShadeMaterial &material, const std::string &name, const pxr::SdfAssetPath &mdlPath, const pxr::TfToken &module, bool connectMaterialOutputs = true)

Create a UsdShadeShader as a child of the UsdShadeMaterial argument with the specified MDL.

Parameters
  • material – Parent UsdShadeMaterial for the shader to be created

  • name – Name of the shader to be created

  • mdlPath – Absolute or relative path to the MDL asset

  • module – Name of the MDL module to set as source asset sub-identifier for the shader

  • connectMaterialOutputs – If true, creates surface, displacement and volume outputs on the material and connects them to the shader output

Returns

The newly created UsdShadeShader. Returns an Invalid prim on error.