diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-10-19 21:08:35 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-10-19 21:08:35 +0400 |
commit | 0d7bd0f9b63db4c7891137d18ae6a40e652e190f (patch) | |
tree | c0bebf306abc77c7ae35ccbb8672b862bd088cd5 /source/blender/editors/space_node/space_node.c | |
parent | 408a2c62b974c10c7d19ad419dfca479dec59f65 (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/editors/space_node/space_node.c')
-rw-r--r-- | source/blender/editors/space_node/space_node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 9c4581a43da..1047e906a10 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -244,10 +244,10 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn) if(type==NTREE_COMPOSIT) { Scene *scene= wmn->window->screen->scene; - /* note that NodeTagIDChanged is already called by BKE_image_signal() on all + /* note that nodeUpdateID is already called by BKE_image_signal() on all * scenes so really this is just to know if the images is used in the compo else * painting on images could become very slow when the compositor is open. */ - if(NodeTagIDChanged(scene->nodetree, wmn->reference)) + if(nodeUpdateID(scene->nodetree, wmn->reference)) ED_area_tag_refresh(sa); } } |