View Single Post
  #2  
Old 06-22-2011, 09:25 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You should be able to call the viz.input command in a separate thread to prevent it from halting the main graphics loop. Here is a sample:
Code:
import viz
import vizact
import viztask
viz.go()

model = viz.add('logo.ive',pos=(0,1,4))
model.addAction(vizact.spin(0,1,0,90))

def GetInputTask():

	d = viz.Data()
	yield viztask.waitDirector(viz.input,'Enter string:',data=d)

	print d.returnValue

viztask.schedule(GetInputTask())
You could also add a textbox to the vizinfo box to get keyboard input.

If you ever upgrade to Vizard 4.0, it comes with a new vizhtml module that allows you to collect input from arbitrary HTML forms.
Reply With Quote