Introduce struct for export settings in COLLADA export code. This will make it easier to
add new options without having to change function signatures all over the place.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
/* COLLADABU_ASSERT, may be able to remove later */
|
||||
#include "COLLADABUPlatform.h"
|
||||
|
||||
#include "ExportSettings.h"
|
||||
#include "DocumentExporter.h"
|
||||
#include "DocumentImporter.h"
|
||||
|
||||
@@ -53,7 +54,10 @@ extern "C"
|
||||
|
||||
int collada_export(Scene *sce, const char *filepath, int selected)
|
||||
{
|
||||
DocumentExporter exp;
|
||||
ExportSettings export_settings;
|
||||
|
||||
export_settings.selected = selected != 0;
|
||||
export_settings.filepath = (char *)filepath;
|
||||
|
||||
/* annoying, collada crashes if file cant be created! [#27162] */
|
||||
if(!BLI_exist(filepath)) {
|
||||
@@ -64,7 +68,8 @@ extern "C"
|
||||
}
|
||||
/* end! */
|
||||
|
||||
exp.exportCurrentScene(sce, filepath, selected);
|
||||
DocumentExporter exporter(&export_settings);
|
||||
exporter.exportCurrentScene(sce);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user