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-06 22:34:01 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-06 22:34:01 +0400
commita0d4a95ff7979cbdcfe26392d1f8a6ff83f36990 (patch)
tree74e156c1e62b245fa13d4f7aebde37c10346f0bb /source/blender/collada/AnimationImporter.cpp
parent6c88a16b3a743cef95aa6c7b4ca49c173e5c77a5 (diff)
Camera lens animation import.
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index d35c3649ab5..a70e3cd8abd 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -855,6 +855,28 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node ,
}
}
}
+
+ if ( ((animType & CAMERA_XFOV) != 0) )
+ {
+ Camera * camera = (Camera*) ob->data;
+
+ if (!camera->adt || !camera->adt->action) act = verify_adt_action((ID*)&camera->id, 1);
+ else act = camera->adt->action;
+
+ ListBase *AnimCurves = &(act->curves);
+ const COLLADAFW::InstanceCameraPointerArray& nodeCameras= node->getInstanceCameras();
+
+ for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
+ const COLLADAFW::Camera *camera = (COLLADAFW::Camera *) FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
+
+ if ((animType & CAMERA_XFOV) != 0 )
+ {
+ const COLLADAFW::AnimatableFloat *xfov = &(camera->getXFov());
+ const COLLADAFW::UniqueId& listid = xfov->getAnimationList();
+ Assign_float_animations( listid ,AnimCurves, "lens");
+ }
+ }
+ }
}
//Check if object is animated by checking if animlist_map holds the animlist_id of node transforms