Finding AnimationController status when no animations

SteveG

Newcomer
Joined
Apr 21, 2004
Messages
3
Location
UK
When I use LoadHierarchyFromFile() to load an X file that contains no animation data, the resulting AnimationRootFrame still contains a valid reference to an AnimationController, but I can't find any way of discovering that there are no anims in it (and so I shouldn't try to animate it) without generating a null reference exception. All the properties and methods cause an exception.

Anyone come across a solution to this?
Ta.

- Steve
 
This is a known bug in MDX that will probably be solved for the next SDK update. Use the following workaround for the time being:

Code:
Try
    mAnimationController.ResetTime()
Catch
    mAnimationController = Nothing
End Try
 
Ah! Brilliant! I never thought of that. Thanks very much.

Kavan said:
This is a known bug in MDX that will probably be solved for the next SDK update. Use the following workaround for the time being:

Code:
Try
mAnimationController.ResetTime()
Catch
mAnimationController = Nothing
End Try
 
Back
Top