Hi all,
I am trying to set a Rect light's target at the world origin or specific coordinate in the world.
I first try to modify the mel code to Python. With moving a rect light's target in the viewport, I got the code below as a starting point.
setAttr "VRayLightRectShape1.targetPos" -type double3 14.13 -108.221315 -203.228502 ;
However, when I execute this as MEL, the target isn't moving at all.
setAttr "VRayLightRectShape1.targetPos" -type double3 0.0 0.0 0.0 ;
I have also tried anyway in Python the following code.
cmds.setAttr('VRayLightRectShape1.targetPos', 0.0, 0.0, 0.0, type="double3")
There is no error but nor is the light's target moving to the world origin.
Is there a way to access a Rect light's target and set its translate or an efficient way to set a rect light pointing at the world origin?
Thanks!
I am trying to set a Rect light's target at the world origin or specific coordinate in the world.
I first try to modify the mel code to Python. With moving a rect light's target in the viewport, I got the code below as a starting point.
setAttr "VRayLightRectShape1.targetPos" -type double3 14.13 -108.221315 -203.228502 ;
However, when I execute this as MEL, the target isn't moving at all.
setAttr "VRayLightRectShape1.targetPos" -type double3 0.0 0.0 0.0 ;
I have also tried anyway in Python the following code.
cmds.setAttr('VRayLightRectShape1.targetPos', 0.0, 0.0, 0.0, type="double3")
There is no error but nor is the light's target moving to the world origin.
Is there a way to access a Rect light's target and set its translate or an efficient way to set a rect light pointing at the world origin?
Thanks!
Comment