removeAnimation

Minor issues with the Ogre API that can be trivial to fix
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

removeAnimation

Post by mkultra333 »

removeAnimation requires you give it a string name. It should be able to take pointers or indexes as well.

Have to do a getAnimation(0)->getName() at the moment.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Re: removeAnimation

Post by mkultra333 »

Hi taurruslevy... err... are you spam?
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 535

Re: removeAnimation

Post by Kojack »

Can't you simply use 'removeAllAnimationStates' ? It takes no parameters and does the work just fine.
removeAllAnimationStates is for mass deleting AnimationState objects.
removeAnimation is for removing a single Animation object.
Animation and AnimationState are different classes, plus doing a mass delete is annoying if you only want to remove one object.

(removeAnimationState is also missing the pointer version, so should be fixed too)
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Re: removeAnimation

Post by mkultra333 »

What Kojack said.

Sorry taurruslevy, your response if fairly relevant but your sig is an ad and it's your first response, so I'm a little suspicous. We live in paranoid times.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.