chris2307
11-21-2013, 02:24 AM
Hi all,
I am having a bit of trouble identifying objects within a scene using the mouse. I have something working but it is not giving me the output I wanted or expected.
I have made a simple scene in 3DS Max which contains two balls (one named Red Ball and the other named Blue Ball). I exported the model to OSGB and loaded this up in a Vizard scene. I did not attach the separate polygons in 3DS Max but I did export the scene as one model.
In the Vizard inspector, I can see the model and select the different objects. The inspector kindly shows up "Floor" "Red Ball" and "Blue Ball" so I know this information is there.
However, when I use viz.pick(info=True) to return an object, I am able to identify the different objects when I hover my mouse over them but I don't get the names. Instead, I see "14 - Default", "15 - Default"and "09 - Default"
Here is my code:
def showPicked():
object = viz.pick(info=True)
if(object.valid):
print object.name
vizact.ontimer(0.1, showPicked)
Can anyone help me understand what is going on?
I am having a bit of trouble identifying objects within a scene using the mouse. I have something working but it is not giving me the output I wanted or expected.
I have made a simple scene in 3DS Max which contains two balls (one named Red Ball and the other named Blue Ball). I exported the model to OSGB and loaded this up in a Vizard scene. I did not attach the separate polygons in 3DS Max but I did export the scene as one model.
In the Vizard inspector, I can see the model and select the different objects. The inspector kindly shows up "Floor" "Red Ball" and "Blue Ball" so I know this information is there.
However, when I use viz.pick(info=True) to return an object, I am able to identify the different objects when I hover my mouse over them but I don't get the names. Instead, I see "14 - Default", "15 - Default"and "09 - Default"
Here is my code:
def showPicked():
object = viz.pick(info=True)
if(object.valid):
print object.name
vizact.ontimer(0.1, showPicked)
Can anyone help me understand what is going on?