USD import: fix missing packed textures for UMM.
The material importer now always attempts to pack textures of any texture image node that were created, even if the UMM conversion was only partially complete, since it is useful to render a parially-constructed material. For example, if the material has a valid color texture but the normal texture is missing, we still want to load the color texture in the viewport, regardless of any UMM error due to the missing normal texture.
This commit is contained in:
@@ -392,7 +392,7 @@ Material *USDMaterialReader::add_material(const pxr::UsdShadeMaterial &usd_mater
|
||||
#ifdef WITH_PYTHON
|
||||
/* Invoke UMM to convert to MDL. */
|
||||
mdl_imported = umm_import_mdl_material(params_, mtl, usd_material, true /* Verbose */, &has_mdl);
|
||||
if (mdl_imported && params_.import_textures_mode == USD_TEX_IMPORT_PACK) {
|
||||
if (params_.import_textures_mode == USD_TEX_IMPORT_PACK) {
|
||||
/* Process the imported material to pack the textures. */
|
||||
pack_imported_textures(mtl);
|
||||
}
|
||||
|
Reference in New Issue
Block a user