Bugfix: loading a .blend (via commandline now) while current config
authorTon Roosendaal <ton@blender.org>
Thu, 27 Nov 2008 17:58:46 +0000 (17:58 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 27 Nov 2008 17:58:46 +0000 (17:58 +0000)
had more windows, it left the non-active windows empty. The window-match
code is unfinished (need to bring all editors back), for now it just
follows rule to copy active screen in loaded file to other windows.

Also: added time marker icons (wrong location, view2d stuff still)
Also: bug in random green/purple area code, stopped at 10 subwindows :)

source/blender/editors/screen/area.c
source/blender/editors/space_time/ed_markers.c
source/blender/windowmanager/intern/wm_files.c

index 58be3b9b3341eb2f385263bc36c7e5a76154324a..5735bc2e459e7b28f8b71f4a476f9243d81c39a4 100644 (file)
@@ -148,6 +148,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
        else {
                float fac= 0.1*ar->swinid;
                
+               fac= fac - (int)fac;
+               
                glClearColor(0.5, fac, 1.0f-fac, 0.0); 
                glClear(GL_COLOR_BUFFER_BIT);
                
index 54e4ab6d3605593fb455d41773d66cccb2876529..5c9b7bd0685cba824f4b9a742f8ac5683be8d04c 100644 (file)
@@ -50,6 +50,7 @@
 #include "BIF_glutil.h"
 
 #include "UI_interface.h"
+#include "UI_interface_icons.h"
 #include "UI_view2d.h"
 #include "UI_resources.h"
 
@@ -104,9 +105,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
                ICON_MARKER;
        }
        
-       //BIF_icon_draw(xpos*xscale-5.0, 12.0, icon_id);
-       glColor3ub(0, 100, 0);
-       glRectf(xpos*xscale-5.0f, 12.0f, xpos*xscale, 17.0f);
+       UI_icon_draw(xpos*xscale-5.0, 12.0, icon_id);
        
        glBlendFunc(GL_ONE, GL_ZERO);
        glDisable(GL_BLEND);
index 425c1f1acc529fa10f7cbb847a17565852fdff9d..b8a60710063b78ea5652108930195c02138b526e 100644 (file)
@@ -75,6 +75,8 @@
 #include "BLO_writefile.h"
 
 #include "ED_datafiles.h"
+#include "ED_screen.h"
+
 #include "UI_interface.h"
 
 // XXX #include "BPY_extern.h"
@@ -406,9 +408,10 @@ static void wm_window_match_do(bContext *C, ListBase *wmlist)
                        for(wm= wmlist->first; wm; wm= wm->id.next) {
                                for(win= wm->windows.first; win; win= win->next) {
                                        win->screen= (bScreen *)find_id("SR", win->screenname);
-                                       if(win->screen==NULL)
-                                               win->screen= C->screen; /* active screen */
 
+                                       if(win->screen==NULL)
+                                               win->screen= ED_screen_duplicate(win, C->screen); /* active screen */
+                                                       
                                        if(win->screen->winid==0)
                                                win->screen->winid= win->winid;
                                }