PDA

View Full Version : Active scene


Chrissy2009
07-13-2009, 08:08 AM
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: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....