Fix for #2689
authorTon Roosendaal <ton@blender.org>
Mon, 6 Jun 2005 10:35:50 +0000 (10:35 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 6 Jun 2005 10:35:50 +0000 (10:35 +0000)
When drawing many stars (or for certain slow gfx cards) you can press ESC
to stop it from drawing. The variable set for this escape was not reset,
causing a first F12 render to not work. (Ancient bug!).

Added: redraw event for "Stars" button in worldbuttons.

source/blender/src/buttons_shading.c
source/blender/src/drawview.c

index 4dfdd086d527f21810f7cc15293e0d15118d72f0..29c79ec0d305c0f3aa56e0664544ffa7c11c69ac 100644 (file)
@@ -1882,7 +1882,7 @@ static void world_panel_mistaph(World *wrld)
        uiBlockEndAlign(block);
 
        uiBlockSetCol(block, TH_BUT_SETTING1);
-       uiDefButS(block, TOG|BIT|1,B_DIFF,      "Stars",160,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles starfield generation");
+       uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D,        "Stars",160,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles starfield generation");
        uiBlockSetCol(block, TH_AUTO);
        
        uiBlockBeginAlign(block);
index 4f7fd109621c0cf31d3390f335b96227192f2162..9036e5e6fca1b0b31775f08fd53e9b2ce15fcc67 100644 (file)
@@ -1836,9 +1836,11 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
                drawfloor();
                if(G.vd->persp==2) {
                        if(G.scene->world) {
-                               if(G.scene->world->mode & WO_STARS) RE_make_stars(star_stuff_init_func,
-                                                                                                                                 star_stuff_vertex_func,
-                                                                                                                                 star_stuff_term_func);
+                               if(G.scene->world->mode & WO_STARS) {
+                                       RE_make_stars(star_stuff_init_func, star_stuff_vertex_func,
+                                                                 star_stuff_term_func);
+                                       G.afbreek= 0; /* silly, stars draw uses blender_test_break(), can cause render to stop */
+                               }
                        }
                        if(G.vd->flag & V3D_DISPBGPIC) draw_bgpic();
                }