PDA

View Full Version : change a model between scenes?


Darkmax
05-13-2010, 09:27 PM
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 <node3D>.parent command to do this:
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.