[Bf-blender-cvs] [be5fd9c09f2] master: Fix T64300: Missing update of original data-block on redo

Sergey Sharybin noreply at git.blender.org
Fri May 17 19:01:17 CEST 2019


Commit: be5fd9c09f2539b9268f422252d9a1d01bc1769c
Author: Sergey Sharybin
Date:   Fri May 17 18:59:29 2019 +0200
Branches: master
https://developer.blender.org/rBbe5fd9c09f2539b9268f422252d9a1d01bc1769c

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.

===================================================================

M	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)



More information about the Bf-blender-cvs mailing list