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
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2022-03-25 18:52:14 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-03-25 18:53:17 +0300
commit19bcfba56fdaf11eab08a56deeec89e427a3fd0d (patch)
tree29604000df680647539253b7b9b52abe21cf2b47 /source
parent2fc77071b51a7c3ee16c50836d380ed339681992 (diff)
USD I/O: explicitly set or clear the OPTYPE_UNDO flag
Exporting USD cannot be undone, but importing should be undo'able.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/io/io_usd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index c4f1ae88d28..cf28c88edf0 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -201,6 +201,8 @@ void WM_OT_usd_export(struct wmOperatorType *ot)
ot->poll = WM_operator_winactive;
ot->ui = wm_usd_export_draw;
+ ot->flag = OPTYPE_REGISTER; /* No UNDO possible. */
+
WM_operator_properties_filesel(ot,
FILE_TYPE_FOLDER | FILE_TYPE_USD,
FILE_BLENDER,
@@ -459,6 +461,8 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
ot->poll = WM_operator_winactive;
ot->ui = wm_usd_import_draw;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
WM_operator_properties_filesel(ot,
FILE_TYPE_FOLDER | FILE_TYPE_USD,
FILE_BLENDER,