Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-04-12 19:08:25 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-04-12 19:08:25 +0300
commitcbd193261969c9b4e1f14297d5888bad2946600e (patch)
treeb57b5ad436111fb2fecc5caf1391dbaa5319f54a /source/blender/editors/util
parent15253d18b75ebb3b78c022fcd19951151121aaba (diff)
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.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util_ops.cc2
1 files changed, 1 insertions, 1 deletions
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;
}
/** \} */