diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-12 18:50:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-13 11:54:01 +0300 |
commit | 8556b0da70ac5fc0c4530cc9de9238ecdf0ec678 (patch) | |
tree | d255e8548dcc2af6c89f932494b632f51ed1fe70 | |
parent | d63438e4d167149e9aa2ed958e979ea0fc534793 (diff) |
Fix T65034: Viewing material calls frame update handler
Use lower level dependency graph evaluation which doesn't run any handlers,
doesn't touch sound system, doesn't inform image editors about changes.
Should probably move such evaluation steps to a helper function in DEG module,
but that is more like a cleanup.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5067
-rw-r--r-- | source/blender/render/intern/source/external_engine.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index a41f7bbe5fc..83d857211d0 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -510,7 +510,16 @@ static void engine_depsgraph_init(RenderEngine *engine, ViewLayer *view_layer) engine->depsgraph = DEG_graph_new(scene, view_layer, DAG_EVAL_RENDER); DEG_debug_name_set(engine->depsgraph, "RENDER"); - BKE_scene_graph_update_for_newframe(engine->depsgraph, bmain); + if (engine->re->r.scemode & R_BUTS_PREVIEW) { + Depsgraph *depsgraph = engine->depsgraph; + DEG_graph_relations_update(depsgraph, bmain, scene, view_layer); + DEG_evaluate_on_framechange(bmain, depsgraph, CFRA); + DEG_ids_check_recalc(bmain, depsgraph, scene, view_layer, true); + DEG_ids_clear_recalc(bmain, depsgraph); + } + else { + BKE_scene_graph_update_for_newframe(engine->depsgraph, bmain); + } } static void engine_depsgraph_free(RenderEngine *engine) |