Changeset View
Changeset View
Standalone View
Standalone View
source/blender/collada/EffectExporter.cpp
| Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| KeyImageMap material_image_map; | KeyImageMap material_image_map; | ||||
| openEffect(get_effect_id(ma)); | openEffect(get_effect_id(ma)); | ||||
| COLLADASW::EffectProfile ep(mSW); | COLLADASW::EffectProfile ep(mSW); | ||||
| ep.setProfileType(COLLADASW::EffectProfile::COMMON); | ep.setProfileType(COLLADASW::EffectProfile::COMMON); | ||||
| ep.openProfile(); | ep.openProfile(); | ||||
| set_shader_type(ep, ma); | set_shader_type(ep, ma); // only Lambert allowed for now | ||||
| COLLADASW::ColorOrTexture cot; | COLLADASW::ColorOrTexture cot; | ||||
| set_diffuse_color(ep, ma); | set_diffuse_color(ep, ma); | ||||
| set_emission(ep, ma); | set_emission(ep, ma); | ||||
| set_ior(ep, ma); | set_ior(ep, ma); | ||||
| set_shininess(ep, ma); | |||||
| set_reflectivity(ep, ma); | set_reflectivity(ep, ma); | ||||
| set_transparency(ep, ma); | set_transparency(ep, ma); | ||||
| /* TODO: from where to get ambient, specular and reflective? */ | /* TODO: */ | ||||
| // set_shininess(ep, ma); shininess not supported for lambert | |||||
| // set_ambient(ep, ma); | // set_ambient(ep, ma); | ||||
| // set_specular(ep, ma); | // set_specular(ep, ma); | ||||
| // set_reflective(ep, ma); | |||||
| get_images(ma, material_image_map); | get_images(ma, material_image_map); | ||||
| std::string active_uv(getActiveUVLayerName(ob)); | std::string active_uv(getActiveUVLayerName(ob)); | ||||
| create_image_samplers(ep, material_image_map, active_uv); | create_image_samplers(ep, material_image_map, active_uv); | ||||
| #if 0 | #if 0 | ||||
| unsigned int a, b; | unsigned int a, b; | ||||
| for (a = 0, b = 0; a < tex_indices.size(); a++) { | for (a = 0, b = 0; a < tex_indices.size(); a++) { | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||