Fix for #35349, multiple viewers nodes crashing during render. The condition for...
authorLukas Toenne <lukas.toenne@googlemail.com>
Tue, 14 May 2013 10:42:30 +0000 (10:42 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Tue, 14 May 2013 10:42:30 +0000 (10:42 +0000)
1) the node is tagged for recalc OR compo is in render mode
2) it is the currently active viewer (so only one viewer ever writes to the buffer)

source/blender/compositor/nodes/COM_ViewerNode.cpp

index 70cc3a288ee867d7332bf7b991e179bd5282b157..531fa4158bc239be43e6d6f257cea0f87e8e5665 100644 (file)
@@ -34,9 +34,8 @@ ViewerNode::ViewerNode(bNode *editorNode) : Node(editorNode)
 void ViewerNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
 {
        bNode *editorNode = this->getbNode();
-       bool is_active = ((editorNode->flag & NODE_DO_OUTPUT_RECALC) &&
-                         (editorNode->flag & NODE_DO_OUTPUT) && this->isInActiveGroup()) ||
-                        context->isRendering();
+       bool is_active = (editorNode->flag & NODE_DO_OUTPUT_RECALC || context->isRendering()) &&
+                        ((editorNode->flag & NODE_DO_OUTPUT) && this->isInActiveGroup());
 
        InputSocket *imageSocket = this->getInputSocket(0);
        InputSocket *alphaSocket = this->getInputSocket(1);