diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-10 20:59:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-10 20:59:15 +0400 |
commit | ce3f040e140996d7594c25e436ba49d7c09b30ed (patch) | |
tree | c4bf1d621f41d4560ca12c2e84f0793fe54705a9 | |
parent | 753623d1d7ec002523a0b4ec35dc8ff1f0df8ec1 (diff) |
fix [#27627] Strange behavior with solid open gl lights
disable turning off all lights in the user preferences.
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b67805c97b9..14af5ed7a3f 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -245,6 +245,13 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, PointerRNA *ptr) { + /* if all lights are off gpu_draw resets them all, [#27627] + * so disallow them all to be disabled */ + if(U.light[0].flag==0 && U.light[1].flag==0 && U.light[2].flag==0) { + SolidLight *light= ptr->data; + light->flag |= 1; + } + WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D|NS_VIEW3D_GPU, NULL); rna_userdef_update(bmain, scene, ptr); } |