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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-19 16:33:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-19 16:33:48 +0300
commitdc65a6f63b54fce657750360e569ea8b4b067bf7 (patch)
treef7265d3391085b75fdb75185f10f43e47cdba672 /source/blender/blenkernel/intern/texture.c
parent0e4829eb058d065a225f8a90e8292fcde1dbfbc9 (diff)
Fix T53032: Image sequence works bad with Displace modifier
We shouldn't mix image pool acuisition with and without user provided, the fact that internally image.c uses last frame from Image datablock confuses the logic.
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 71b90641e02..0e2ac811a41 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -1207,17 +1207,17 @@ void BKE_texture_get_value(
BKE_texture_get_value_ex(scene, texture, tex_co, texres, NULL, use_color_management);
}
-static void texture_nodes_fetch_images_for_pool(bNodeTree *ntree, struct ImagePool *pool)
+static void texture_nodes_fetch_images_for_pool(Tex *texture, bNodeTree *ntree, struct ImagePool *pool)
{
for (bNode *node = ntree->nodes.first; node; node = node->next) {
if (node->type == SH_NODE_TEX_IMAGE && node->id != NULL) {
Image *image = (Image *)node->id;
- BKE_image_pool_acquire_ibuf(image, NULL, pool);
+ BKE_image_pool_acquire_ibuf(image, &texture->iuser, pool);
}
else if (node->type == NODE_GROUP && node->id != NULL) {
/* TODO(sergey): Do we need to control recursion here? */
bNodeTree *nested_tree = (bNodeTree *)node->id;
- texture_nodes_fetch_images_for_pool(nested_tree, pool);
+ texture_nodes_fetch_images_for_pool(texture, nested_tree, pool);
}
}
}
@@ -1226,12 +1226,12 @@ static void texture_nodes_fetch_images_for_pool(bNodeTree *ntree, struct ImagePo
void BKE_texture_fetch_images_for_pool(Tex *texture, struct ImagePool *pool)
{
if (texture->nodetree != NULL) {
- texture_nodes_fetch_images_for_pool(texture->nodetree, pool);
+ texture_nodes_fetch_images_for_pool(texture, texture->nodetree, pool);
}
else {
if (texture->type == TEX_IMAGE) {
if (texture->ima != NULL) {
- BKE_image_pool_acquire_ibuf(texture->ima, NULL, pool);
+ BKE_image_pool_acquire_ibuf(texture->ima, &texture->iuser, pool);
}
}
}