WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-17-2007, 06:24 AM
Murilo Murilo is offline
Member
 
Join Date: Nov 2007
Posts: 2
Visible On/Off for a "menu"

Hi... I'm trying to make visible or not pushing a key for a future menu...

Code:
import viz
viz.go()

menuScene = viz.addScene()

menuView = viz.addView()
menuView.setScene(menuScene)

menuWindow = viz.addWindow()
menuWindow.setClearMask(viz.GL_DEPTH_BUFFER_BIT)
menuWindow.setPosition(0,1)
menuWindow.setSize(1,1)
menuWindow.viewpoint(menuView)

#Create root node for menu quads
menu = viz.addGroup(scene = menuScene)
menu.translate(0,1.8,5)

#Create texture to apply to quads
tex = viz.addTexture('ball.jpg')

quad = viz.addTexQuad(parent=menu)
quad.texture(tex)
quad.alpha(0.7)

	
vizact.onkeydown( 'a', menuScene.visible(viz.ON) )
vizact.onkeydown( 's', menuScene.visible(viz.OFF) )



viz.add('gallery.ive')
When I push 'a' or 's', show this:
Traceback (most recent call last):
File "C:\Arquivos de programas\WorldViz\Vizard30/python\vizact.py", line 2667, in __onkeydown
self._callGroup(self.__keydownmap[key])
File "C:\Arquivos de programas\WorldViz\Vizard30/python\vizact.py", line 2619, in _callGroup
val = e.call(arg)
File "C:\Arquivos de programas\WorldViz\Vizard30/python\vizact.py", line 2470, in _callStatic
return self.func(*self.args,**self.kwargs)
TypeError: 'NoneType' object is not callable

What can I do!?
thanks,
Murilo
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
Visible and alpha commands mjabon Vizard 1 08-27-2007 09:21 AM
texblend or visible for multiple textures vizmaster Vizard 10 02-14-2007 03:50 PM
on/off button bailenson Vizard 1 09-28-2004 05:13 PM


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


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