Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-06-18 15:38:34 +0400
committerTon Roosendaal <ton@blender.org>2006-06-18 15:38:34 +0400
commit94e23fe939413bf96be2b475408a69ec408688f1 (patch)
tree0f41b0855bcab56eecaf7383d7112ac4b94e999d /source/blender/src/drawseq.c
parent7784ea53bf3865c0cf6725611034da771b4535bf (diff)
Bugfix #4351
ESC wasn't supported for sequence-based rendering yet. Solved it with correctly initializing the sequence render with all render callbacks, including render updates (which it didn't do yet). Cleanup: - Bug in ghostwinlay code: the get_mbut() function reads from the window struct if a mouse is pressed. However, when you press the mouse in the sequencer, which causes a render, this value was hanging because then the active window was a render window. - The new render display options (image window) didn't work for sequence render OK. There was a recursion even, because a sequence draw command calls a render, which in turn now calls redraws.
Diffstat (limited to 'source/blender/src/drawseq.c')
-rw-r--r--source/blender/src/drawseq.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c
index 22f31bc7e4f..119d9838df5 100644
--- a/source/blender/src/drawseq.c
+++ b/source/blender/src/drawseq.c
@@ -747,6 +747,7 @@ static void draw_image_seq(ScrArea *sa)
struct ImBuf *ibuf;
int x1, y1, rectx, recty;
int free_ibuf = 0;
+ static int recursive= 0;
float zoom;
glClearColor(0.0, 0.0, 0.0, 0.0);
@@ -758,9 +759,26 @@ static void draw_image_seq(ScrArea *sa)
rectx= (G.scene->r.size*G.scene->r.xsch)/100;
recty= (G.scene->r.size*G.scene->r.ysch)/100;
- ibuf= (ImBuf *)give_ibuf_seq(rectx, recty,
- (G.scene->r.cfra), sseq->chanshown);
-
+ /* BIG PROBLEM: the give_ibuf_seq() can call a rendering, which in turn calls redraws...
+ this shouldn't belong in a window drawing....
+ So: solve this once event based.
+ Now we check for recursion, space type and active area again (ton) */
+
+ if(recursive)
+ return;
+ else {
+ recursive= 1;
+ ibuf= (ImBuf *)give_ibuf_seq(rectx, recty, (G.scene->r.cfra), sseq->chanshown);
+ recursive= 0;
+
+ /* HURMF! the give_ibuf_seq can call image display in this window */
+ if(sa->spacetype!=SPACE_SEQ)
+ return;
+ if(sa!=curarea) {
+ areawinset(sa->win);
+ }
+ }
+
if(special_seq_update) {
se = special_seq_update->curelem;
if(se) {
@@ -801,7 +819,7 @@ static void draw_image_seq(ScrArea *sa)
/* needed for gla draw */
glaDefine2DArea(&curarea->winrct);
glPixelZoom(zoom, zoom);
-
+
glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
glPixelZoom(1.0, 1.0);