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:
Nathan Letwory
2011-09-07 18:23:30 +00:00
parent a1277508cc
commit 3dc0ee19c4
22 changed files with 179 additions and 94 deletions

View File

@@ -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;
}