View Single Post
  #8  
Old 03-19-2009, 09:11 AM
mberkes mberkes is offline
Member
 
Join Date: Mar 2009
Posts: 8
I have this code for the mouseclick:

Code:
def mouseclick(button):
	if button == viz.MOUSEBUTTON_LEFT:
		object = viz.pick()
	if object.valid():
		data = 'Selected' + items
		position = object.get(viz.POSITION)
		position[1] += 1.2
		arrow.translate(position)
		arrow.visible(viz.ON)
		#record response
		response_data.write(data)
		#flush internal buffer
		response_data.flush()

viz.callback(viz.MOUSEDOWN_EVENT,mouseclick)
#go to blank scene
vizact.whilemousedown(viz.MOUSEBUTTON_LEFT,prep)
#disable mouse navigation
viz.mouse(viz.OFF)
It just goes back to prep, and I would think that it should just repeat what happened before, but no such luck. Still can't disable the mouseclick where I need to or write data, but looking into that. There's also a lot of incomplete code in there, or unnecessary code I need to get rid of (like the arrow over objects)
Reply With Quote