Trying to set:

bpy.context.scene.light_direction = (-0.0796555, 0.0730634, -0.994141)

and I get the error:

AttributeError: 'Scene' object has no attribute 'light_direction'

But, when I use the light direction interface sphere shown below, it shows in the info console:

bpy.context.scene.light_direction = (0.538462, 0.519231, 0.663671)

interface for light direction

  • 2
    $\begingroup$ Try bpy.context.scene.display.light_direction. Don't know why the Info window is wrong. $\endgroup$
    – scurest
    Aug 2 at 3:24

It's now bpy.context.scene.display.light_direction

I don't know when this was changed, or why there's a mismatch between the python in the info pane and the python interface. I was able to find it by tab autocompleting in the python console. Probably worth filing a bug.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.