diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-07 19:49:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-07 19:49:02 +0400 |
commit | 105b1031dd34d19755b7ec5f5a7dcc6bfa74b2fb (patch) | |
tree | d22203cc9b5f4730044d3624b493ec76badc2e5a /source/blender/editors/space_sequencer/sequencer_select.c | |
parent | 3916414709d1baace6bd9d1e802be2730048da66 (diff) |
code cleanup: rename sequencer types to SEQ_TYPE_*** and use enums rather then defines.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_select.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_select.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 3911ec0ef82..261bc575420 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -171,11 +171,11 @@ void ED_sequencer_select_sequence_single(Scene * scene, Sequence * seq, int dese BKE_sequencer_active_set(scene, seq); - if ((seq->type == SEQ_IMAGE) || (seq->type == SEQ_MOVIE)) { + if ((seq->type == SEQ_TYPE_IMAGE) || (seq->type == SEQ_TYPE_MOVIE)) { if (seq->strip) BLI_strncpy(ed->act_imagedir, seq->strip->dir, FILE_MAXDIR); } - else if (seq->type == SEQ_SOUND) { + else if (seq->type == SEQ_TYPE_SOUND_RAM) { if (seq->strip) BLI_strncpy(ed->act_sounddir, seq->strip->dir, FILE_MAXDIR); } @@ -409,13 +409,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) if (seq) { BKE_sequencer_active_set(scene, seq); - if ((seq->type == SEQ_IMAGE) || (seq->type == SEQ_MOVIE)) { + if ((seq->type == SEQ_TYPE_IMAGE) || (seq->type == SEQ_TYPE_MOVIE)) { if (seq->strip) { BLI_strncpy(ed->act_imagedir, seq->strip->dir, FILE_MAXDIR); } } else - if (seq->type == SEQ_SOUND) { + if (seq->type == SEQ_TYPE_SOUND_RAM) { if (seq->strip) { BLI_strncpy(ed->act_sounddir, seq->strip->dir, FILE_MAXDIR); } @@ -930,11 +930,11 @@ static EnumPropertyItem sequencer_prop_select_grouped_types[] = { {0, NULL, 0, NULL, NULL} }; -#define SEQ_IS_SOUND(_seq) ((_seq->type & SEQ_SOUND) && !(_seq->type & SEQ_EFFECT)) +#define SEQ_IS_SOUND(_seq) ((_seq->type & SEQ_TYPE_SOUND_RAM) && !(_seq->type & SEQ_TYPE_EFFECT)) -#define SEQ_IS_EFFECT(_seq) (_seq->type & SEQ_EFFECT) +#define SEQ_IS_EFFECT(_seq) (_seq->type & SEQ_TYPE_EFFECT) -#define SEQ_USE_DATA(_seq) (ELEM(_seq->type, SEQ_SCENE, SEQ_MOVIECLIP) || SEQ_HAS_PATH(_seq)) +#define SEQ_USE_DATA(_seq) (ELEM(_seq->type, SEQ_TYPE_SCENE, SEQ_TYPE_MOVIECLIP) || SEQ_HAS_PATH(_seq)) static short select_grouped_type(Editing *ed, Sequence *actseq) { @@ -1008,22 +1008,22 @@ static short select_grouped_data(Editing *ed, Sequence *actseq) } SEQ_END; } - else if (actseq->type == SEQ_SCENE) { + else if (actseq->type == SEQ_TYPE_SCENE) { Scene *sce = actseq->scene; SEQP_BEGIN (ed, seq) { - if (seq->type == SEQ_SCENE && seq->scene == sce) { + if (seq->type == SEQ_TYPE_SCENE && seq->scene == sce) { seq->flag |= SELECT; changed = TRUE; } } SEQ_END; } - else if (actseq->type == SEQ_MOVIECLIP) { + else if (actseq->type == SEQ_TYPE_MOVIECLIP) { MovieClip *clip = actseq->clip; SEQP_BEGIN (ed, seq) { - if (seq->type == SEQ_MOVIECLIP && seq->clip == clip) { + if (seq->type == SEQ_TYPE_MOVIECLIP && seq->clip == clip) { seq->flag |= SELECT; changed = TRUE; } @@ -1038,10 +1038,10 @@ static short select_grouped_effect(Editing *ed, Sequence *actseq) { Sequence *seq; short changed = FALSE; - short effects[SEQ_EFFECT_MAX + 1]; + short effects[SEQ_TYPE_EFFECT_MAX + 1]; int i; - for (i = 0; i <= SEQ_EFFECT_MAX; i++) + for (i = 0; i <= SEQ_TYPE_EFFECT_MAX; i++) effects[i] = FALSE; SEQP_BEGIN (ed, seq) @@ -1087,7 +1087,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) { Sequence *seq = NULL; short changed = FALSE; - short is_audio = ((actseq->type == SEQ_META) || SEQ_IS_SOUND(actseq)); + short is_audio = ((actseq->type == SEQ_TYPE_META) || SEQ_IS_SOUND(actseq)); int startdisp = actseq->startdisp; int enddisp = actseq->enddisp; int machine = actseq->machine; @@ -1109,7 +1109,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) /* Ignore all seqs of incompatible types (audio vs video). */ if ((seq->flag & SELECT) || (seq->startdisp >= enddisp) || (seq->enddisp < startdisp) || (!is_audio && SEQ_IS_SOUND(seq)) || - (is_audio && !((seq->type == SEQ_META) || SEQ_IS_SOUND(seq)))) + (is_audio && !((seq->type == SEQ_TYPE_META) || SEQ_IS_SOUND(seq)))) { continue; } |