Revision: 23939 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23939 Author: campbellbarton Date: 2009-10-19 12:07:19 +0200 (Mon, 19 Oct 2009)
Log Message: ----------- - listener for sequencer space panels added for frame changes, now redraws during transform - invalid pointer was used for getting the sequencer length crashing blender or setting the length to negative values. - printf_strip(seq) for debugging sequence strip locations - Spelling: Cheet Sheet -> Cheat Sheet Modified Paths: -------------- trunk/blender/release/scripts/ui/space_info.py trunk/blender/source/blender/blenkernel/BKE_sequence.h trunk/blender/source/blender/blenkernel/intern/sequence.c trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c trunk/blender/source/blender/editors/transform/transform_conversions.c trunk/blender/source/blender/makesrna/intern/rna_sequence.c Modified: trunk/blender/release/scripts/ui/space_info.py =================================================================== --- trunk/blender/release/scripts/ui/space_info.py 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/release/scripts/ui/space_info.py 2009-10-19 10:07:19 UTC (rev 23939) @@ -287,7 +287,7 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator): __idname__ = "help.operator_cheat_sheet" - __label__ = "Operator Cheet Sheet (new textblock)" + __label__ = "Operator Cheat Sheet (new textblock)" def execute(self, context): op_strings = [] tot = 0 Modified: trunk/blender/source/blender/blenkernel/BKE_sequence.h =================================================================== --- trunk/blender/source/blender/blenkernel/BKE_sequence.h 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/source/blender/blenkernel/BKE_sequence.h 2009-10-19 10:07:19 UTC (rev 23939) @@ -135,6 +135,7 @@ /* ********************* prototypes *************** */ /* sequence.c */ +void printf_strip(struct Sequence *seq); // extern void seq_free_sequence(struct Scene *scene, struct Sequence *seq); Modified: trunk/blender/source/blender/blenkernel/intern/sequence.c =================================================================== --- trunk/blender/source/blender/blenkernel/intern/sequence.c 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/source/blender/blenkernel/intern/sequence.c 2009-10-19 10:07:19 UTC (rev 23939) @@ -69,6 +69,13 @@ /* **** XXX ******** */ +void printf_strip(Sequence *seq) +{ + fprintf(stderr, "name: '%s', len:%d, start:%d, (startofs:%d, endofs:%d), (startstill:%d, endstill:%d), machine:%d, (startdisp:%d, enddisp:%d)\n", + seq->name, seq->len, seq->start, seq->startofs, seq->endofs, seq->startstill, seq->endstill, seq->machine, seq->startdisp, seq->enddisp); + fprintf(stderr, "\tseq_tx_set_final_left: %d %d\n\n", seq_tx_get_final_left(seq, 0), seq_tx_get_final_right(seq, 0)); +} + /* ********************************************************************** alloc / free functions ********************************************************************** */ @@ -3238,7 +3245,7 @@ { if (val < (seq)->start) { seq->startstill = abs(val - (seq)->start); - (seq)->startofs = 0; + seq->startofs = 0; } else { seq->startofs = abs(val - (seq)->start); seq->startstill = 0; @@ -3249,7 +3256,7 @@ { if (val > (seq)->start + (seq)->len) { seq->endstill = abs(val - (seq->start + (seq)->len)); - (seq)->endofs = 0; + seq->endofs = 0; } else { seq->endofs = abs(val - ((seq)->start + (seq)->len)); seq->endstill = 0; Modified: trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c =================================================================== --- trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c 2009-10-19 10:07:19 UTC (rev 23939) @@ -245,6 +245,14 @@ { /* context changes */ switch(wmn->category) { + case NC_SCENE: + switch(wmn->data) { + case ND_FRAME: + case ND_SEQUENCER: + ED_region_tag_redraw(ar); + break; + } + break; case NC_SPACE: if(wmn->data == ND_SPACE_SEQUENCER) ED_region_tag_redraw(ar); Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c =================================================================== --- trunk/blender/source/blender/editors/transform/transform_conversions.c 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2009-10-19 10:07:19 UTC (rev 23939) @@ -4015,38 +4015,52 @@ static void freeSeqData(TransInfo *t) { Editing *ed= seq_give_editing(t->scene, FALSE); - if (ed && !(t->state == TRANS_CANCEL)) { + + if(ed != NULL) { ListBase *seqbasep= ed->seqbasep; - Sequence *seq; - + TransData *td= t->data; int a; - TransData *td= t->data; /* prevent updating the same seq twice * if the transdata order is changed this will mess up * but so will TransDataSeq */ Sequence *seq_prev= NULL; + Sequence *seq; - /* flush to 2d vector from internally used 3d vector */ - for(a=0; a<t->total; a++, td++) { - seq= ((TransDataSeq *)td->extra)->seq; - if ((seq != seq_prev) && (seq->depth==0) && (seq->flag & SEQ_OVERLAP)) { - shuffle_seq(seqbasep, seq); + + if (!(t->state == TRANS_CANCEL)) { + + /* flush to 2d vector from internally used 3d vector */ + for(a=0; a<t->total; a++, td++) { + seq= ((TransDataSeq *)td->extra)->seq; + if ((seq != seq_prev) && (seq->depth==0) && (seq->flag & SEQ_OVERLAP)) { + shuffle_seq(seqbasep, seq); + } + + seq_prev= seq; } - seq_prev= seq; + for(seq= seqbasep->first; seq; seq= seq->next) { + /* We might want to build a list of effects that need to be updated during transform */ + if(seq->type & SEQ_EFFECT) { + if (seq->seq1 && seq->seq1->flag & SELECT) calc_sequence(seq); + else if (seq->seq2 && seq->seq2->flag & SELECT) calc_sequence(seq); + else if (seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(seq); + } + } + + sort_seq(t->scene); } - - for(seq= seqbasep->first; seq; seq= seq->next) { - /* We might want to build a list of effects that need to be updated during transform */ - if(seq->type & SEQ_EFFECT) { - if (seq->seq1 && seq->seq1->flag & SELECT) calc_sequence(seq); - else if (seq->seq2 && seq->seq2->flag & SELECT) calc_sequence(seq); - else if (seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(seq); + else { + /* Cancelled, need to update the strips display */ + for(a=0; a<t->total; a++, td++) { + seq= ((TransDataSeq *)td->extra)->seq; + if ((seq != seq_prev) && (seq->depth==0)) { + calc_sequence_disp(seq); + } + seq_prev= seq; } } - - sort_seq(t->scene); } if (t->customData) { Modified: trunk/blender/source/blender/makesrna/intern/rna_sequence.c =================================================================== --- trunk/blender/source/blender/makesrna/intern/rna_sequence.c 2009-10-19 09:57:55 UTC (rev 23938) +++ trunk/blender/source/blender/makesrna/intern/rna_sequence.c 2009-10-19 10:07:19 UTC (rev 23939) @@ -85,7 +85,7 @@ static int rna_SequenceEditor_length_get(PointerRNA *ptr) { Sequence *seq= (Sequence*)ptr->data; - return seq_tx_get_final_right(seq, 1)-seq_tx_get_final_left(seq, 1); + return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0); } static void rna_SequenceEditor_channel_set(PointerRNA *ptr, int value) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs