WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Light parents in funny scenes (https://forum.worldviz.com/showthread.php?t=1756)

Gladsomebeast 12-16-2008 10:16 AM

Light parents in funny scenes
 
I'm setting the parent of a light to a node in scene2. The light does not illuminate the scene.

Code:

import viz
viz.go()

SIM_SCENE = viz.Scene2

viz.scene(SIM_SCENE)
viz.MainView.getHeadLight().disable()

worldInAnotherScene = viz.addGroup(parent=viz.WORLD, scene=SIM_SCENE)
mylight = viz.add(viz.LIGHT, parent=worldInAnotherScene)
viz.add('female.cfg', parent=worldInAnotherScene )

Can you set the parent of a light to a node? Why does the light not respect the scene of the parent?

farshizzo 12-17-2008 11:38 AM

Try specifying the scene that you want the light to affect when adding it:
Code:

mylight = viz.addLight(parent=worldInAnotherScene, scene=SIM_SCENE)
This will be fixed in the future though.


All times are GMT -7. The time now is 09:24 AM.

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