From cbd193261969c9b4e1f14297d5888bad2946600e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 12 Apr 2021 18:08:25 +0200 Subject: 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. --- source/blender/editors/util/ed_util_ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/util') 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; } /** \} */ -- cgit v1.2.3