diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 13:37:08 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 13:37:08 +0400 |
commit | 2b7a774ab0dfd3bc66240b387a586b5122ab2661 (patch) | |
tree | 11b863eb5c0a138dbfbc8b65d42d2724ddc80946 /source/blender/editors/space_sequencer | |
parent | 02314f11d83f4ee7e0b2d3f052d36ac492cfc910 (diff) | |
parent | a91d538f47171a40463016b91c22d39d694d923a (diff) |
svn merge -r 31314:31370 https://svn.blender.org/svnroot/bf-blender/trunk/blendersoc-2010-nexyon
Diffstat (limited to 'source/blender/editors/space_sequencer')
5 files changed, 20 insertions, 43 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index c426cd9fdc2..e58e2ebb328 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -51,8 +51,6 @@ #include "BKE_sequencer.h" #include "BKE_report.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 1abc2fc3398..afd8895edd9 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -695,12 +695,12 @@ void set_special_seq_update(int val) void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs) { extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); + struct Main *bmain= CTX_data_main(C); struct ImBuf *ibuf = 0; struct ImBuf *scope = 0; struct View2D *v2d = &ar->v2d; int rectx, recty; float viewrectx, viewrecty; - static int recursive= 0; float render_size = 0.0; float proxy_size = 100.0; GLuint texid; @@ -740,33 +740,12 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq UI_view2d_totRect_set(v2d, viewrectx + 0.5f, viewrecty + 0.5f); UI_view2d_curRect_validate(v2d); - /* 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; - if (special_seq_update) { - ibuf= give_ibuf_seq_direct(scene, rectx, recty, cfra + frame_ofs, proxy_size, special_seq_update); - } - else if (!U.prefetchframes) { // XXX || (G.f & G_PLAYANIM) == 0) { - ibuf= (ImBuf *)give_ibuf_seq(scene, rectx, recty, cfra + frame_ofs, sseq->chanshown, proxy_size); - } - else { - ibuf= (ImBuf *)give_ibuf_seq_threaded(scene, rectx, recty, cfra + frame_ofs, sseq->chanshown, proxy_size); - } - recursive= 0; - - /* XXX 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) + ibuf= give_ibuf_seq_direct(bmain, scene, rectx, recty, cfra + frame_ofs, proxy_size, special_seq_update); + else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) { + ibuf= (ImBuf *)give_ibuf_seq(bmain, scene, rectx, recty, cfra + frame_ofs, sseq->chanshown, proxy_size); + else + ibuf= (ImBuf *)give_ibuf_seq_threaded(bmain, scene, rectx, recty, cfra + frame_ofs, sseq->chanshown, proxy_size); if(ibuf==NULL) return; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 590856803cc..d1654dc5d37 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -48,6 +48,7 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_main.h" #include "BKE_sequencer.h" #include "BKE_report.h" #include "BKE_sound.h" @@ -734,7 +735,7 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de } -static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) +static Sequence *cut_seq_hard(Main *bmain, Scene *scene, Sequence * seq, int cutframe) { TransSeq ts; Sequence *seqn = 0; @@ -781,7 +782,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) } } - reload_sequence_new_file(scene, seq, FALSE); + reload_sequence_new_file(bmain, scene, seq, FALSE); calc_sequence(scene, seq); new_tstripdata(seq); @@ -821,14 +822,14 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) seqn->startstill = 0; } - reload_sequence_new_file(scene, seqn, FALSE); + reload_sequence_new_file(bmain, scene, seqn, FALSE); calc_sequence(scene, seqn); new_tstripdata(seqn); } return seqn; } -static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) +static Sequence *cut_seq_soft(Main *bmain, Scene *scene, Sequence * seq, int cutframe) { TransSeq ts; Sequence *seqn = 0; @@ -918,8 +919,8 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) /* like duplicate, but only duplicate and cut overlapping strips, * strips to the left of the cutframe are ignored and strips to the right are moved into the new list */ -static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe, - Sequence * (*cut_seq)(Scene *, Sequence *, int)) +static int cut_seq_list(Main *bmain, Scene *scene, ListBase *old, ListBase *new, int cutframe, + Sequence * (*cut_seq)(Main *, Scene *, Sequence *, int)) { int did_something = FALSE; Sequence *seq, *seq_next; @@ -933,7 +934,7 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe if(seq->flag & SELECT) { if(cutframe > seq->startdisp && cutframe < seq->enddisp) { - Sequence * seqn = cut_seq(scene, seq, cutframe); + Sequence * seqn = cut_seq(bmain, scene, seq, cutframe); if (seqn) { BLI_addtail(new, seqn); } @@ -1003,7 +1004,7 @@ void touch_seq_files(Scene *scene) waitcursor(0); } -void set_filter_seq(Scene *scene) +void set_filter_seq(Main *bmain, Scene *scene) { Sequence *seq; Editing *ed= seq_give_editing(scene, FALSE); @@ -1017,7 +1018,7 @@ void set_filter_seq(Scene *scene) if(seq->flag & SELECT) { if(seq->type==SEQ_MOVIE) { seq->flag |= SEQ_FILTERY; - reload_sequence_new_file(scene, seq, FALSE); + reload_sequence_new_file(bmain, scene, seq, FALSE); calc_sequence(scene, seq); } @@ -1505,6 +1506,7 @@ static EnumPropertyItem prop_cut_types[] = { static int sequencer_cut_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); int cut_side, cut_hard, cut_frame; @@ -1519,10 +1521,10 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op) newlist.first= newlist.last= NULL; if (cut_hard==SEQ_CUT_HARD) { - changed = cut_seq_list(scene, + changed = cut_seq_list(bmain, scene, ed->seqbasep, &newlist, cut_frame, cut_seq_hard); } else { - changed = cut_seq_list(scene, + changed = cut_seq_list(bmain, scene, ed->seqbasep, &newlist, cut_frame, cut_seq_soft); } diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 6d1c6aa45a8..6ca0a13f172 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -30,7 +30,6 @@ #include <stdlib.h> #include <math.h> -#include "MEM_guardedalloc.h" #include "DNA_space_types.h" diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index ecc7aa0c630..a61e05517d9 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -35,7 +35,6 @@ #endif #include <sys/types.h> -#include "MEM_guardedalloc.h" #include "BLI_blenlib.h" #include "BLI_math.h" |