diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 14:22:39 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 14:22:39 +0400 |
commit | bb851003b50077dcebe1f80703fd1ba0c0783a1d (patch) | |
tree | fa7e30416a78ed9f4e4b170d212b92beb44209c1 /source/blender/collada | |
parent | 78ea4561a4ee8ef21c0300e13cf70957a5b48aff (diff) |
Remove redundant e usage. Energy is already multiplied into exported light. Fixes potential bug (e used uninitialised, reported by Campbell Barton on IRC).
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/LightExporter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp index 12ccf77f6ad..13eb62ca969 100644 --- a/source/blender/collada/LightExporter.cpp +++ b/source/blender/collada/LightExporter.cpp @@ -67,7 +67,7 @@ void LightsExporter::operator()(Object *ob) std::string la_id(get_light_id(ob)); std::string la_name(id_name(la)); COLLADASW::Color col(la->r * la->energy, la->g * la->energy, la->b * la->energy); - float e, d, constatt, linatt, quadatt; + float d, constatt, linatt, quadatt; d = la->dist; @@ -84,7 +84,7 @@ void LightsExporter::operator()(Object *ob) // sun if (la->type == LA_SUN) { - COLLADASW::DirectionalLight cla(mSW, la_id, la_name, e); + COLLADASW::DirectionalLight cla(mSW, la_id, la_name); cla.setColor(col); cla.setConstantAttenuation(constatt); exportBlenderProfile(cla, la); @@ -92,7 +92,7 @@ void LightsExporter::operator()(Object *ob) } // hemi else if (la->type == LA_HEMI) { - COLLADASW::AmbientLight cla(mSW, la_id, la_name, e); + COLLADASW::AmbientLight cla(mSW, la_id, la_name); cla.setColor(col); cla.setConstantAttenuation(constatt); exportBlenderProfile(cla, la); @@ -100,7 +100,7 @@ void LightsExporter::operator()(Object *ob) } // spot else if (la->type == LA_SPOT) { - COLLADASW::SpotLight cla(mSW, la_id, la_name, e); + COLLADASW::SpotLight cla(mSW, la_id, la_name); cla.setColor(col); cla.setFallOffAngle(la->spotsize); cla.setFallOffExponent(la->spotblend); @@ -112,7 +112,7 @@ void LightsExporter::operator()(Object *ob) } // lamp else if (la->type == LA_LOCAL) { - COLLADASW::PointLight cla(mSW, la_id, la_name, e); + COLLADASW::PointLight cla(mSW, la_id, la_name); cla.setColor(col); cla.setConstantAttenuation(constatt); cla.setLinearAttenuation(linatt); @@ -123,7 +123,7 @@ void LightsExporter::operator()(Object *ob) // area lamp is not supported // it will be exported as a local lamp else { - COLLADASW::PointLight cla(mSW, la_id, la_name, e); + COLLADASW::PointLight cla(mSW, la_id, la_name); cla.setColor(col); cla.setConstantAttenuation(constatt); cla.setLinearAttenuation(linatt); |