WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Active scene (https://forum.worldviz.com/showthread.php?t=2149)

Chrissy2009 07-13-2009 08:08 AM

Active scene
 
Hi,

is it possible to ask for the active scene?

I want to write an if-query and only want to do actions, if the active scene is scene 2.

Thanks a lot....

farshizzo 07-13-2009 09:43 AM

Yes, the following code should do what you are asking for:
Code:

if viz.MainWindow.getView().getScene() == viz.Scene2:
        print 'Scene 2 is active'


Chrissy2009 07-13-2009 09:49 AM

Hey farshizzo,

that's it! Great - thanks a lot....


All times are GMT -7. The time now is 11:39 PM.

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