Count Mesh Animations?
Blitz3D Forums/Blitz3D Programming/Count Mesh Animations?
| ||
Hi all. Is there a way ( or a hacky way even ) for that fact to count how many total animation frames a mesh has? and then return it in a function? ( I'm using this for a totally new animation system that I'm writing ) Thanks all! =) ~GF |
| ||
You can count how many frames there are in an animation sequence with AnimLength() and you can also get the current animation frame number with AnimTime() |
| ||
Thanks, but what I'm looking for is either a way, or a hacky way to return the TOTAL amount of frames in a mesh. ~GF |
| ||
In this case you probably need to read the .b3d file... |
| ||
Is there any demo of counting the total amount of frames in a 3D mesh? ( B3D, X, 3DS) ? ~GF |
| ||
Without looking too closely I think the mak/anim sample does that. So load the file and use AnimLength perhaps? |
| ||
OMFG! THANK you! I have been trying for a day & a half now to figure this one out! ~GF |
| ||
So basically... G_beast = LoadAnimMesh( "media\Beast\beast.b3d" ) ; Animations will be set to anim sequence zero at this point. This anim sequence will contain all the animation frames in the model. num_total_anim_frames = AnimLength ( G_beast ) Useful if you're making an editor or something similar I imagine. -- You could also presumably change the animation sequence using 'Animate' and get the count of a specific sequence. Somewhat redundant though, as you need to know the start and end frame indexes to set the animation sequence to begin with and could calculate the length. |
| ||
Basically. Thanks guys! =D This helps ALOT! =D ~GF |