[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58991] trunk/blender/source/blender/ editors/space_node/node_edit.c: Fix #36266, First undo in compositor decrements usercounter without a reason.
Lukas Toenne
lukas.toenne at googlemail.com
Wed Aug 7 15:14:51 CEST 2013
Revision: 58991
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58991
Author: lukastoenne
Date: 2013-08-07 13:14:50 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
Fix #36266, First undo in compositor decrements usercounter without a reason. The handling of scene backpointers in render layer/composite nodes changed slightly recently, which caused a double increment
of the scene user count. The node->id pointer for these nodes is now initialized in the respective init callbacks already. The explicit assignment and increment in the ED_node_composit_default is not
necessary and just adds an increment without checking previous values and decrementing them properly.
Note that the current system still leaves the scene with "fake" users (rlayer + composite nodes) which are actually part of the scene data itself. But that's design issue with the "local" node tree data
and doesn't do any real harm.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_node/node_edit.c
Modified: trunk/blender/source/blender/editors/space_node/node_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_edit.c 2013-08-07 08:20:37 UTC (rev 58990)
+++ trunk/blender/source/blender/editors/space_node/node_edit.c 2013-08-07 13:14:50 UTC (rev 58991)
@@ -510,13 +510,9 @@
out = nodeAddStaticNode(C, sce->nodetree, CMP_NODE_COMPOSITE);
out->locx = 300.0f; out->locy = 400.0f;
- out->id = &sce->id;
- id_us_plus(out->id);
in = nodeAddStaticNode(C, sce->nodetree, CMP_NODE_R_LAYERS);
in->locx = 10.0f; in->locy = 400.0f;
- in->id = &sce->id;
- id_us_plus(in->id);
nodeSetActive(sce->nodetree, in);
/* links from color to color */
More information about the Bf-blender-cvs
mailing list