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.
This commit is contained in:
2006-06-18 11:38:34 +00:00
parent 7784ea53bf
commit 94e23fe939
5 changed files with 78 additions and 64 deletions

View File

@@ -886,7 +886,7 @@ static void do_build_seq_ibuf(Sequence * seq, int cfra)
}
}
}
else if(seq->type==SEQ_SCENE && se->ibuf==0 && seq->scene) { // scene can be NULL after deletions
else if(seq->type==SEQ_SCENE && se->ibuf==NULL && seq->scene) { // scene can be NULL after deletions
int oldcfra = CFRA;
Scene *sce= seq->scene, *oldsce= G.scene;
Render *re= RE_NewRender(sce->id.name);
@@ -899,10 +899,12 @@ static void do_build_seq_ibuf(Sequence * seq, int cfra)
doseq= sce->r.scemode & R_DOSEQ;
sce->r.scemode &= ~R_DOSEQ;
BIF_init_render_callbacks(re);
/* hrms, set_scene still needed? work on that... */
set_scene_bg(sce);
if(sce!=oldsce) set_scene_bg(sce);
RE_BlenderFrame(re, sce, seq->sfra + se->nr);
set_scene_bg(oldsce);
if(sce!=oldsce) set_scene_bg(oldsce);
RE_GetResultImage(re, &rres);
@@ -913,7 +915,9 @@ static void do_build_seq_ibuf(Sequence * seq, int cfra)
/* not yet */
}
}
BIF_end_render_callbacks();
/* restore */
sce->r.scemode |= doseq;
@@ -1101,7 +1105,6 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown)
do_seq_test_unref_cfra(ed->seqbasep, cfra);
}
if(!seqfirst) return 0;
if(!seqfirst->curelem) return 0;
return seqfirst->curelem->ibuf;