From be5fd9c09f2539b9268f422252d9a1d01bc1769c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 May 2019 18:59:29 +0200 Subject: Fix T64300: Missing update of original data-block on redo Dependency graph was not yet set as active when is used by operator which is being redone. --- source/blender/blenkernel/intern/context.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/context.c') diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index dd326ba13db..9509e408fba 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -1312,7 +1312,13 @@ Depsgraph *CTX_data_depsgraph(const bContext *C) { Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); - return BKE_scene_get_depsgraph(scene, view_layer, true); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); + /* Dependency graph might have been just allocated, and hence it will not be marked. + * This confuses redo system due to the lack of flushing changes back to the original data. + * In the future we would need to check whether the CTX_wm_window(C) is in editing mode (as an + * opposite of playback-preview-only) and set active flag based on that. */ + DEG_make_active(depsgraph); + return depsgraph; } Depsgraph *CTX_data_evaluated_depsgraph(const bContext *C) -- cgit v1.2.3