[Bf-blender-cvs] [125d5d2] master: Fix T47444: Texture node in compositing nodes does not update
Sergey Sharybin
noreply at git.blender.org
Tue Feb 23 15:26:52 CET 2016
Commit: 125d5d2be5f62c71a7c718fcc105c7e30a6b8f9c
Author: Sergey Sharybin
Date: Tue Feb 23 15:26:05 2016 +0100
Branches: master
https://developer.blender.org/rB125d5d2be5f62c71a7c718fcc105c7e30a6b8f9c
Fix T47444: Texture node in compositing nodes does not update
===================================================================
M source/blender/compositor/operations/COM_TextureOperation.cpp
===================================================================
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index c75c404..ed8b034 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)
{
More information about the Bf-blender-cvs
mailing list