[Bf-blender-cvs] [362d5b42c8a] tmp-dynamic-usd: USD: error importing texture from empty path.

Michael Kowalski noreply at git.blender.org
Thu Dec 8 02:01:12 CET 2022


Commit: 362d5b42c8a1df15eea59a4414de477680f9f5da
Author: Michael Kowalski
Date:   Wed Dec 7 19:59:52 2022 -0500
Branches: tmp-dynamic-usd
https://developer.blender.org/rB362d5b42c8a1df15eea59a4414de477680f9f5da

USD: error importing texture from empty path.

Added check for empty path before attempting to import
textures.

===================================================================

M	source/blender/io/usd/intern/usd_umm.cc

===================================================================

diff --git a/source/blender/io/usd/intern/usd_umm.cc b/source/blender/io/usd/intern/usd_umm.cc
index 1fc0f146ab2..678a98dc341 100644
--- a/source/blender/io/usd/intern/usd_umm.cc
+++ b/source/blender/io/usd/intern/usd_umm.cc
@@ -465,7 +465,7 @@ static PyObject *get_shader_source_data(const USDImportParams &params,
                                              asset_path.GetAssetPath());
       }
 
-      if (params.import_textures) {
+      if (params.import_textures && !resolved_path.empty()) {
         resolved_path = usd_import_texture(
             resolved_path.c_str(), params.import_textures_dir, params.overwrite_textures);
       }



More information about the Bf-blender-cvs mailing list