From 19bcfba56fdaf11eab08a56deeec89e427a3fd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 25 Mar 2022 16:52:14 +0100 Subject: [PATCH] USD I/O: explicitly set or clear the OPTYPE_UNDO flag Exporting USD cannot be undone, but importing should be undo'able. --- source/blender/editors/io/io_usd.c | 4 ++++ 1 file changed, 4 insertions(+) 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,