create_mtlx_material

omni.kit.material.library.create_mtlx_material(stage: Stage, mtlx_url: str, on_create_fn: callable, base_name: str = '')

Create materialX prim from .mdl file.

Parameters
  • stage (Usd.Stage) – stage.

  • mtlx_url (str) – path of materialX mdl file.

  • on_create_fn (callable) – Callback when materialX is created.

  • base_name (str) – Optional override for materialX name

Returns

new materialX path or None.

Return type

(str)