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/depsgraph/intern/builder/deg_builder_relations.cc | |
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/depsgraph/intern/builder/deg_builder_relations.cc')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 0d4f9103149..ae159373efd 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -71,6 +71,7 @@ #include "BKE_mball.h" #include "BKE_modifier.h" #include "BKE_node.h" +#include "BKE_node_runtime.hh" #include "BKE_object.h" #include "BKE_particle.h" #include "BKE_pointcache.h" @@ -1459,7 +1460,8 @@ void DepsgraphRelationBuilder::build_animation_images(ID *id) bool has_image_animation = false; if (ELEM(GS(id->name), ID_MA, ID_WO)) { bNodeTree *ntree = *BKE_ntree_ptr_from_id(id); - if (ntree != nullptr && ntree->runtime_flag & NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION) { + if (ntree != nullptr && + ntree->runtime->runtime_flag & NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION) { has_image_animation = true; } } |