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>2016-02-23 17:26:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-02-23 17:26:34 +0300
commit125d5d2be5f62c71a7c718fcc105c7e30a6b8f9c (patch)
tree14c03df6dec81dbc02a90dea89617b8bed72bebe /source/blender/compositor/operations
parent62b3fdb57c8c86d11682ceba5779812801b7104b (diff)
Fix T47444: Texture node in compositing nodes does not update
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index c75c4040823..ed8b0343e51 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -26,6 +26,10 @@
#include "BLI_threads.h"
#include "BKE_image.h"
+extern "C" {
+#include "BKE_node.h"
+}
+
static ThreadMutex mutex_lock = BLI_MUTEX_INITIALIZER;
TextureBaseOperation::TextureBaseOperation() : SingleThreadedOperation()
@@ -53,6 +57,9 @@ void TextureBaseOperation::initExecution()
this->m_inputOffset = getInputSocketReader(0);
this->m_inputSize = getInputSocketReader(1);
this->m_pool = BKE_image_pool_new();
+ if (this->m_texture->nodetree && this->m_texture->use_nodes) {
+ ntreeTexBeginExecTree(this->m_texture->nodetree);
+ }
SingleThreadedOperation::initExecution();
}
void TextureBaseOperation::deinitExecution()
@@ -61,6 +68,13 @@ void TextureBaseOperation::deinitExecution()
this->m_inputOffset = NULL;
BKE_image_pool_free(this->m_pool);
this->m_pool = NULL;
+ if (this->m_texture != NULL &&
+ this->m_texture->use_nodes &&
+ this->m_texture->nodetree != NULL &&
+ this->m_texture->nodetree->execdata != NULL)
+ {
+ ntreeTexEndExecTree(this->m_texture->nodetree->execdata);
+ }
SingleThreadedOperation::deinitExecution();
}
@@ -82,7 +96,8 @@ void TextureAlphaOperation::executePixelSampled(float output[4], float x, float
{
float color[4];
TextureBaseOperation::executePixelSampled(color, x, y, sampler);
- output[0] = color[3];}
+ output[0] = color[3];
+}
void TextureBaseOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{