Fix T89487: Crash adding Rigid Body to object with shared mesh data

Not sure why this bug was only discovered by such an elaborate steps
and why it took so long to be discovered. The root of the issue is
that in the 956c539e59 the typical flow of tag+flush+evaluate was
violated and tagging for visibility change happened after flush.
This commit is contained in:
Sergey Sharybin
2021-11-02 18:36:24 +01:00
parent 3a454beae7
commit 978f2cb900
2 changed files with 2 additions and 2 deletions

View File

@@ -44,6 +44,7 @@
#include "intern/node/deg_node_time.h"
#include "intern/depsgraph.h"
#include "intern/depsgraph_tag.h"
namespace deg = blender::deg;
@@ -54,6 +55,7 @@ static void deg_flush_updates_and_refresh(deg::Depsgraph *deg_graph)
BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->frame);
}
deg::graph_tag_ids_for_visible_update(deg_graph);
deg::deg_graph_flush_updates(deg_graph);
deg::deg_evaluate_on_refresh(deg_graph);
}

View File

@@ -370,8 +370,6 @@ static TaskPool *deg_evaluate_task_pool_create(DepsgraphEvalState *state)
*/
void deg_evaluate_on_refresh(Depsgraph *graph)
{
graph_tag_ids_for_visible_update(graph);
/* Nothing to update, early out. */
if (graph->entry_tags.is_empty()) {
return;