diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-17 20:39:19 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-17 20:39:19 +0400 |
commit | 6b6c2bd17f85f9a0aa8481c6eb4f735f36c65436 (patch) | |
tree | 03830d2e66f3ccf3ac3ee0f2871d5be25a113313 /source | |
parent | a0b769ce0efdb54b8c775aff486319be858dba74 (diff) |
Set material Sid addressing.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/collada/EffectExporter.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index f51330165f3..355e384d000 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -94,10 +94,10 @@ void EffectsExporter::writeBlinn(COLLADASW::EffectProfile &ep, Material *ma) COLLADASW::ColorOrTexture cot; ep.setShaderType(COLLADASW::EffectProfile::BLINN); // shininess - ep.setShininess(ma->har); + ep.setShininess(ma->har, false , "shininess"); // specular cot = getcol(ma->specr, ma->specg, ma->specb, 1.0f); - ep.setSpecular(cot); + ep.setSpecular(cot, false , "specular" ); } void EffectsExporter::writeLambert(COLLADASW::EffectProfile &ep, Material *ma) @@ -111,10 +111,10 @@ void EffectsExporter::writePhong(COLLADASW::EffectProfile &ep, Material *ma) COLLADASW::ColorOrTexture cot; ep.setShaderType(COLLADASW::EffectProfile::PHONG); // shininess - ep.setShininess(ma->har); + ep.setShininess(ma->har , false , "shininess" ); // specular cot = getcol(ma->specr, ma->specg, ma->specb, 1.0f); - ep.setSpecular(cot); + ep.setSpecular(cot, false , "specular" ); } void EffectsExporter::operator()(Material *ma, Object *ob) @@ -150,10 +150,10 @@ void EffectsExporter::operator()(Material *ma, Object *ob) // index of refraction if (ma->mode & MA_RAYTRANSP) { - ep.setIndexOfRefraction(ma->ang); + ep.setIndexOfRefraction(ma->ang, false , "index_of_refraction"); } else { - ep.setIndexOfRefraction(1.0f); + ep.setIndexOfRefraction(1.0f, false , "index_of_refraction"); } COLLADASW::ColorOrTexture cot; @@ -161,22 +161,22 @@ void EffectsExporter::operator()(Material *ma, Object *ob) // transparency if (ma->mode & MA_TRANSP) { // Tod: because we are in A_ONE mode transparency is calculated like this: - ep.setTransparency(ma->alpha); + ep.setTransparency(ma->alpha, false , "transparency"); // cot = getcol(1.0f, 1.0f, 1.0f, 1.0f); // ep.setTransparent(cot); } // emission cot=getcol(ma->emit, ma->emit, ma->emit, 1.0f); - ep.setEmission(cot); + ep.setEmission(cot, false , "emission"); // diffuse multiplied by diffuse intensity cot = getcol(ma->r * ma->ref, ma->g * ma->ref, ma->b * ma->ref, 1.0f); - ep.setDiffuse(cot); + ep.setDiffuse(cot, false , "diffuse"); // ambient cot = getcol(ma->ambr, ma->ambg, ma->ambb, 1.0f); - ep.setAmbient(cot); + ep.setAmbient(cot, false , "ambient"); // reflective, reflectivity if (ma->mode & MA_RAYMIRROR) { @@ -193,7 +193,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob) // specular if (ep.getShaderType() != COLLADASW::EffectProfile::LAMBERT) { cot = getcol(ma->specr * ma->spec, ma->specg * ma->spec, ma->specb * ma->spec, 1.0f); - ep.setSpecular(cot); + ep.setSpecular(cot, false , "specular"); } // XXX make this more readable if possible @@ -274,19 +274,19 @@ void EffectsExporter::operator()(Material *ma, Object *ob) // color if (t->mapto & (MAP_COL | MAP_COLSPEC)) { - ep.setDiffuse(createTexture(ima, uvname, sampler)); + ep.setDiffuse(createTexture(ima, uvname, sampler), false , "diffuse"); } // ambient if (t->mapto & MAP_AMB) { - ep.setAmbient(createTexture(ima, uvname, sampler)); + ep.setAmbient(createTexture(ima, uvname, sampler), false , "ambient"); } // specular if (t->mapto & MAP_SPEC) { - ep.setSpecular(createTexture(ima, uvname, sampler)); + ep.setSpecular(createTexture(ima, uvname, sampler), false , "specular"); } // emission if (t->mapto & MAP_EMIT) { - ep.setEmission(createTexture(ima, uvname, sampler)); + ep.setEmission(createTexture(ima, uvname, sampler), false , "emission"); } // reflective if (t->mapto & MAP_REF) { |