diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 19:59:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 20:00:36 +0300 |
commit | be5fd9c09f2539b9268f422252d9a1d01bc1769c (patch) | |
tree | 675e1a45fdecafd8ec5a4e09465dca61783f9775 /source/blender/blenkernel/intern/context.c | |
parent | 0920cb650d55b041f5178e639da82ba1f6ae956a (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/context.c')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |