Cloning Animation

smernesto

22-12-2007 04:34:14

I am using Mogre for Ogre 1.4.3. Used the Debug and Release .dll files.

I create a scenemanager, create a SceneNode and an Animation all this with the created SceneManager, I create some NodeAnimationTracks and Keyframes with the Animation, then I clone the Animation, the documentation says that when I clone the Animation the responsibility of that object is of the code that clone the Animation.
When I destroy the SceneManager and create a new One, my cloned Animation have the NodeAnimationTrack objects, but those tracks are in an inconsistent state.

When, for example I try to get the NumKeyFrames of a NodeAnimationTrack, I got a NullReferenceException because _native is null. I don´t know if this is important but the _createdByCLR = false.

mogreanimationtrack.cpp

unsigned short AnimationTrack::NumKeyFrames::get()
{
return static_cast<const Ogre::AnimationTrack*>(_native)->getNumKeyFrames( );
}


In the ogre.log there is not information about this.

Thanks

Ernesto

smernesto

23-12-2007 22:33:58

I solve it, well maybe I was doing something wrong, I am using Animation for get the tracks and now it works.