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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to