Only one large animation in file, how to use?

Well I have a ogre xml model with only ONE large animation in it. In this animation there are several animations in it, and I have the information where the start and the end frame for each one is. How would I be best able to use this with the current animation system? Is there some kind of possibility to define the animationparts with the framevalues via code?

Hm, you could do it via a locator and loader. So that you don’t just load the file at once but can give paths in it, e.g. /Animations/animfilename/animname.anm

Also there is a setTime method on the animChannel.



You could have some kind of helper that loads the time data and return the time of each anim like AnimHelper.getTime(“anim 1”);

so to play a specific anim you would go

[java]

channel.setAnim(“nameOfTheBigAnim”);

channel.setTime(AnimHelper.getTime(“anim 1”));

[/java]



this requires to have the complete anim loaded though.

Heh, yeah the question is whats the issue? :slight_smile: Like do you not want to load it all at once due to memory or…?

No, the problem is, that it is like frame 0-20 idle frame 20-50 running ect, and I of course want to sepcify what I want to run. With the set time it might be possible, if I write some kind of custom animation system using that around the normal one.

Aah, ok. I’d try and separate it into single animations in blender then. Just copy the range of keyframes to a new anmiations at 0