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>2018-06-08 09:10:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-08 09:10:35 +0300
commit908b6960c01ffb1665af56ff6f03aaa3eac5366a (patch)
treedb609864fbe601073212b4c37541a7965ea96ea5 /source/blender/collada/LightExporter.cpp
parentd352a0adc5dadd0bfdc3b1b1ac76d92be689966b (diff)
parenta25c11fd8d602236f36c34c342453149bdc1d909 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/collada/LightExporter.cpp')
-rw-r--r--source/blender/collada/LightExporter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp
index d17941574d7..11377e06ce8 100644
--- a/source/blender/collada/LightExporter.cpp
+++ b/source/blender/collada/LightExporter.cpp
@@ -54,9 +54,9 @@ LightsExporter::LightsExporter(COLLADASW::StreamWriter *sw, const ExportSettings
void LightsExporter::exportLights(Scene *sce)
{
openLibrary();
-
+
forEachLampObjectInExportSet(sce, *this, this->export_settings->export_set);
-
+
closeLibrary();
}
@@ -67,11 +67,11 @@ void LightsExporter::operator()(Object *ob)
std::string la_name(id_name(la));
COLLADASW::Color col(la->r * la->energy, la->g * la->energy, la->b * la->energy);
float d, constatt, linatt, quadatt;
-
+
d = la->dist;
-
+
constatt = 1.0f;
-
+
if (la->falloff_type == LA_FALLOFF_INVLINEAR) {
linatt = 1.0f / d;
quadatt = 0.0f;
@@ -80,7 +80,7 @@ void LightsExporter::operator()(Object *ob)
linatt = 0.0f;
quadatt = 1.0f / (d * d);
}
-
+
// sun
if (la->type == LA_SUN) {
COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
@@ -130,7 +130,7 @@ void LightsExporter::operator()(Object *ob)
exportBlenderProfile(cla, la);
addLight(cla);
}
-
+
}
bool LightsExporter::exportBlenderProfile(COLLADASW::Light &cla, Lamp *la)
@@ -164,6 +164,6 @@ bool LightsExporter::exportBlenderProfile(COLLADASW::Light &cla, Lamp *la)
cla.addExtraTechniqueParameter("blender", "area_size", la->area_size);
cla.addExtraTechniqueParameter("blender", "area_sizey", la->area_sizey);
cla.addExtraTechniqueParameter("blender", "area_sizez", la->area_sizez);
-
+
return true;
}