3
$\begingroup$

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

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

1 Answer 1

6
$\begingroup$

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.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .