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 Toenne <lukas.toenne@googlemail.com>2013-08-07 17:14:50 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-08-07 17:14:50 +0400
commit8d879829da9b82d285e94ee8e408cbc2550692ad (patch)
tree5aea532c6e3f462e6941f27f8349359ae03d9322
parent9bfbdd8118611059fe46ac4bb92d0a5b9a05741d (diff)
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.
-rw-r--r--source/blender/editors/space_node/node_edit.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 9b48774588d..b7e9cb0268f 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -510,13 +510,9 @@ void ED_node_composit_default(const bContext *C, struct Scene *sce)
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 */