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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-09-25 17:02:52 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-09-25 17:02:52 +0400
commitb25cce1430a6eec6cf7a784586c164c8562ef2ef (patch)
tree11b77c447435868b3a74136af0ab13060f13fb41 /source/blender/compositor
parented47d89d7fcd9461fe67377505c4a65892f9ffe5 (diff)
Compositor:
* Node muting in node groups didn't work. [#32597] Mute one node in a group blocks it It looked for connections in the main tree, and not inside the group.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp3
-rw-r--r--source/blender/compositor/intern/COM_Node.h9
-rw-r--r--source/blender/compositor/nodes/COM_MuteNode.cpp8
3 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
index bedbfc72722..33a5cafebbe 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
@@ -49,7 +49,8 @@ void ExecutionSystemHelper::addbNodeTree(ExecutionSystem &system, int nodes_star
/* add all nodes of the tree to the node list */
bNode *node = (bNode *)tree->nodes.first;
while (node != NULL) {
- addNode(nodes, node, isActiveGroup, system.getContext().isFastCalculation());
+ Node *nnode = addNode(nodes, node, isActiveGroup, system.getContext().isFastCalculation());
+ nnode->setbNodeGroup(groupnode);
node = (bNode *)node->next;
}
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index bfccd069ad1..e8fd936e749 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -53,6 +53,12 @@ private:
* @brief Is this node part of the active group
*/
bool m_inActiveGroup;
+
+ /**
+ * @brief The group node this node belongs to.
+ * @note: used to find the links in the current subtree for muting nodes
+ */
+ bNode* m_bNodeGroup;
public:
Node(bNode *editorNode, bool create_sockets = true);
@@ -134,6 +140,9 @@ public:
* @param socket
*/
OutputSocket *findOutputSocketBybNodeSocket(bNodeSocket *socket);
+
+ inline void setbNodeGroup(bNode* group) {this->m_bNodeGroup = group;}
+ inline bNode* getbNodeGroup() {return this->m_bNodeGroup;}
protected:
void addPreviewOperation(ExecutionSystem *system, CompositorContext *context, InputSocket *inputSocket);
void addPreviewOperation(ExecutionSystem *system, CompositorContext *context, OutputSocket *outputSocket);
diff --git a/source/blender/compositor/nodes/COM_MuteNode.cpp b/source/blender/compositor/nodes/COM_MuteNode.cpp
index eb2da147eca..ebee1f25455 100644
--- a/source/blender/compositor/nodes/COM_MuteNode.cpp
+++ b/source/blender/compositor/nodes/COM_MuteNode.cpp
@@ -111,11 +111,17 @@ void MuteNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
if ((editorNode->flag & NODE_MUTED) && editorNode->typeinfo->internal_connect) {
vector<InputSocket *> &inputsockets = this->getInputSockets();
vector<OutputSocket *> relinkedsockets;
- bNodeTree *editorTree = (bNodeTree *) context->getbNodeTree();
+ bNodeTree *editorTree;
SocketMap socketMap;
ListBase intlinks;
bNodeLink *link;
+ if (this->getbNodeGroup()) {
+ editorTree = (bNodeTree *) getbNodeGroup()->id;
+ } else {
+ editorTree = (bNodeTree *) context->getbNodeTree();
+ }
+
intlinks = editorNode->typeinfo->internal_connect(editorTree, editorNode);
this->fillSocketMap<OutputSocket>(outputsockets, socketMap);