Bugfix for 2.5 - Bugfix #18251
authorJoshua Leung <aligorith@gmail.com>
Wed, 4 Feb 2009 22:33:24 +0000 (22:33 +0000)
committerJoshua Leung <aligorith@gmail.com>
Wed, 4 Feb 2009 22:33:24 +0000 (22:33 +0000)
The patch was pasted in the wrong place, thus destroying all custom OpenGL solid light setups too.

source/blender/windowmanager/intern/wm_files.c

index ff63782bdc34871fb323bb5e136d6aafc2b20ae5..a87e22060fd78ecb30f6e0cd55e348e7a718534e 100644 (file)
@@ -571,14 +571,14 @@ int WM_read_homefile(bContext *C, int from_memory)
                success = BKE_read_file(C, tstr, NULL, NULL);
        } else {
                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();
        }
        
-       /* 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 */