[Bf-blender-cvs] [68807cf466c] soc-2020-io-performance: Fix T78533: Skip image texture if image filepath is empty
Ankit Meel
noreply at git.blender.org
Thu Jul 2 16:22:24 CEST 2020
Commit: 68807cf466c56cad90fde2fd9299665d5defd077
Author: Ankit Meel
Date: Thu Jul 2 19:48:50 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB68807cf466c56cad90fde2fd9299665d5defd077
Fix T78533: Skip image texture if image filepath is empty
===================================================================
M source/blender/io/wavefront_obj/intern/wavefront_obj_exporter_mtl.cc
===================================================================
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter_mtl.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter_mtl.cc
index 79baa3c633b..8a4573013a0 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter_mtl.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_exporter_mtl.cc
@@ -146,7 +146,9 @@ const char *MTLWriter::get_image_filepath(const bNode *tex_node)
if (tex_node) {
Image *tex_image = (Image *)tex_node->id;
if (tex_image) {
- return tex_image->filepath;
+ if (tex_image->filepath || tex_image->filepath[0] != '\0') {
+ return tex_image->filepath;
+ }
}
}
return nullptr;
More information about the Bf-blender-cvs
mailing list