Cant use WHILE_SEQ when drawing,

drawing strips was setting the depth that would then incorrectly overlap when used with metastrips. - so metastrisp would grow when moved - showed up in peach animatic.

Now metastrips draw display differently- only immediate children are shown on the strip.

Also disabled overlap checking during transform for non zero depth strips since its not needed.
This commit is contained in:
Campbell Barton
2008-01-20 13:52:54 +00:00
parent 223b4132a0
commit 8ded57d236
3 changed files with 12 additions and 11 deletions

View File

@@ -103,8 +103,8 @@ void seq_tx_set_final_right(struct Sequence *seq, int i);
int seq_tx_check_left(struct Sequence *seq);
int seq_tx_check_right(struct Sequence *seq);
#define SEQ_DEBUG_INFO(seq) printf("seq into '%s' -- len:%i start:%i startstill:%i endstill:%i startofs:%i endofs:%i\n",\
seq->name, seq->len, seq->start, seq->startstill, seq->endstill, seq->startofs, seq->endofs)
#define SEQ_DEBUG_INFO(seq) printf("seq into '%s' -- len:%i start:%i startstill:%i endstill:%i startofs:%i endofs:%i depth:%i\n",\
seq->name, seq->len, seq->start, seq->startstill, seq->endstill, seq->startofs, seq->endofs, seq->depth)
#endif

View File

@@ -92,6 +92,8 @@
#define SEQ_STRIP_OFSBOTTOM 0.2
#define SEQ_STRIP_OFSTOP 0.8
/* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */
int no_rightbox=0, no_leftbox= 0;
static void draw_seq_handle(Sequence *seq, SpaceSeq *sseq, float pixelx, short direction);
static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq);
@@ -207,20 +209,18 @@ static void get_seq_color3ubv(Sequence *seq, char *col)
static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, float y2)
{
/* Note, this used to use WHILE_SEQ, but it messes up the seq->depth value, (needed by transform when doing overlap checks)
* so for now, just use the meta's immediate children, could be fixed but its only drawing - Campbell */
Sequence *seq;
float dx;
int nr;
char col[3];
nr= 0;
WHILE_SEQ(&seqm->seqbase) {
nr++;
}
END_SEQ
nr= BLI_countlist(&seqm->seqbase);
dx= (x2-x1)/nr;
WHILE_SEQ(&seqm->seqbase) {
for (seq= seqm->seqbase.first; seq; seq= seq->next) {
get_seq_color3ubv(seq, col);
glColor3ubv((GLubyte *)col);
@@ -234,7 +234,6 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa
x1+= dx;
}
END_SEQ
}
static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, int winx)

View File

@@ -3307,7 +3307,7 @@ void transform_seq(int mode, int context)
/* test for effect and overlap */
for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) {
if(seq->flag & SELECT && !(seq->flag & SEQ_LOCK)) {
if((seq->depth==0) && (seq->flag & SELECT) && !(seq->flag & SEQ_LOCK)) {
seq->flag &= ~SEQ_OVERLAP;
if( test_overlap_seq(seq) ) {
seq->flag |= SEQ_OVERLAP;
@@ -3319,7 +3319,9 @@ void transform_seq(int mode, int context)
else if(seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(seq);
}
}
/* warning, drawing should NEVER use WHILE_SEQ,
if it does the seq->depth value will be messed up and
overlap checks with metastrips will give incorrect results */
force_draw(0);
}