Alembic: Enable operator presets when exporting

This patch enables operator presets for Alembic exports.
The export menu has many options, so enabling the feature
will help users manage their export settings in the same
way they can with other filetypes.

This also fixes restoring the default operator value for
setting the frame range.

Differential Revision: https://developer.blender.org/D12849
This commit is contained in:
Ethan-Hall 2022-05-03 22:54:46 +02:00 committed by Kévin Dietrich
parent 04df0a3b8c
commit 1d668b6356
Notes: blender-bot 2023-02-14 06:00:44 +01:00
Referenced by commit 9bb7de274d, USD: Enable operator presets when exporting
1 changed files with 2 additions and 1 deletions

View File

@ -282,6 +282,7 @@ void WM_OT_alembic_export(wmOperatorType *ot)
ot->poll = WM_operator_winactive;
ot->ui = wm_alembic_export_draw;
ot->check = wm_alembic_export_check;
ot->flag |= OPTYPE_PRESET;
WM_operator_properties_filesel(ot,
FILE_TYPE_FOLDER | FILE_TYPE_ALEMBIC,
@ -475,7 +476,7 @@ void WM_OT_alembic_export(wmOperatorType *ot)
/* This dummy prop is used to check whether we need to init the start and
* end frame values to that of the scene's, otherwise they are reset at
* every change, draw update. */
RNA_def_boolean(ot->srna, "init_scene_frame_range", false, "", "");
RNA_def_boolean(ot->srna, "init_scene_frame_range", true, "", "");
}
/* ************************************************************************** */