2
$\begingroup$

I have interested in create an addon to help on viewing models.

the idea is the properties for solid OpenGL Ligths be found in tools panel so we can easily tweak the colors and light direction for better viewing.

i need cahnge it via python

But I need acess the properties in user preferences change it and save the props in the .blend and of couse automaticaly load it when a file is open.

$\endgroup$
1

1 Answer 1

-1
$\begingroup$

If you hover the color boxes with the mouse cursor you will find that the responsible python struct is UserSolidLight with the following properties

base class — bpy_struct

class bpy.types.UserSolidLight(bpy_struct) Light used for OpenGL lighting in solid draw mode

diffuse_color Diffuse color of the OpenGL light

Type: float array of 3 items in [0, inf], default (0.0, 0.0, 0.0)

direction Direction that the OpenGL light is shining

Type: float array of 3 items in [-inf, inf], default (0.0, 1.0, 0.0)

specular_color Color of the light’s specular highlight

Type: float array of 3 items in [0, inf], default (0.0, 0.0, 0.0)

use Enable this OpenGL light in solid draw mode

Type: boolean, default False

According to the Python API Documentation

$\endgroup$
2
  • $\begingroup$ That does not answer the question. $\endgroup$
    – brockmann
    Commented Jun 10, 2017 at 18:47
  • $\begingroup$ Unfortunately the answer can't currently be removed because of being the accepted answer. $\endgroup$ Commented Jun 11, 2017 at 0:49

You must log in to answer this question.

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