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

There are many ways you can do this. You can create a dictionary that maps an object to its name:
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' = 'Cube2' = 'Cube3'
print 'you are over object : ',
In each case you need to be careful when the mouse is over an object that you haven't named.
Reply With Quote