Adds an update flag to the bNode struct (similar to bNodeTree->update).
authorLukas Toenne <lukas.toenne@googlemail.com>
Wed, 19 Oct 2011 17:08:35 +0000 (17:08 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Wed, 19 Oct 2011 17:08:35 +0000 (17:08 +0000)
commit0d7bd0f9b63db4c7891137d18ae6a40e652e190f
treec0bebf306abc77c7ae35ccbb8672b862bd088cd5
parent408a2c62b974c10c7d19ad419dfca479dec59f65
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).
15 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/node.c
source/blender/editors/render/render_internal.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/space_node.c
source/blender/makesdna/DNA_node_types.h
source/blender/makesrna/intern/rna_nodetree.c
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/render/intern/source/pipeline.c