Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-01-15 04:14:47 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-01-15 04:14:47 +0300
commitaf8e8e2ae5ca28c4e03ce4e14fb15990f720684a (patch)
tree48427be31937b328ce22ff336e0af65caba8abd3
parentff80cbbeeb03cc5865e4e8ff8d0eab19c557ce31 (diff)
USD material export code cleanup.
Fixed comment and removed unnecessary check for empty string.
-rw-r--r--source/blender/io/usd/intern/usd_writer_material.cc7
1 files changed, 2 insertions, 5 deletions
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)