WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling User Input ohad Vizard 1 03-15-2010 05:16 PM
Question about input from virtual keyboard. yyang Vizard 4 12-23-2008 12:25 PM
Timer vs. Keyboard input Wenamun Vizard 1 01-23-2006 09:04 PM
User Input Hodge1620 Vizard 2 11-17-2005 06:58 AM
user input problem Jerry Vizard 1 11-16-2005 03:15 PM


All times are GMT -7. The time now is 08:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC