diff options
author | Jacques Lucke <jacques@blender.org> | 2022-05-30 13:54:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-05-30 13:54:07 +0300 |
commit | bb0fc675822f313c5546a2498a162472c2571ecb (patch) | |
tree | 2f4a7941a1a32d24260d3add53e92103506a8593 /source/blender/modifiers | |
parent | 2f77b2daaccfa00866f049e4c2fc1cdee41e8ae1 (diff) |
Nodes: add separately allocated run-time data for bNodeTree
`bNodeTree` has a lot of run-time embedded in it currently. Having a separately
allocated run-time struct has some benefits:
* Run-time data is not stored in files.
* Makes it easy to use c++ types as run-time data.
* More clear distinction between what data only exists at run-time and which doesn't.
This commit doesn't move all run-time data to the new struct yet, only the data where
I know for sure how it is used. The remaining data can be moved separately.
Differential Revision: https://developer.blender.org/D15033
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 0d8cef3e083..e0105e4962d 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -45,6 +45,7 @@ #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_modifier.h" +#include "BKE_node_runtime.hh" #include "BKE_node_tree_update.h" #include "BKE_object.h" #include "BKE_pointcloud.h" @@ -396,8 +397,9 @@ static bool socket_type_has_attribute_toggle(const bNodeSocket &socket) */ static bool input_has_attribute_toggle(const bNodeTree &node_tree, const int socket_index) { - BLI_assert(node_tree.field_inferencing_interface != nullptr); - const FieldInferencingInterface &field_interface = *node_tree.field_inferencing_interface; + BLI_assert(node_tree.runtime->field_inferencing_interface); + const FieldInferencingInterface &field_interface = + *node_tree.runtime->field_inferencing_interface; return field_interface.inputs[socket_index] != InputSocketFieldType::None; } |