diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-27 23:08:18 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-27 23:08:18 +0400 |
commit | 90b64737f12f749b93e6a609b1b3680938ef6b85 (patch) | |
tree | 0bca86959709a5f68d3b92b5c55f006fd41949e7 /source/blender/collada/AnimationImporter.cpp | |
parent | 4a32691416a3069e468bee81c862ccb77fce0556 (diff) |
Material Diffuse Color animation COLLADA import.
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 3e56b3fb57e..dad10d91117 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -934,6 +934,12 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node , const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); Assign_color_animations( listid, AnimCurves , "specular_color" ); } + + if((animType->material & MATERIAL_DIFF_COLOR) != 0){ + const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse()); + const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); + Assign_color_animations( listid, AnimCurves , "diffuse_color" ); + } } } } @@ -1002,6 +1008,7 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD COLLADAFW::EffectCommon *efc = commonEffects[0]; types->material = setAnimType(&(efc->getShininess()),(types->material), MATERIAL_SHININESS); types->material = setAnimType(&(efc->getSpecular().getColor()),(types->material), MATERIAL_SPEC_COLOR); + types->material = setAnimType(&(efc->getDiffuse().getColor()),(types->material), MATERIAL_DIFF_COLOR); } } |