diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-18 23:32:51 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-18 23:32:51 +0400 |
commit | 2fb7dbd60c4d031e9a79ef7e8f731e7615443b32 (patch) | |
tree | 2423d049b6f1d5c0f519677bebbdd7e3b3ad7d95 /source/blender/collada/AnimationImporter.cpp | |
parent | 0dcc7d05abe9d1557675c63e07f8b5ff3cb49ec3 (diff) |
Material Specular Hardness Animation import (ongoing)
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 3faad447e9a..129f3192ce2 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -966,6 +966,20 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD if ( types->camera != 0) break; } + + const COLLADAFW::InstanceGeometryPointerArray& nodeGeoms = node->getInstanceGeometries(); + for (unsigned int i = 0; i < nodeGeoms.getCount(); i++) { + const COLLADAFW::MaterialBindingArray& matBinds = nodeGeoms[i]->getMaterialBindings(); + for (unsigned int j = 0; i < matBinds.getCount(); i++) { + const COLLADAFW::Material *mat = (COLLADAFW::Material *) FW_object_map[matBinds[i].getReferencedMaterial()]; + const COLLADAFW::Effect *ef = (COLLADAFW::Effect *) FW_object_map[mat->getInstantiatedEffect()]; + const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects(); + for (unsigned int k = 0; i < commonEffects.getCount(); i++) { + types->material = setAnimType(&(commonEffects[i]->getShininess()),(types->material), MATERIAL_SHININESS); + } + } + + } return types; } |