[Bf-blender-cvs] [ad2baacb424] undo-experiments-swap-reread-datablocks: undoexp: remove forced barrier when undoing from a non-memfile step.

Bastien Montagne noreply at git.blender.org
Sat Feb 1 19:44:19 CET 2020


Commit: ad2baacb42481c3064c8d55027e3f28d85a65b28
Author: Bastien Montagne
Date:   Fri Jan 31 15:49:30 2020 +0100
Branches: undo-experiments-swap-reread-datablocks
https://developer.blender.org/rBad2baacb42481c3064c8d55027e3f28d85a65b28

undoexp: remove forced barrier when undoing from a non-memfile step.

Given that we are now 'smartly' handling and using recalc flags of IDs,
this forced 'undo barrier' **should** not be needed anymore. Yay!

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

M	source/blender/editors/undo/memfile_undo.c

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

diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index d50aa549dfc..7083b23531f 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -163,10 +163,8 @@ static void memfile_undosys_step_decode(struct bContext *C,
      * future' we can still re-use old data. However, if *next* undo step (i.e. the one immédiately
      * in the future, the one we are comming from) is a barrier, then we have to force a complete
      * undo.
-     * Likewise, if next step (the one we are comming from) was a non-memfile one, there is no
-     * guarantee that current bmain data actually reflects the status of unchanged datablocks in
-     * memfile, since changes might have been flushed to current bmain data without triggering any
-     * memfile step storage (typical common case e.g. when using edit modes).
+     * Note that non-memfile undo steps **should** not be an issue anymore, since we handle
+     * fine-grained update flags now.
      */
     BLI_assert(undo_direction < 0);
     UndoStep *us_next = us_p->next;
@@ -174,9 +172,6 @@ static void memfile_undosys_step_decode(struct bContext *C,
       if (us_next->use_old_bmain_data == false) {
         use_old_bmain_data = false;
       }
-      if (us_next->type != BKE_UNDOSYS_TYPE_MEMFILE) {
-        use_old_bmain_data = false;
-      }
     }
   }



More information about the Bf-blender-cvs mailing list