[Bf-blender-cvs] [05836d4b769] greasepencil-object: Disable undo steps that have no update cache

Falk David noreply at git.blender.org
Mon Feb 7 18:35:13 CET 2022


Commit: 05836d4b7696463d8e0a19619f35141ac10191b7
Author: Falk David
Date:   Wed Feb 2 18:53:51 2022 +0100
Branches: greasepencil-object
https://developer.blender.org/rB05836d4b7696463d8e0a19619f35141ac10191b7

Disable undo steps that have no update cache

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

M	source/blender/editors/gpencil/gpencil_undo.c

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

diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index ca29e11add5..052d85e8883 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -448,6 +448,14 @@ static bool gpencil_undosys_step_encode(struct bContext *C,
     }
   }
 
+  /* TODO: Handle this case properly once the update cache is more widly used. We avoid full-copies
+   * for now at the expense of to being able to undo them. */
+#if 1
+  if (!only_frame_changed && gpd->runtime.update_cache == NULL) {
+    return false;
+  }
+#endif
+
   us->undo_data = MEM_callocN(sizeof(GPencilUndoData), __func__);
   us->undo_data->cfra = scene->r.cfra;
   us->undo_data->mode = ob->mode;



More information about the Bf-blender-cvs mailing list