diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-07-05 17:54:25 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-07-05 17:54:25 +0400 |
commit | 3f3c6f5f1fb336f8f0015d7857a1ae153fa2a80f (patch) | |
tree | 27e2ae66dd589013c24592fe0803b440a7e014be /source/blender/collada/LightExporter.cpp | |
parent | 887fd19894047832fbb7a7300e5fc11438b1f3b2 (diff) | |
parent | ccd31900ab9659b6fdc035fd91bff9f508334e22 (diff) |
Merging from trunk up to r38119.
Diffstat (limited to 'source/blender/collada/LightExporter.cpp')
-rw-r--r-- | source/blender/collada/LightExporter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp index c3f850dd0cb..3258b63b0c3 100644 --- a/source/blender/collada/LightExporter.cpp +++ b/source/blender/collada/LightExporter.cpp @@ -38,13 +38,14 @@ #include "collada_internal.h" template<class Functor> -void forEachLampObjectInScene(Scene *sce, Functor &f) +void forEachLampObjectInScene(Scene *sce, Functor &f, bool export_selected) { Base *base= (Base*) sce->base.first; while(base) { Object *ob = base->object; - if (ob->type == OB_LAMP && ob->data) { + if (ob->type == OB_LAMP && ob->data + && !(export_selected && !(ob->flag & SELECT))) { f(ob); } base= base->next; @@ -53,11 +54,11 @@ void forEachLampObjectInScene(Scene *sce, Functor &f) LightsExporter::LightsExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryLights(sw){} -void LightsExporter::exportLights(Scene *sce) +void LightsExporter::exportLights(Scene *sce, bool export_selected) { openLibrary(); - forEachLampObjectInScene(sce, *this); + forEachLampObjectInScene(sce, *this, export_selected); closeLibrary(); } |