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

Hello,
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 ?

Code:
Cube1 = viz.add('theCube.ac')
so here refer to Cube1, without extra need to say Cube1.name = 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 (myScene.ac), with lets say 3 objects :
a cylinder : myCylinder
a Cube : myCube
a Sphere : mySphere

I can get to these objects with :

Code:
myScene = viz.add('myScene.ac')
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

Code:
myScene.get(viz.CHILDREN)
what should give me a list of all childs, but it does not work.
thanks for your help!

greetz
geoffrey.
Reply With Quote