omni.kit.material.library

Material Library

Python API Reference

class omni.kit.material.library.CreateAndBindMdlMaterialFromLibrary(mdl_name: str, mtl_name: str, mtl_created_list: Optional[list] = None, bind_selected_prims: list = False, select_new_prim: bool = True)

Bases: omni.kit.commands.command.Command

do()
undo()
class omni.kit.material.library.CreateAndBindPreviewSurfaceFromLibrary(mtl_created_list: Optional[list] = None, bind_selected_prims: list = False)

Bases: omni.kit.commands.command.Command

do()
undo()
class omni.kit.material.library.CreateAndBindPreviewSurfaceTextureFromLibrary(mtl_created_list: Optional[list] = None, bind_selected_prims: list = False)

Bases: omni.kit.commands.command.Command

do()
undo()
class omni.kit.material.library.Enum(value)

Bases: object

Generic enumeration.

Derive from this class to define new enumerations.

name

The name of the Enum member.

value

The value of the Enum member.

class omni.kit.material.library.MDLSchema

Bases: object

on_menu_click_update_mdl_schema(value)
class omni.kit.material.library.MaterialLibraryExtension(self: omni.ext._extensions.IExt)None

Bases: omni.ext._extensions.IExt

class StaticDataModel

Bases: object

destroy()
create_material_and_assign(*_)
on_shutdown()
on_startup(ext_id)
class omni.kit.material.library.MaterialUtils

Bases: object

add_cache_changed_fn(cache_changed_fn: callable)
destroy()
flush_material_cache()
get_materials_from_stage()
get_materials_from_stage_async(update_func: callable, wait_frames: int)
remove_cache_changed_fn(cache_changed_fn: callable)
stop()

Stop traversing the stage

class omni.kit.material.library.PrimCaching(usd_type, stage, on_changed=None)

Bases: object

destroy()
get_cache_state()
get_stage()
set_cache_state(state)
class omni.kit.material.library.UpdateState(value)

Bases: enum.Enum

An enumeration.

COMPLETE_LIST = 3
UPDATE = 1
UPDATE_COMPLETE = 2
omni.kit.material.library.add_cache_changed_fn(cache_changed_fn: callable)
omni.kit.material.library.bind_material_to_selected_prims(material_prim_path: pxr.Sdf.Path, paths: list)
class omni.kit.material.library.chain

Bases: object

chain(*iterables) –> chain object

Return a chain object whose .__next__() method returns elements from the first iterable until it is exhausted, then elements from the next iterable, until all of the iterables are exhausted.

from_iterable()

chain.from_iterable(iterable) –> chain object

Alternate chain() constructor taking a single iterable argument that evaluates lazily.

omni.kit.material.library.create_mdl_material(stage: pxr.Usd.Stage, mtl_url: str, mtl_name: str, on_create_fn: Callable)
omni.kit.material.library.custom_material_dialog(default_mdl_name: str, on_complete_fn: Optional[Callable] = None, bind_prim_paths: list = [])
omni.kit.material.library.get_material_filename_from_prim(prim: pxr.Usd.Prim)str
omni.kit.material.library.get_material_hidden_list()
omni.kit.material.library.get_material_list()
omni.kit.material.library.get_material_prim_path(material_prim_name: str)
omni.kit.material.library.get_materials_from_stage(none_string: str)
omni.kit.material.library.get_materials_from_stage_async(update_func: callable, wait_frames: int = 1)
omni.kit.material.library.get_mdl_lib_paths()
omni.kit.material.library.get_mdl_list(use_hidden=False)
omni.kit.material.library.initalize_material_utils()
omni.kit.material.library.remove_cache_changed_fn(cache_changed_fn: callable)