recreate_material_in_scope#

omni.mdl.neuraylib.utils.recreate_material_in_scope(
materialRoot: MdlEntitySnapshot,
temporaryScopeName: str,
) str#

Replicated a given material graph in a user-defined scope. This is meant to be used for exporting, baking and other tooling tasks. Note, the modules and created function calls are not visible to rtx.neuraylib.

Parameters:
  • materialRoot (MdlEntitySnapshot) – The rtx.neuraylib material root node to process.

  • temporaryScopeName (str) – Name of the target scope.

Returns:

The DB name of the recreated material in the temporary scope or empty string in case of failure. If the scope is not a temporay scope, ‘False’ is returned as well without attempting to recreate.