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:
authorLukas Stockner <lukas.stockner@freenet.de>2019-12-16 05:58:01 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2019-12-16 06:09:53 +0300
commit31ac2e292e5fc5d4d85d00d97645bfcb9cd4e6c2 (patch)
treeea8e2f273b8eb7ddc5bb951dc9ffaa613422e246 /intern/cycles/blender/blender_shader.cpp
parent5a97a74c69c082d9360fc21b8c6b99fd24912f5f (diff)
Cycles: Fix one-tile UDIM rendering
The code checked for the presence of more than one tile before substituting the tile number into the filename, so if a one-tile UDIM was used (or all but one tile were culled), the substitution was skipped and as a result the file was not found. With this change, the code explicitly tracks whether substitution is required, avoiding this problem. This also fixes another problem: The Environment texture never does substitution since it doesn't support UDIMs, but before the syncing code still inserted the placeholder into the filename if the user selected a tiled background image.
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r--intern/cycles/blender/blender_shader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 6bbc73f72ec..215953d1f29 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -655,7 +655,8 @@ static ShaderNode *add_node(Scene *scene,
image->builtin_data = b_image.ptr.data;
}
else {
- image->filename = image_user_file_path(b_image_user, b_image, b_scene.frame_current());
+ image->filename = image_user_file_path(
+ b_image_user, b_image, b_scene.frame_current(), &image->is_tiled);
image->builtin_data = NULL;
}
@@ -709,7 +710,7 @@ static ShaderNode *add_node(Scene *scene,
env->builtin_data = b_image.ptr.data;
}
else {
- env->filename = image_user_file_path(b_image_user, b_image, b_scene.frame_current());
+ env->filename = image_user_file_path(b_image_user, b_image, b_scene.frame_current(), NULL);
env->builtin_data = NULL;
}