Blender
V3.3
|
#include <BKE_node_runtime.hh>
Public Attributes | |
NodeDeclarationHandle * | declaration = nullptr |
uint32_t | changed_flag = 0 |
Run-time data for every node. This should only contain data that is somewhat persistent (i.e. data that lives longer than a single depsgraph evaluation + redraw). Data that's only used in smaller scopes should generally be stored in separate arrays and/or maps.
Definition at line 63 of file BKE_node_runtime.hh.
uint32_t blender::bke::bNodeRuntime::changed_flag = 0 |
Definition at line 86 of file BKE_node_runtime.hh.
NodeDeclarationHandle* blender::bke::bNodeRuntime::declaration = nullptr |
Describes the desired interface of the node. This is run-time data only. The actual interface of the node may deviate from the declaration temporarily. It's possible to sync the actual state of the node to the desired state. Currently, this is only done when a node is created or loaded.
In the future, we may want to keep more data only in the declaration, so that it does not have to be synced to other places that are stored in files. That especially applies to data that can't be edited by users directly (e.g. min/max values of sockets, tooltips, ...).
The declaration of a node can be recreated at any time when it is used. Caching it here is just a bit more efficient when it is used a lot. To make sure that the cache is up-to-date, call nodeDeclarationEnsure before using it.
Currently, the declaration is the same for every node of the same type. Going forward, that is intended to change though. Especially when nodes become more dynamic with respect to how many sockets they have.
Definition at line 83 of file BKE_node_runtime.hh.