bbFindChild() Problem

Archives Forums/Blitz3D SDK Programming/bbFindChild() Problem

L_Draven(Posted 2008) [#1]
Hi people, i am having problems with the funcion bbFindChild() in Visual C++.

When i try this I get "Windows has triggered a breakpoint..." (or something like this message, because i have it in spanish :-)) and the program crash.

I use the same model in B3D and FindChild command, ad works!!!.

EXAMPLE

BBMeshModel Player=bbLoadAnimMesh("data/actors/model1.b3d");
bbFindChild(Player,"Bip01 Pelvis");



Bip01 Pelivs exists of course in the model.

any idea please??

Thanks friends.


L_Draven(Posted 2008) [#2]
For the moment i made a recursive function that check all the childs of the entity (inside the childrens too) and works.

Thanks anyway friends.


Joss Adley(Posted 2008) [#3]
I'm getting similar probs using bbfindchild() with the b3d SDK..

I can use countchildren and getchild to display a (correct) list of child objects within the file, but trying to create a new mesh object using findchild throws up a "Unhandled Exception:Entity does not exist" error.

The same code works fine in b3d...

The source file ( I'm exporting .b3d file out of max9) has no boned objects or hierarchies..

Looking into it now but if anyone has experienced similar troubles gimme a shout!

Joss


Beaker(Posted 2008) [#4]
Your post makes very little sense:

"trying to create a new mesh object using findchild" - eh?

"The source file .. has no boned objects or hierarchies.." - if it has no hierarchies, how can you find any children in it?


Joss Adley(Posted 2008) [#5]
@beaker

"trying to create a new mesh object using findchild"

I'm just referring to the command mychild=bbfindchild(mymesh,"achild")



"The source file .. has no boned objects or hierarchies.."

For example, i can export a file mymesh.b3d which contains 3 objects "cube", "sphere" and "cone" and iterate through them using countchildren() and getchild() - they are all children of the parent file mymesh. I can also use findchild() to extract any of them as individual objects in blitz3D.


Beaker(Posted 2008) [#6]
Hmmm.. don't know what is wrong. All seems fine in BlitzMax.

Joss, are you using VC++ as well?


Bobysait(Posted 2008) [#7]
bbFindCHild have the same problem for me ( and another command, but I don't remeber wish one )

For the moment i made a recursive function that check all the childs of the entity (inside the childrens too) and works.


Idem.