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-06-10 22:07:45 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-06-10 22:07:45 +0300
commitadd1da52ad783e33e8abb0a790ddc97dd89dab92 (patch)
tree5803d605f1fc25f7f99a8ffb5cee981f99a11859 /source/blender
parent9e622e1d027967339dffb0d986941a4a5f18621f (diff)
Fix T97362: forward slashes in USD texture paths
Ensuring that relative paths to textures in exported USDs use forward slash separators, for cross-platform compatibility.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/io/usd/intern/usd_writer_material.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/io/usd/intern/usd_writer_material.cc b/source/blender/io/usd/intern/usd_writer_material.cc
index 857896b9330..6862f3835cf 100644
--- a/source/blender/io/usd/intern/usd_writer_material.cc
+++ b/source/blender/io/usd/intern/usd_writer_material.cc
@@ -590,6 +590,7 @@ static std::string get_tex_image_asset_path(bNode *node,
BLI_split_dir_part(stage_path.c_str(), dir_path, FILE_MAX);
BLI_path_join(exp_path, FILE_MAX, dir_path, "textures", file_path, nullptr);
}
+ BLI_str_replace_char(exp_path, '\\', '/');
return exp_path;
}
@@ -608,7 +609,7 @@ static std::string get_tex_image_asset_path(bNode *node,
if (!BLI_path_is_rel(rel_path)) {
return path;
}
-
+ BLI_str_replace_char(rel_path, '\\', '/');
return rel_path + 2;
}