View Single Post
  #2  
Old 02-09-2006, 09:27 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

There are many ways you can do this. You can create a dictionary that maps an object to its name:
Code:
nameDict = { Cube1:'Cube1',Cube2:'Cube2',Cube3:'Cube3' }
.
.
print 'you are over object : ', nameDict[info.object]
Or you could create a name attribute on the object:
Code:
Cube1.name = 'Cube1'
Cube2.name = 'Cube2'
Cube3.name = 'Cube3'
.
.
print 'you are over object : ', info.object.name
In each case you need to be careful when the mouse is over an object that you haven't named.
Reply With Quote