WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 01-26-2015, 07:15 PM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
vizinput disables keyboard?

OK another weird one... We are finding that after a script executes vizinput.choose (or vizinput.input), the keyboard is disabled so that any keydown events (including ESC) don't get detected. For example, the following code works just fine until the commented line is un-commented:

Code:
import vizinput
import viz
import vizshape
import vizact

def setVisibility(blah):
	theball.visible(blah)

viz.go()

#vizinput.choose('blah', ['fsdg','sd'])
theball = vizshape.addCircle()
theball.setPosition(0,0,4)
vizact.onkeydown('n', setVisibility, viz.TOGGLE)
no clue how to solve this one..
Reply With Quote
  #2  
Old 01-29-2015, 02:44 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The vizinput dialogs create a blocking action which will halt rendering and events. If you want the user to make selections while the script runs normally you can use one of Vizard's other GUI libraries. Does this work for you?

Code:
import vizinfo
import viz
import vizshape

viz.go()

info = vizinfo.InfoPanel('Press n to toggle visibility of the ball')
dropdown = info.addLabelItem('blah',viz.addDropList())
dropdown.addItems(['fsdg','sd'])

theball = vizshape.addCircle(pos=[0,1.5,5])
vizact.onkeydown('n', theball.visible, viz.TOGGLE)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
vizinput module missing whaleeee Vizard 1 02-05-2013 11:30 PM
User keyboard input without halting the program Zhi Vizard 2 06-23-2011 12:53 PM
Keyboard shortcuts for debugging kopper Vizard 6 03-25-2011 05:23 PM
Question about input from virtual keyboard. yyang Vizard 4 12-23-2008 12:25 PM
On Screen Keyboard betancourtb82 Vizard 14 10-03-2006 12:38 PM


All times are GMT -7. The time now is 05:38 AM.


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