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>2011-10-19 21:08:35 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2011-10-19 21:08:35 +0400
commit0d7bd0f9b63db4c7891137d18ae6a40e652e190f (patch)
treec0bebf306abc77c7ae35ccbb8672b862bd088cd5 /source/blender/nodes/intern
parent408a2c62b974c10c7d19ad419dfca479dec59f65 (diff)
Adds an update flag to the bNode struct (similar to bNodeTree->update).
This prevents access to non-existent typeinfo during type initialization, when node types have been removed and such nodes are deleted from older files. All blenkernel functions now only set the node->update flag instead of directly calling the update function. All operators, etc. calling blenkernel functions to modify nodes should make a ntreeUpdate call afterward (they already did that anyway). Editor/RNA/renderer/etc. high-level functions still can do immediate updates by using nodeUpdate and nodeUpdateID (replacing NodeTagChanged/NodeTagIDChanged respectively). These old functions were previously used only for setting compositor node needexec flags and clearing cached data, but have become generic update functions that require type-specific functionality (i.e. a valid typeinfo struct).
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/node_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 56f80840112..4dbf4b96b74 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -239,9 +239,11 @@ bNode *node_group_make_from_selected(bNodeTree *ntree)
}
}
+ /* update of the group tree */
ngroup->update |= NTREE_UPDATE;
ntreeUpdateTree(ngroup);
- ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS;
+ /* update of the tree containing the group instance node */
+ ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS;
ntreeUpdateTree(ntree);
return gnode;
@@ -559,7 +561,7 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
/* free the group tree (takes care of user count) */
free_libblock(&G.main->nodetree, wgroup);
- ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS;
+ ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS;
ntreeUpdateTree(ntree);
return 1;