WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   change a model between scenes? (https://forum.worldviz.com/showthread.php?t=2737)

Darkmax 05-13-2010 09:27 PM

change a model between scenes?
 
i tried to change a 2d cursor or a 3d model between scene 1 to scene 2 but i can't find the solution.

I know that you can specify the scene when you load the model or make a copy/clone/duplicate to another scene,but i want to change the object to another scene once the model is loaded,is possible this?

Jeff 05-14-2010 10:09 AM

You can use the .parent command to do this:
Code:

import viz
viz.go()

gallery = viz.add('gallery.ive')
court = viz.add('court.ive',scene=2)

avatar = viz.add('vcc_male.cfg',pos=[0,0,2],euler = [180,0,0])
avatar.state(1)

#switch between scenes 1 and 2
vizact.onkeydown('1',viz.scene,1)
vizact.onkeydown('2',viz.scene,2)

#move the avatar to scene 2
vizact.onkeydown(' ',avatar.parent,viz.WORLD,scene=2)


Darkmax 05-25-2010 03:14 PM

Thanks Jeff, this will make more efficient my applications.


All times are GMT -7. The time now is 07:21 PM.

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