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 Tönne <lukas.toenne@gmail.com>2014-07-15 12:55:49 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-07-15 13:03:07 +0400
commit2bdb872cfb90feae214088954d243820e4992c3b (patch)
tree769a63c61ca7485531793ed6a101824d3c5fb26f /source/blender/compositor/nodes
parentfa8ff63b48d2064701e1cc9929549c79c5dd73c3 (diff)
Fix T41067: Muted nodes still do data type conversions.
Proxy operations from muted nodes would still create conversion operations where the datatypes don't match, which creates unexpected behavior. Arguably datatype conversion could still happen even when the main operation is muted, but this would be a design change and so is disabled now.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.h9
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.cpp4
3 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
index f750a44a788..48c8acfc6a1 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
@@ -29,7 +29,9 @@
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"
-SocketProxyNode::SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput) : Node(editorNode, false)
+SocketProxyNode::SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool use_conversion) :
+ Node(editorNode, false),
+ m_use_conversion(use_conversion)
{
DataType dt;
@@ -46,7 +48,7 @@ SocketProxyNode::SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bN
void SocketProxyNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const
{
- NodeOperationOutput *proxy_output = converter.addInputProxy(getInputSocket(0));
+ NodeOperationOutput *proxy_output = converter.addInputProxy(getInputSocket(0), m_use_conversion);
converter.mapOutputSocket(getOutputSocket(), proxy_output);
}
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.h b/source/blender/compositor/nodes/COM_SocketProxyNode.h
index 2fbaa71421c..5dbf39382cc 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.h
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.h
@@ -31,8 +31,15 @@
*/
class SocketProxyNode : public Node {
public:
- SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput);
+ SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool use_conversion);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
+
+ bool getUseConversion() const { return m_use_conversion; }
+ void setUseConversion(bool use_conversion) { m_use_conversion = use_conversion; }
+
+private:
+ /** If true, the proxy will convert input and output data to/from the proxy socket types. */
+ bool m_use_conversion;
};
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.cpp b/source/blender/compositor/nodes/COM_SwitchNode.cpp
index 692b8d743f6..10f0ee3821d 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.cpp
+++ b/source/blender/compositor/nodes/COM_SwitchNode.cpp
@@ -33,9 +33,9 @@ void SwitchNode::convertToOperations(NodeConverter &converter, const CompositorC
NodeOperationOutput *result;
if (!condition)
- result = converter.addInputProxy(getInputSocket(0));
+ result = converter.addInputProxy(getInputSocket(0), false);
else
- result = converter.addInputProxy(getInputSocket(1));
+ result = converter.addInputProxy(getInputSocket(1), false);
converter.mapOutputSocket(getOutputSocket(0), result);
}