#1
|
|||
|
|||
Droplist for different scenes
Hello
It is possible to create a droplist to visualize different scenes, like in the i-SpaceDemo.exe. This mean that when i select Scene1 in the droplist the Scene1.osgb loads, and when I select Scene2 in the droplist the Scene2.osgb loads. I am a little bit lost with this problem |
#2
|
|||
|
|||
You could add the environment models to different scenes when the script loads and swap scenes in the droplist callback function:
Code:
import viz import vizact viz.go() gallery = viz.addChild('gallery.osgb', scene=1) dojo = viz.addChild('dojo.osgb',scene=2) dropList = viz.addDropList(parent=viz.ORTHO,scale=[0.75]*3) dropList.addItems(['Gallery','Dojo']) viz.link(viz.MainWindow.RightTop, dropList, offset=[-150,-50,0]) def changeScene(e): if e.object.getItem(e.newSel) == 'Gallery': viz.scene(1) if e.object.getItem(e.newSel) == 'Dojo': viz.scene(2) vizact.onlist(dropList,changeScene) |
#3
|
|||
|
|||
It works great but is there a limit in the number of scenes/droplist? Because only let me put around 6 or 7 scenes. The other 3 or 4 (I want to put 10 scenes) appear in the droplist but don't change the scene when i select it the droplist
|
#4
|
|||
|
|||
You can use up to six scenes at one time. If you need more environments you can remove what's in one of those scenes and load a new environment there.
|
#5
|
|||
|
|||
There is no limit to the number of scenes you can use. For historical reasons, Vizard creates six scenes at startup. However, you can create more scenes using the viz.addScene() command.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding Objects to all Scenes | jassel41 | Vizard | 1 | 11-29-2010 03:35 AM |
displaying random scenes etc | cl113 | Vizard | 1 | 05-10-2009 06:14 PM |
Arranging Scenes in Correct Order | utepbereed | Vizard | 1 | 11-21-2008 10:19 AM |
environment maps, scenes, and you! | vadrian | Vizard | 1 | 01-12-2005 05:04 PM |
switching between scenes | david | Vizard | 4 | 07-01-2003 07:05 PM |