Commit: af8e8e2ae5ca28c4e03ce4e14fb15990f720684a
Author: Michael Kowalski
Date: Fri Jan 14 20:14:47 2022 -0500
Branches: temp-usd-prev-export2
https://developer.blender.org/rBaf8e8e2ae5ca28c4e03ce4e14fb15990f720684a
USD material export code cleanup.
Fixed comment and removed unnecessary check for
empty string.
===================================================================
M source/blender/io/usd/intern/usd_writer_material.cc
===================================================================
diff --git a/source/blender/io/usd/intern/usd_writer_material.cc
b/source/blender/io/usd/intern/usd_writer_material.cc
index c149e0873b2..da60783cd59 100644
--- a/source/blender/io/usd/intern/usd_writer_material.cc
+++ b/source/blender/io/usd/intern/usd_writer_material.cc
@@ -542,10 +542,6 @@ static pxr::UsdShadeShader create_usd_preview_shader(const
USDExporterContext &u
static std::string get_tex_image_asset_path(Image *ima)
{
- if (strlen(ima->filepath) == 0) {
- return "";
- }
-
char filepath[FILE_MAX];
get_absolute_path(ima, filepath);
@@ -557,7 +553,8 @@ static std::string get_tex_image_asset_path(Image *ima)
* in the same directory as the USD file, depending on the export parameters.
* The filename is typically the image filepath but might also be automatically
* generated based on the image name for in-memory textures when exporting
textures.
- * This function may return an empty string if no asset path could be
determined. */
+ * This function may return an empty string if the image does not have a
filepath
+ * assigned and no asset path could be determined. */
static std::string get_tex_image_asset_path(bNode *node,
const pxr::UsdStageRefPtr stage,
const USDExportParams
&export_params)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs