IO: support Presets in Alembic, Collada, OBJ, STL, USD importers
The exporters already had Preset functionality, but the importers did not.
This commit is contained in:
parent
499af28a35
commit
25b745ae85
|
@ -658,7 +658,7 @@ void WM_OT_alembic_import(wmOperatorType *ot)
|
|||
ot->name = "Import Alembic";
|
||||
ot->description = "Load an Alembic archive";
|
||||
ot->idname = "WM_OT_alembic_import";
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_PRESET;
|
||||
|
||||
ot->invoke = wm_alembic_import_invoke;
|
||||
ot->exec = wm_alembic_import_exec;
|
||||
|
|
|
@ -770,14 +770,12 @@ void WM_OT_collada_import(wmOperatorType *ot)
|
|||
ot->name = "Import COLLADA";
|
||||
ot->description = "Load a Collada file";
|
||||
ot->idname = "WM_OT_collada_import";
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_PRESET;
|
||||
|
||||
ot->invoke = WM_operator_filesel;
|
||||
ot->exec = wm_collada_import_exec;
|
||||
ot->poll = WM_operator_winactive;
|
||||
|
||||
// ot->flag = OPTYPE_PRESET;
|
||||
|
||||
ot->ui = wm_collada_import_draw;
|
||||
|
||||
WM_operator_properties_filesel(ot,
|
||||
|
|
|
@ -492,7 +492,7 @@ void WM_OT_obj_import(struct wmOperatorType *ot)
|
|||
ot->name = "Import Wavefront OBJ";
|
||||
ot->description = "Load a Wavefront OBJ scene";
|
||||
ot->idname = "WM_OT_obj_import";
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_PRESET;
|
||||
|
||||
ot->invoke = wm_obj_import_invoke;
|
||||
ot->exec = wm_obj_import_exec;
|
||||
|
|
|
@ -95,7 +95,7 @@ void WM_OT_stl_import(struct wmOperatorType *ot)
|
|||
ot->exec = wm_stl_import_execute;
|
||||
ot->poll = WM_operator_winactive;
|
||||
ot->check = wm_stl_import_check;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_PRESET;
|
||||
|
||||
WM_operator_properties_filesel(ot,
|
||||
FILE_TYPE_FOLDER,
|
||||
|
|
|
@ -500,7 +500,7 @@ 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;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_PRESET;
|
||||
|
||||
WM_operator_properties_filesel(ot,
|
||||
FILE_TYPE_FOLDER | FILE_TYPE_USD,
|
||||
|
|
Loading…
Reference in New Issue