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-13 20:53:36 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-13 20:53:36 +0400
commit49d01fb30de6ed5c6d68cb204de52f5db2f7e649 (patch)
tree48cd7bfd6286f789f648ff1ec13eecc655d97fc6 /source/blender/collada/AnimationImporter.cpp
parentf12614234a02bee3daa118d429bc37e5be4b932c (diff)
Fixed Color animation import( support for Maya )
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index c84cf3d9ee4..3faad447e9a 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -103,6 +103,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
switch (dim) {
case 1: // X, Y, Z or angle
case 3: // XYZ
+ case 4:
case 16: // matrix
{
for (i = 0; i < dim; i++ ) {
@@ -684,8 +685,10 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::AnimationList:
modify_fcurve(curves, rna_path, 2 );
break;
case COLLADAFW::AnimationList::COLOR_RGB:
+ case COLLADAFW::AnimationList::COLOR_RGBA:
modify_fcurve(curves, rna_path, -1 );
break;
+
default:
fprintf(stderr, "AnimationClass %d is not supported for %s.\n",
binding->animationClass, "COLOR" );
@@ -885,6 +888,21 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node ,
const COLLADAFW::UniqueId& listid = xmag->getAnimationList();
Assign_float_animations( listid ,AnimCurves, "ortho_scale");
}
+
+ if ((animType->camera & CAMERA_ZFAR) != 0 )
+ {
+ const COLLADAFW::AnimatableFloat *zfar = &(camera->getFarClippingPlane());
+ const COLLADAFW::UniqueId& listid = zfar->getAnimationList();
+ Assign_float_animations( listid ,AnimCurves, "clipend");
+ }
+
+ if ((animType->camera & CAMERA_ZNEAR) != 0 )
+ {
+ const COLLADAFW::AnimatableFloat *znear = &(camera->getNearClippingPlane());
+ const COLLADAFW::UniqueId& listid = znear->getAnimationList();
+ Assign_float_animations( listid ,AnimCurves, "clipsta");
+ }
+
}
}
}