B3D files
Blitz3D Forums/Blitz3D Beginners Area/B3D files
| ||
Hi, How to detect if a B3D file is animated or not before use LoadMesh or LoadAnimMesh functions? Thanks! |
| ||
You would need to read through the mesh, firstly using OpenFile, and detect the presence of animation frames. If you search the code archives for Ricky Smith, he wrote a .b3d animated export code and i think a .b3d loaded for animated meshes. It would probably be quite easy to use this code and modify it to detect animation frames :o) Or, just load everything with LoadAnimMesh. You can easy check for the presence of animation frames that way :o) |
| ||
It would be far simpler to use a naming scheme on the models. like <name>.animated.b3d and <name>.unanimated.b3d then you can just check the instring presence of .animated. and use loadanimmesh but if you do an own level format for example its far simpler to store an extra byte to define that. |
| ||
Thanks a lot both. I think Ross C's solution fits better to my needs |