diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2012-06-13 01:25:29 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2012-06-13 01:25:29 +0400 |
commit | 36ed4818e5944dfb6ae7a71377f3bee4cba5a899 (patch) | |
tree | 6d852907a52c0ae5b7907678690db39ee1420b77 /source/blender/collada/LightExporter.cpp | |
parent | 5dc0b35a019651e052c7770330aafc7f2d7fb690 (diff) |
patch #31794 Collada: make exporter more robust, now uses BKE_object_relational_superset()
Diffstat (limited to 'source/blender/collada/LightExporter.cpp')
-rw-r--r-- | source/blender/collada/LightExporter.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp index 6d276cd782f..44306616a85 100644 --- a/source/blender/collada/LightExporter.cpp +++ b/source/blender/collada/LightExporter.cpp @@ -36,16 +36,15 @@ #include "collada_internal.h" template<class Functor> -void forEachLampObjectInScene(Scene *sce, Functor &f, bool export_selected) +void forEachLampObjectInExportSet(Scene *sce, Functor &f, LinkNode *export_set) { - Base *base= (Base*) sce->base.first; - while (base) { - Object *ob = base->object; + LinkNode *node; + for (node=export_set; node; node = node->next) { + Object *ob = (Object *)node->link; - if (ob->type == OB_LAMP && ob->data && !(export_selected && !(ob->flag & SELECT))) { + if (ob->type == OB_LAMP && ob->data) { f(ob); } - base= base->next; } } @@ -55,7 +54,7 @@ void LightsExporter::exportLights(Scene *sce) { openLibrary(); - forEachLampObjectInScene(sce, *this, this->export_settings->selected); + forEachLampObjectInExportSet(sce, *this, this->export_settings->export_set); closeLibrary(); } |