Vizard 7 » Command Index » Vizard modules » viz » <viz>.addScene
7.6

<viz>.addScene

Adds a new scene.

<viz>.addScene()  

Remarks

This command will create a new scene. When node objects are created (e.g. <viz>.addChild), they can be optionally placed in a different scene. The scene can be activated by applying it to the main window or any sub-window using the <window>.setScene command.

Return Value

<scene> object

Example

viz.go()

#Create new scene
myScene = viz.addScene()

#Make new scene active
viz.MainWindow.setScene(myScene)

#Add a model to the new scene
viz.addChild('gallery.osgb', scene=myScene)

See also

<window>.setScene