View Single Post
Old 02-09-2006, 10:07 AM
Geoffrey Geoffrey is offline
Join Date: Feb 2006
Posts: 8
another way ?

I got your point,
I tested it, and off course it works.

but cant you just refer to the name you use when adding items to the world ?

Cube1 = viz.add('')
so here refer to Cube1, without extra need to say = Cube1

In that case the error could not be made when something is not named...

Another question is (expantion of this problem):

If you have a scene (, with lets say 3 objects :
a cylinder : myCylinder
a Cube : myCube
a Sphere : mySphere

I can get to these objects with :

myScene = viz.add('')
cylinder = myScene.getchild('myCylinder')
now what I would need to do is :

I load a scene,
and when I start, I need to know at each time which object is under the 2D coordinates.
This is the same program as the first one in the thread.
The only difference is that I want every object that is in the scene to be automatically named as in the scene file.
The information is there because I can call to my subchild... but I do not know how I can acces this info in the way I need it.

I tried with

what should give me a list of all childs, but it does not work.
thanks for your help!

Reply With Quote