diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-09-12 17:30:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-09-13 12:00:37 +0300 |
commit | bb3a021427f2132f1db62a76eeca2ca4be1601da (patch) | |
tree | 0532c51e51801104721b5d6204e8d2943c55c273 /source/blender/depsgraph/intern/eval/deg_eval_flush.cc | |
parent | a45c36efae07f22dd1da1ebac728324aeafce85e (diff) |
Fix T101004: Crash when invisible object becomes visible
A regression since ac20970bc208
The issue was caused by depsgraph clearing all id->recalc flags
wrongly assuming that all IDs are fully evaluated.
This change makes it so the depsgraph becomes aware of possibly
incompletely evaluated IDs.
Differential Revision: https://developer.blender.org/D15946
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_flush.cc')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index 30ee626f0f8..3f42d1a80c1 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -31,6 +31,7 @@ #include "intern/debug/deg_debug.h" #include "intern/depsgraph.h" #include "intern/depsgraph_relation.h" +#include "intern/depsgraph_tag.h" #include "intern/depsgraph_type.h" #include "intern/depsgraph_update.h" #include "intern/node/deg_node.h" @@ -99,6 +100,18 @@ inline void flush_prepare(Depsgraph *graph) inline void flush_schedule_entrypoints(Depsgraph *graph, FlushQueue *queue) { + /* Something changed in the scene, so re-tag IDs with flags which were previously ignored due to + * ID being hidden. This will ensure the ID is properly evaluated when it becomes visible. */ + for (IDNode *node : graph->id_nodes) { + if (node->id_invisible_recalc) { + graph_id_tag_update(graph->bmain, + graph, + node->id_orig, + node->id_invisible_recalc, + DEG_UPDATE_SOURCE_VISIBILITY); + } + } + for (OperationNode *op_node : graph->entry_tags) { queue->push_back(op_node); op_node->scheduled = true; |