Different fix for the nasty stars problem, previous one swallowed the
authorTon Roosendaal <ton@blender.org>
Mon, 6 Jun 2005 13:10:02 +0000 (13:10 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 6 Jun 2005 13:10:02 +0000 (13:10 +0000)
ESC during alt+a playback.

Solved in the 'proper' way, which is not abusing the (while render)
ESC callback for UI draw of stars, this confused everything. Means;
you cannot esc stars drawing anymore. Nice feature, bad hack...

source/blender/renderconverter/intern/convertBlenderScene.c
source/blender/src/drawview.c
source/blender/src/renderwin.c

index e9d0b5b90708651ca088ebe06cf5977c77c8238d..f9dc2263829d3dfac2ef434179eb539ba398d849 100644 (file)
@@ -317,15 +317,9 @@ void RE_make_stars(void (*initfunc)(void),
                                        }
                                }
                        }
-//                     if(done > MAXVERT) {
-//                             printf("Too many stars\n");
-//                             break;
-//                     }
-                       if(blender_test_break()) break;
+                       /* do not call blender_test_break() here, since it is used in UI as well, confusing the callback system */
+                       /* main cause is G.afbreek of course, a global again... (ton) */
                }
-//             if(done > MAXVERT) break;
-
-               if(blender_test_break()) break;
        }
        if (termfunc) termfunc();
 }
index 9036e5e6fca1b0b31775f08fd53e9b2ce15fcc67..aa60b73269de794f7973666d77586ee3c17ef6e4 100644 (file)
@@ -1839,7 +1839,6 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
                                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();
index 6d5ab76657f21c53d2c12b16fad470199e0d8773..a87f3863ec3cdcf780d54c4f64f2f23161758350 100644 (file)
@@ -1022,6 +1022,7 @@ static void do_render(View3D *ogl_render_view3d, int anim, int force_dispwin)
        
        /* we set this flag to prevent renderwindow queue to execute another render */
        R.flag= R_RENDERING;
+       G.afbreek= 0;
 
        if (G.displaymode == R_DISPLAYWIN || force_dispwin) {
                RE_set_initrenderdisplay_callback(NULL);
@@ -1051,7 +1052,6 @@ static void do_render(View3D *ogl_render_view3d, int anim, int force_dispwin)
        }
        waitcursor(1);
 
-       G.afbreek= 0;
        if(G.obedit && !(G.scene->r.scemode & R_OGL)) {
                exit_editmode(0);       /* 0 = no free data */
        }