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:
authorTon Roosendaal <ton@blender.org>2011-01-17 18:16:08 +0300
committerTon Roosendaal <ton@blender.org>2011-01-17 18:16:08 +0300
commit4b7930dbbd8a11fb5db3e1cc81ca9ca5b0a69fc0 (patch)
treef6829dc6241fa20e1453a42cf5887fe65b9bfe08 /source/blender/makesrna/intern/rna_nodetree.c
parent9924ade1020f4e2ad4f108065224dc5493871214 (diff)
Bugfix #25681
Python API allowed to make links with input->output reversed. Now node api checks for this case and flips order.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 9d4575b2f43..5c962145c55 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -524,15 +524,16 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b
nodeRemSocketLinks(ntree, out);
ret= nodeAddLink(ntree, fromnode, in, tonode, out);
+
+ if(ret) {
+ NodeTagChanged(ntree, tonode);
- NodeTagChanged(ntree, tonode);
-
- nodeVerifyGroup(ntree); /* update group node socket links*/
-
- ntreeSolveOrder(ntree);
+ nodeVerifyGroup(ntree); /* update group node socket links*/
- WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+ ntreeSolveOrder(ntree);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+ }
return ret;
}