Fixes bug where animation duration and fps calculations were being
performed on animation meshes for objects without animation meshes,
leading to broken transformTo's and similar behavior. Fixes bug
by adding check for zero length arrays of animatedMesh.

Fixes #2675.