IsMesh(child)

Blitz3D Forums/Blitz3D Programming/IsMesh(child)

jfk EO-11110(Posted 2003) [#1]
How to find out if a child is a mesh or only a bone? And how to determine if the top level handle is only a pivot like eg. in animated 3DS or if it's a Mesh like in .B3D Bones Animation? How would I have to check if an entity handle is representing a mesh?


Pudding(Posted 2003) [#2]
heh, heh, I just asked pretty much the same question in the Blitz3d entity type thread!

Apparently you can't...

If there's a naming convention for bones you can check the name or you could parse the b3d file for BONE or MESH chunks (which is ridiculous if you ask me - isn't that Blitz3d's job!)

There really should be a command for this... especially since mesh commands crash if they're passed a bone instead of a mesh!!

-Pudding


fredborg(Posted 2003) [#3]
You can use a method similar to this: GetEntityType_

Additionally this might be of interest: Better error checking for CountSurfaces() and GetHandleType(handle)

Fredborg


jfk EO-11110(Posted 2003) [#4]
Thanks a lot, the TrisRendered() Method could be used. but it is really a long work around a little Problem.

I need this because my engine allows to use both: Bones animated Singlemesh Characters and Child-animated 3DS and X Characters. There are several situations where I have to access the Child-Meshes, eg. Entityalpha().

ATM I solved the Problem assuming .B3D Extensions are Bones animated and .3DS and .X are Child-Mesh animated ones. But of course this is not a proper solution since .B3D can be Child-Mesh-animated too.


Litobyte(Posted 2003) [#5]
Yes I miss really a way to determine if a .b3d is a single mesh object, or a hierarcic not animated object, or a hierarcic animated or bones animated single skinned mesh.

The only way seems to pre-parse the .b3d mesh with trial and error.

Now we have the CLASS command with help to determine if an entity is a mesh or a sprite, but nothing yet to determine before what a b3d really is.

I would need this to make a serious advanced GUI mediaviewer, with a lot of automation in it.

The thing I don't like is that if I load with loadanimmesh a single mesh, it will return entity has no animation (which corrects should be: entity has no hierarcy, because actually hierarchy .b3d models, bones or not will be loaded with the command anyway with no animation present)

A little more control would be great :P


jfk EO-11110(Posted 2003) [#6]
For me the class Command works good enough since I only need this with animated Characters. So I load them with Loadanimmesh anyway. The problem was I had no idea when I modified the Children recursively, if a specific Child was a Bone or a Mesh - as described above. That was a missed thing in this command family.