Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-04 21:02:50 +0300
committerTon Roosendaal <ton@blender.org>2009-02-04 21:02:50 +0300
commitb4e914ce12484966225c11e7a16d9eb719e029e4 (patch)
treee93270bf00f67a8d4e53aeca0455217ac25b207a /source/blender/windowmanager
parent1b27cd70e573118580bc83a5a8ca2bdc31616414 (diff)
2.5
Bugfix #18251 Patch from Konrad Kleine After read-home file (or restore factory settings) the opengl lights have to be reset.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 86e0bc6474c..ff63782bdc3 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -83,6 +83,8 @@
#include "UI_interface.h"
#include "BLF_api.h"
+#include "GPU_draw.h"
+
// XXX #include "BPY_extern.h"
#include "WM_api.h"
@@ -571,6 +573,12 @@ int WM_read_homefile(bContext *C, int from_memory)
success = BKE_read_file_from_memory(C, datatoc_B_blend, datatoc_B_blend_size, NULL, NULL);
}
+ /* When loading factory settings, the reset solid OpenGL lights need to be applied. */
+ U.light[0].flag=0;
+ U.light[1].flag=0;
+ U.light[2].flag=0;
+ GPU_default_lights();
+
/* match the read WM with current WM */
wm_window_match_do(C, &wmbase);
wm_check(C); /* opens window(s), checks keymaps */