How to unregister a key framed animationset

Started by
5 comments, last by lucky6969b 12 years, 6 months ago
Hello,
According to the MS doc, only LPD3DXANIMATIONSET can be released by UnregisterAnimationSet.
LPD3DXKEYFRAMEDANIMATIONSET has no counterparts.
The closest i can get is UnregisterAnimation.
However, What i need is to unregister the animation set, otherwise i cannot continue to add new animation sets to the controller. The space is sparse. Any lights?
Thanks
Jack
Advertisement
The keyframed animation set inherits from the animation set base class, so you can apply the unregister operation to it as well.

Niko Suni

Do I need any type casts? because as I remember in my past attempts, Unregister a key framed animationset won't let me compile. Let me confirm about it later. Thanks Jack
You can safely cast a derived class to its base class.It is possible in some cases that an explicit cast is required, but this has nothing to do with the animation classes themselves.

Niko Suni

m_pAnimSet->UnregisterAnimationset("CBSet1"); Error 1 error C2039: 'UnregisterAnimationset' : is not a member of 'ID3DXKeyframedAnimationSet' Oops.... Thanks Jack
m_pAnimSet->UnregisterAnimationset("CBSet1");
Error 1 error C2039: 'UnregisterAnimationset' : is not a member of 'ID3DXKeyframedAnimationSet'
Oops.... Thanks Jack
The UnregisterAnimationSet method is not in the animation sets to begin with - it is a method of the animation controller.

EDIT: The keyframed animation set does have its own UnregisterAnimation method, but it merely removes animation data from the set itself. The controller's UnregisterAnimationSet is an unrelated method that takes in pointer to any interface that derives from the base animation set, and removes it from the animation system regardless of the final type of the set (as long as it derives from ID3DXAnimationSet).

Niko Suni

You're right. Problem solved. Thanks a lot Jack

This topic is closed to new replies.

Advertisement