Different fix for the nasty stars problem, previous one swallowed the

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...
This commit is contained in:
2005-06-06 13:10:02 +00:00
parent bb4710d2c9
commit 058e8ba402
3 changed files with 3 additions and 10 deletions

View File

@@ -317,15 +317,9 @@ void RE_make_stars(void (*initfunc)(void),
} }
} }
} }
// if(done > MAXVERT) { /* do not call blender_test_break() here, since it is used in UI as well, confusing the callback system */
// printf("Too many stars\n"); /* main cause is G.afbreek of course, a global again... (ton) */
// break;
// }
if(blender_test_break()) break;
} }
// if(done > MAXVERT) break;
if(blender_test_break()) break;
} }
if (termfunc) termfunc(); if (termfunc) termfunc();
} }

View File

@@ -1839,7 +1839,6 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
if(G.scene->world->mode & WO_STARS) { if(G.scene->world->mode & WO_STARS) {
RE_make_stars(star_stuff_init_func, star_stuff_vertex_func, RE_make_stars(star_stuff_init_func, star_stuff_vertex_func,
star_stuff_term_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(); if(G.vd->flag & V3D_DISPBGPIC) draw_bgpic();

View 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 */ /* we set this flag to prevent renderwindow queue to execute another render */
R.flag= R_RENDERING; R.flag= R_RENDERING;
G.afbreek= 0;
if (G.displaymode == R_DISPLAYWIN || force_dispwin) { if (G.displaymode == R_DISPLAYWIN || force_dispwin) {
RE_set_initrenderdisplay_callback(NULL); RE_set_initrenderdisplay_callback(NULL);
@@ -1051,7 +1052,6 @@ static void do_render(View3D *ogl_render_view3d, int anim, int force_dispwin)
} }
waitcursor(1); waitcursor(1);
G.afbreek= 0;
if(G.obedit && !(G.scene->r.scemode & R_OGL)) { if(G.obedit && !(G.scene->r.scemode & R_OGL)) {
exit_editmode(0); /* 0 = no free data */ exit_editmode(0); /* 0 = no free data */
} }