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:
authorNathan Letwory <nathan@letworyinteractive.com>2011-03-17 19:40:53 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2011-03-17 19:40:53 +0300
commita84e43c48b149593c4abfed8ad1b507f20526cc9 (patch)
treeaba9d7c3345d6dc15132d81cbd45b4662bcc0bbe /source/blender/collada/DocumentExporter.cpp
parent27abad190a6c3a30cdb109b4c555aea7faf1ea71 (diff)
COLLADA: Don't write empty libraries for geometry, lights, cameras, controllers
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r--source/blender/collada/DocumentExporter.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index cf8caabe409..f481add98ff 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -987,12 +987,16 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename)
asset.add();
// <library_cameras>
- CamerasExporter ce(&sw);
- ce.exportCameras(sce);
+ if(has_object_type(sce, OB_CAMERA)) {
+ CamerasExporter ce(&sw);
+ ce.exportCameras(sce);
+ }
// <library_lights>
- LightsExporter le(&sw);
- le.exportLights(sce);
+ if(has_object_type(sce, OB_LAMP)) {
+ LightsExporter le(&sw);
+ le.exportLights(sce);
+ }
// <library_images>
ImagesExporter ie(&sw, filename);
@@ -1007,8 +1011,10 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename)
me.exportMaterials(sce);
// <library_geometries>
- GeometryExporter ge(&sw);
- ge.exportGeom(sce);
+ if(has_object_type(sce, OB_MESH)) {
+ GeometryExporter ge(&sw);
+ ge.exportGeom(sce);
+ }
// <library_animations>
AnimationExporter ae(&sw);
@@ -1016,7 +1022,9 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename)
// <library_controllers>
ArmatureExporter arm_exporter(&sw);
- arm_exporter.export_controllers(sce);
+ if(has_object_type(sce, OB_ARMATURE)) {
+ arm_exporter.export_controllers(sce);
+ }
// <library_visual_scenes>
SceneExporter se(&sw, &arm_exporter);