diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-06 22:09:36 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-07-06 22:09:36 +0400 |
commit | 6c88a16b3a743cef95aa6c7b4ca49c173e5c77a5 (patch) | |
tree | d957c2654d8502d0d9c3e821dabad37e5a856d57 /source/blender/collada/AnimationImporter.cpp | |
parent | 1e14e2f465c749b5fe39c1a22ea562059b9fad65 (diff) |
Camera lens animation Identifying
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index e21a9370935..d35c3649ab5 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -905,7 +905,22 @@ int AnimationImporter::get_animation_type ( const COLLADAFW::Node * node , if ( type != 0) break; } - + + 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()]; + + const COLLADAFW::AnimatableFloat *xfov = &(camera->getXFov()); + const COLLADAFW::UniqueId& xfov_listid = xfov ->getAnimationList(); + + if (animlist_map.find(xfov_listid) != animlist_map.end()) + type = type|CAMERA_XFOV; + + + if ( type != 0) break; + + } + return type; } |