Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-13 02:05:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 02:05:33 +0400
commit2e8a2f7668e5687a0a9a5087e76eeb739c818b2b (patch)
tree75aa5fe8746df4cd369afff88c4fd367cb78f72c /source/blender/collada/collada.cpp
parent46c95d37c6fae2268a7f39f90ef46e9c3c696e3f (diff)
style cleanup
Diffstat (limited to 'source/blender/collada/collada.cpp')
-rw-r--r--source/blender/collada/collada.cpp90
1 files changed, 46 insertions, 44 deletions
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index b852190dd4c..bc03bdc970c 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -41,58 +41,60 @@ extern "C"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
- int collada_import(bContext *C, const char *filepath)
- {
- DocumentImporter imp (C, filepath);
- if (imp.import()) return 1;
+int collada_import(bContext *C, const char *filepath)
+{
+ DocumentImporter imp(C, filepath);
+ if (imp.import()) return 1;
- return 0;
- }
+ return 0;
+}
- int collada_export(
- Scene *sce,
- const char *filepath,
- int selected,
- int apply_modifiers,
-
- int include_armatures,
- int include_children,
-
- int use_object_instantiation,
- int second_life )
- {
- ExportSettings export_settings;
-
- /* annoying, collada crashes if file cant be created! [#27162] */
- if (!BLI_exists(filepath)) {
- BLI_make_existing_file(filepath); /* makes the dir if its not there */
- if (BLI_file_touch(filepath) == 0) {
- return 0;
- }
+int collada_export(
+ Scene *sce,
+ const char *filepath,
+ int selected,
+ int apply_modifiers,
+
+ int include_armatures,
+ int include_children,
+
+ int use_object_instantiation,
+ int second_life)
+{
+ ExportSettings export_settings;
+
+ /* annoying, collada crashes if file cant be created! [#27162] */
+ if (!BLI_exists(filepath)) {
+ BLI_make_existing_file(filepath); /* makes the dir if its not there */
+ if (BLI_file_touch(filepath) == 0) {
+ return 0;
}
- /* end! */
+ }
+ /* end! */
- export_settings.selected = selected != 0;
- export_settings.apply_modifiers = apply_modifiers != 0;
- export_settings.include_armatures = include_armatures != 0;
- export_settings.include_children = include_children != 0;
- export_settings.second_life = second_life != 0;
- export_settings.use_object_instantiation = use_object_instantiation != 0;
- export_settings.filepath = (char *)filepath;
+ export_settings.selected = selected != 0;
+ export_settings.apply_modifiers = apply_modifiers != 0;
+ export_settings.include_armatures = include_armatures != 0;
+ export_settings.include_children = include_children != 0;
+ export_settings.second_life = second_life != 0;
+ export_settings.use_object_instantiation = use_object_instantiation != 0;
+ export_settings.filepath = (char *)filepath;
- int includeFilter = OB_REL_NONE;
- if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE;
- if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE;
+ int includeFilter = OB_REL_NONE;
+ if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE;
+ if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE;
- eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
- export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter);
+ eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
+ export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter);
- DocumentExporter exporter(&export_settings);
- exporter.exportCurrentScene(sce);
+ DocumentExporter exporter(&export_settings);
+ exporter.exportCurrentScene(sce);
- BLI_linklist_free(export_settings.export_set, NULL);
+ BLI_linklist_free(export_settings.export_set, NULL);
- return 1;
- }
+ return 1;
+}
+
+/* end extern C */
}