How to unregister a key framed animationset

This topic is 2623 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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

Share on other sites
The keyframed animation set inherits from the animation set base class, so you can apply the unregister operation to it as well.

Share on other sites
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

Share on other sites
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.

Share on other sites
Hidden
 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

Share on other sites
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).

Share on other sites
You're right. Problem solved. Thanks a lot Jack

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• Forum Statistics

• Total Topics
633685
• Total Posts
3013320
×