You may try to use AnimLength(mesh). When used with a static mesh (not loaded with LoadAnimMesh, but eg. CreateCube) it will return -1.There is a problem with 3ds meshes saved in 3dsmax. Eg. a simple cube that was saved as a static mesh, will claim to have 100 animation frames when used with LoadAnimMesh and AnimLength. THe reason why is, the timeline of 3ds max is 100 frames by default, and they are saved, even when you don't animate the object and there are no keyframes. And you can even "Animate" it, although there is no animation data inside other than a number of empty frames.
However, when used with a a mesh that doesn't contain any animation, like eg. a b3d file saved by maplet, the AnimLength will be -1 as well.
I don't know if there's a way in todays 3ds max to avoind saving animation frames in 3ds, other then setting the lenght of the animation to zero.
|