From 9676a1f61ebeffb3013f8fa0a56ce6e8747fb3c5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Apr 2021 15:02:30 +0200 Subject: Fix render crash in some .blend files after Persistent Data changes Must always clear recalc flags, even if no editors use them, the depsgraph execution itself also depends on them. --- source/blender/depsgraph/intern/depsgraph_tag.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'source/blender/depsgraph') diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 504c3956d03..d658fcce08a 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -828,18 +828,17 @@ void DEG_editors_update( Main *bmain, Depsgraph *depsgraph, Scene *scene, ViewLayer *view_layer, bool time) { deg::Depsgraph *graph = (deg::Depsgraph *)depsgraph; - if (!graph->use_editors_update) { - return; - } - bool updated = time || DEG_id_type_any_updated(depsgraph); + if (graph->use_editors_update) { + bool updated = time || DEG_id_type_any_updated(depsgraph); - DEGEditorUpdateContext update_ctx = {nullptr}; - update_ctx.bmain = bmain; - update_ctx.depsgraph = depsgraph; - update_ctx.scene = scene; - update_ctx.view_layer = view_layer; - deg::deg_editors_scene_update(&update_ctx, updated); + DEGEditorUpdateContext update_ctx = {nullptr}; + update_ctx.bmain = bmain; + update_ctx.depsgraph = depsgraph; + update_ctx.scene = scene; + update_ctx.view_layer = view_layer; + deg::deg_editors_scene_update(&update_ctx, updated); + } DEG_ids_clear_recalc(depsgraph); } -- cgit v1.2.3