[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55436] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: Fix for bug reported on bf-committers: RNA function nodetree.links. new does not remove existing links when connecting to a linked input.
Lukas Toenne
lukas.toenne at googlemail.com
Wed Mar 20 10:53:29 CET 2013
Revision: 55436
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55436
Author: lukastoenne
Date: 2013-03-20 09:53:29 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Fix for bug reported on bf-committers: RNA function nodetree.links.new does not remove existing links when connecting to a linked input. The check for socket connection limits was 1 off, needs to add 1 to the link counter to anticipate the newly added link.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-03-20 01:41:33 UTC (rev 55435)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-03-20 09:53:29 UTC (rev 55436)
@@ -829,9 +829,9 @@
if (verify_limits) {
/* remove other socket links if limit is exceeded */
- if (nodeCountSocketLinks(ntree, fromsock) > fromsock->limit)
+ if (nodeCountSocketLinks(ntree, fromsock) + 1 > fromsock->limit)
nodeRemSocketLinks(ntree, fromsock);
- if (nodeCountSocketLinks(ntree, tosock) > tosock->limit)
+ if (nodeCountSocketLinks(ntree, tosock) + 1 > tosock->limit)
nodeRemSocketLinks(ntree, tosock);
}
More information about the Bf-blender-cvs
mailing list