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:
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 82da3512269..d441575e8af 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -246,7 +246,11 @@ static inline string image_user_file_path(BL::ImageUser &iuser,
string filepath_str = string(filepath);
if (load_tiled && ima.source() == BL::Image::source_TILED) {
- string_replace(filepath_str, "1001", "<UDIM>");
+ string udim;
+ if (ima.tiles.length() > 0) {
+ udim = to_string(ima.tiles[0].number());
+ }
+ string_replace(filepath_str, udim, "<UDIM>");
}
return filepath_str;
}