WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   displaymode() problem (https://forum.worldviz.com/showthread.php?t=1612)

Jerry 08-20-2008 11:18 AM

displaymode() problem
 
I am using the ProcessUtil module to start a script from within another
script.

The main script is
Code:

from viz import *
import ProcessUtil

go(STEREO | HMD)

g = add('gallery.ive')
       
def onKeyDown(key):       
        if key == KEY_RETURN:
                ProcessUtil.runScript('foo.py')

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)

and the script it runs (foo.py) is
Code:

from viz import *

displaymode(1280,480,16,60)

go(HMD | STEREO)

g = add('court.ive')

The problem is that each time you press RETURN to run foo.py,
when you exit from foo.py and return to the main script
the viewpoint is raised relative to what it was before foo.py was run.

If you comment out the displaymode line in foo.py the problem goes
away, but it will have to remain in the actual application I am using.
Any suggestions on how to fix this?


All times are GMT -7. The time now is 10:41 PM.

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