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:
authorSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-02 09:05:03 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-02 09:05:03 +0400
commit87030e6a320b6bc770ab7055e73c9d3a7dacc4f3 (patch)
treeae33a6eef2b659ef4a8cc472128e403f1f0f135f /source/blender/collada
parent52784d7e30d79765912d92ac2f09c35fa3705372 (diff)
Light Sid addressing edited.
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp14
-rw-r--r--source/blender/collada/LightExporter.cpp11
2 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 50f96926fab..243b661e6eb 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -244,8 +244,15 @@ void AnimationExporter::exportAnimations(Scene *sce)
addSampler(sampler);
- std::string target = translate_id(ob_name)
+ std::string target ;
+
+ if ( !strcmp( transformName, "color" ) )
+ target = get_light_id(ob)
+ + "/" + get_transform_sid(fcu->rna_path, -1, axis_name, true);
+ else
+ target = translate_id(ob_name)
+ "/" + get_transform_sid(fcu->rna_path, -1, axis_name, true);
+
addChannel(COLLADABU::URI(empty, sampler_id), target);
closeAnimation();
@@ -758,6 +765,8 @@ void AnimationExporter::exportAnimations(Scene *sce)
tm_type = 2;
else if (!strcmp(name, "location"))
tm_type = 3;
+ else if (!strcmp(name, "color"))
+ tm_type = 4;
else
tm_type = -1;
}
@@ -774,6 +783,9 @@ void AnimationExporter::exportAnimations(Scene *sce)
case 3:
tm_name = "location";
break;
+ case 4:
+ tm_name = "color";
+ break;
default:
tm_name = "";
break;
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp
index ebcc70013b4..860a2ae5a67 100644
--- a/source/blender/collada/LightExporter.cpp
+++ b/source/blender/collada/LightExporter.cpp
@@ -61,6 +61,7 @@ void LightsExporter::exportLights(Scene *sce)
closeLibrary();
}
+
void LightsExporter::operator()(Object *ob)
{
Lamp *la = (Lamp*)ob->data;
@@ -85,7 +86,7 @@ void LightsExporter::operator()(Object *ob)
// sun
if (la->type == LA_SUN) {
COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
- cla.setColor(col);
+ cla.setColor(col,false,"color");
cla.setConstantAttenuation(constatt);
exportBlenderProfile(cla, la);
addLight(cla);
@@ -93,7 +94,7 @@ void LightsExporter::operator()(Object *ob)
// hemi
else if (la->type == LA_HEMI) {
COLLADASW::AmbientLight cla(mSW, la_id, la_name);
- cla.setColor(col);
+ cla.setColor(col,false,"color");
cla.setConstantAttenuation(constatt);
exportBlenderProfile(cla, la);
addLight(cla);
@@ -101,7 +102,7 @@ void LightsExporter::operator()(Object *ob)
// spot
else if (la->type == LA_SPOT) {
COLLADASW::SpotLight cla(mSW, la_id, la_name);
- cla.setColor(col,false,"Color");
+ cla.setColor(col,false,"color");
cla.setFallOffAngle(la->spotsize);
cla.setFallOffExponent(la->spotblend);
cla.setConstantAttenuation(constatt);
@@ -113,7 +114,7 @@ void LightsExporter::operator()(Object *ob)
// lamp
else if (la->type == LA_LOCAL) {
COLLADASW::PointLight cla(mSW, la_id, la_name);
- cla.setColor(col);
+ cla.setColor(col,false,"color");
cla.setConstantAttenuation(constatt);
cla.setLinearAttenuation(linatt);
cla.setQuadraticAttenuation(quadatt);
@@ -124,7 +125,7 @@ void LightsExporter::operator()(Object *ob)
// it will be exported as a local lamp
else {
COLLADASW::PointLight cla(mSW, la_id, la_name);
- cla.setColor(col);
+ cla.setColor(col,false,"color");
cla.setConstantAttenuation(constatt);
cla.setLinearAttenuation(linatt);
cla.setQuadraticAttenuation(quadatt);