omni.kit.material.library

Classes Summary:

CreateAndBindMdlMaterialFromLibrary

Creates material prim from Core MDL Library, and bind to provided prim list.

CreateAndBindPreviewSurfaceFromLibrary

Creates PreviewSurface material prim.

CreateAndBindPreviewSurfaceTextureFromLibrary

Creates PreviewSurfaceTexture material prim.

MaterialLibraryExtension

Material extension class.

MaterialUtils

Material library MaterialUtils class. Provides upto date cache of known materials in stage.

UpdateState

State of cache of known materials in stage, passed to update_func.

Functions Summary:

add_cache_changed_fn

Adds callback to material cache changed list.

add_material_list_item

Add custom material, this will also get added to context menu Create menu.

add_material_list_refresh_callback

Add callback to trigger when material library UI refreshes.

add_materials_from_stage_filter_func

Add filter callback function to get_materials_from_stage_async() callback.

add_to_mtl_lib

Add custom folder to list of folders to generate context menu “Create/Materials” from.

bind_material_to_prims_dialog

Show dialog to user, so they an select material and bind to prims.

bind_material_to_selected_prims

Bind material to selected prims.

build_material_combobox_ui

Deprecated & not used. Build simulated combobox in conjunction with MaterialListBoxWidget.

create_mdl_material

Create material prim from .mdl file.

create_mtlx_material

Create materialX prim from .mdl file.

custom_material_dialog

Show custom material dialog.

delayed_material_list_refresh

Async refresh material_list.

destroy_material_utils

Destroy material_utils. This should only be called from omni.kit.material.library on_shutdown.

drop_material

Build bind material menu UI.

get_instance

Get MaterialLibraryExtension instance.

get_material_enums

Get material Enum data.

get_material_filename_from_prim

Gets material thumbnail image path for prim.

get_material_hidden_list

Gets list of hidden materials, which is /exts/omni.kit.material.library/ui_hidden_list.

get_material_list

Builds a list of materials and other information, used by omni.kit.context_menu and omni.kit.menu.create

get_material_prim_path

Make valid material prim path from material_prim_name.

get_materials_from_stage

Get list of materials for stage. NOTE: This function can block on large stages.

get_materials_from_stage_async

Get list of materials for stage asynchronously.

get_mdl_lib_paths

Get material library paths. Which is “/exts/omni.kit.material.library/lib_paths”

get_mdl_list

Gets list of materials asynchronously. Can return [] if mdl_list_cache is not complete yet.

get_mdl_list_async

Gets list of materials asynchronously. Can wait if mdl_list_cache is not complete yet.

get_prim_children_paths

Get all child prims from prim_path.

get_subidentifier_from_material

get sub-identifier list from material prim asynchronously.

get_subidentifier_from_mdl

get sub-identifier list from mdl file asynchronously.

initalize_material_utils

Initialize material_utils. This should only be called from omni.kit.material.library on_startup.

material_list_refresh

Remove custom material, this will also get removed from context menu Create menu.

multi_descendents_dialog

Show multi descendants dialog.

remove_cache_changed_fn

Remove callback to material cache changed list.

remove_from_mtl_lib

Remove custom folder to list of folders to generate context menu “Create/Materials” from.

remove_material_list_item

Remove custom material, this will also get removed from context menu Create menu.

remove_material_list_refresh_callback

Remove callback to trigger when material library UI refreshes.

remove_materials_from_stage_filter_func

Remove filter callback function from get_materials_from_stage_async() callback.

remove_mdl_from_cache

Remove material from cache. Call by Material Watcher when re-loading modified mdl files.