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:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-06-14 14:38:39 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-06-14 14:38:39 +0400
commit05a1a3169336380b51947451ebdabdf5455fe38f (patch)
tree8b5dcfdd1bb0bbee0028d2561f300c631a4e95fe /source/blender/collada/collada.cpp
parent68386ef23a2b48f4a0ece2da1d8e5f66e0ef4bf6 (diff)
Collada: Added export Option 'sort by object name' to fix an issue with Second Life import
Diffstat (limited to 'source/blender/collada/collada.cpp')
-rw-r--r--source/blender/collada/collada.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index bc03bdc970c..9a4fd44b9e9 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -59,6 +59,7 @@ int collada_export(
int include_children,
int use_object_instantiation,
+ int sort_by_name,
int second_life)
{
ExportSettings export_settings;
@@ -79,6 +80,7 @@ int collada_export(
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.sort_by_name = sort_by_name != 0;
export_settings.filepath = (char *)filepath;
int includeFilter = OB_REL_NONE;
@@ -88,6 +90,9 @@ int collada_export(
eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter);
+ if (export_settings.sort_by_name)
+ bc_bubble_sort_by_Object_name(export_settings.export_set);
+
DocumentExporter exporter(&export_settings);
exporter.exportCurrentScene(sce);