Commit: b27b33f81179cb8ec498b9186cd7af5db24f10b8
Author: Sybren A. Stüvel
Date:   Mon Apr 12 18:08:25 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rBb27b33f81179cb8ec498b9186cd7af5db24f10b8

Previews: allow undo'ing datablock preview generation

Allow users to undo the effect of the "Generate Preview" operator in the
asset browser (`ED_OT_lib_id_generate_preview`). Without this, the
button is too dangerous.

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

M       source/blender/editors/util/ed_util_ops.cc

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

diff --git a/source/blender/editors/util/ed_util_ops.cc 
b/source/blender/editors/util/ed_util_ops.cc
index 06f1b999d58..462f7768f81 100644
--- a/source/blender/editors/util/ed_util_ops.cc
+++ b/source/blender/editors/util/ed_util_ops.cc
@@ -149,7 +149,7 @@ static void ED_OT_lib_id_generate_preview(wmOperatorType 
*ot)
   ot->exec = lib_id_generate_preview_exec;
 
   /* flags */
-  ot->flag = OPTYPE_INTERNAL;
+  ot->flag = OPTYPE_INTERNAL | OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 /** \} */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to