USD I/O: explicitly set or clear the OPTYPE_UNDO flag

Exporting USD cannot be undone, but importing should be undo'able.
This commit is contained in:
Sybren A. Stüvel
2022-03-25 16:52:14 +01:00
parent 2fc77071b5
commit 19bcfba56f

View File

@@ -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,