Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-07 19:49:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-07 19:49:02 +0400
commit105b1031dd34d19755b7ec5f5a7dcc6bfa74b2fb (patch)
treed22203cc9b5f4730044d3624b493ec76badc2e5a /source/blender/editors
parent3916414709d1baace6bd9d1e802be2730048da66 (diff)
code cleanup: rename sequencer types to SEQ_TYPE_*** and use enums rather then defines.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sound/sound_ops.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c10
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c18
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c92
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c96
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c30
-rw-r--r--source/blender/editors/transform/transform_conversions.c22
8 files changed, 139 insertions, 139 deletions
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index af7f3bd4aed..9827ffdc324 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -676,7 +676,7 @@ static int sound_poll(bContext *C)
{
Editing *ed = CTX_data_scene(C)->ed;
- if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_TYPE_SOUND_RAM)
return 0;
return 1;
@@ -689,7 +689,7 @@ static int sound_pack_exec(bContext *C, wmOperator *op)
Editing *ed = CTX_data_scene(C)->ed;
bSound *sound;
- if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_TYPE_SOUND_RAM)
return OPERATOR_CANCELLED;
sound = ed->act_seq->sound;
@@ -751,7 +751,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
if (RNA_struct_property_is_set(op->ptr, "id"))
return sound_unpack_exec(C, op);
- if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_TYPE_SOUND_RAM)
return OPERATOR_CANCELLED;
sound = ed->act_seq->sound;
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 483016b7e00..f0ecaf3ab2c 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1057,15 +1057,15 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
case TSE_POSEGRP_BASE:
UI_icon_draw(x, y, ICON_GROUP_BONE); break;
case TSE_SEQUENCE:
- if (te->idcode == SEQ_MOVIE)
+ if (te->idcode == SEQ_TYPE_MOVIE)
UI_icon_draw(x, y, ICON_SEQUENCE);
- else if (te->idcode == SEQ_META)
+ else if (te->idcode == SEQ_TYPE_META)
UI_icon_draw(x, y, ICON_DOT);
- else if (te->idcode == SEQ_SCENE)
+ else if (te->idcode == SEQ_TYPE_SCENE)
UI_icon_draw(x, y, ICON_SCENE);
- else if (te->idcode == SEQ_SOUND)
+ else if (te->idcode == SEQ_TYPE_SOUND_RAM)
UI_icon_draw(x, y, ICON_SOUND);
- else if (te->idcode == SEQ_IMAGE)
+ else if (te->idcode == SEQ_TYPE_IMAGE)
UI_icon_draw(x, y, ICON_IMAGE_COL);
else
UI_icon_draw(x, y, ICON_PARTICLES);
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index ff3648fc2b8..63907f530eb 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -899,14 +899,14 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->directdata = seq;
te->name = seq->name + 2;
- if (seq->type < SEQ_EFFECT) {
+ if (seq->type < SEQ_TYPE_EFFECT) {
/*
* This work like the sequence.
* If the sequence have a name (not default name)
* show it, in other case put the filename.
*/
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
p = seq->seqbase.first;
while (p) {
outliner_add_element(soops, &te->subtree, (void *)p, te, TSE_SEQUENCE, index);
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 9eb4c62789e..9301f13c8c0 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -228,8 +228,8 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
}
seq = alloc_sequence(ed->seqbasep, start_frame, channel);
- seq->type = SEQ_SCENE;
- seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */
+ seq->type = SEQ_TYPE_SCENE;
+ seq->blend_mode = SEQ_TYPE_CROSS; /* so alpha adjustment fade to the strip below */
seq->scene = sce_seq;
@@ -327,8 +327,8 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op)
}
seq = alloc_sequence(ed->seqbasep, start_frame, channel);
- seq->type = SEQ_MOVIECLIP;
- seq->blend_mode = SEQ_CROSS;
+ seq->type = SEQ_TYPE_MOVIECLIP;
+ seq->blend_mode = SEQ_TYPE_CROSS;
seq->clip = clip;
if (seq->clip->id.us == 0)
@@ -740,14 +740,14 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
strip->us = 1;
- if (seq->type == SEQ_COLOR) {
+ if (seq->type == SEQ_TYPE_COLOR) {
SolidColorVars *colvars = (SolidColorVars *)seq->effectdata;
RNA_float_get_array(op->ptr, "color", colvars->col);
- seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */
+ seq->blend_mode = SEQ_TYPE_CROSS; /* so alpha adjustment fade to the strip below */
}
- else if (seq->type == SEQ_ADJUSTMENT) {
- seq->blend_mode = SEQ_CROSS;
+ else if (seq->type == SEQ_TYPE_ADJUSTMENT) {
+ seq->blend_mode = SEQ_TYPE_CROSS;
}
/* an unset channel is a special case where we automatically go above
@@ -832,6 +832,6 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME);
- RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type");
+ RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_TYPE_CROSS, "Type", "Sequencer effect type");
RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 236baea01be..cb15eed6a37 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -82,23 +82,23 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
SolidColorVars *colvars = (SolidColorVars *)seq->effectdata;
switch (seq->type) {
- case SEQ_IMAGE:
+ case SEQ_TYPE_IMAGE:
UI_GetThemeColor3ubv(TH_SEQ_IMAGE, col);
break;
- case SEQ_META:
+ case SEQ_TYPE_META:
UI_GetThemeColor3ubv(TH_SEQ_META, col);
break;
- case SEQ_MOVIE:
+ case SEQ_TYPE_MOVIE:
UI_GetThemeColor3ubv(TH_SEQ_MOVIE, col);
break;
- case SEQ_MOVIECLIP:
+ case SEQ_TYPE_MOVIECLIP:
UI_GetThemeColor3ubv(TH_SEQ_MOVIECLIP, col);
break;
- case SEQ_SCENE:
+ case SEQ_TYPE_SCENE:
UI_GetThemeColor3ubv(TH_SEQ_SCENE, col);
if (seq->scene == curscene) {
@@ -107,45 +107,45 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
break;
/* transitions */
- case SEQ_CROSS:
- case SEQ_GAMCROSS:
- case SEQ_WIPE:
+ case SEQ_TYPE_CROSS:
+ case SEQ_TYPE_GAMCROSS:
+ case SEQ_TYPE_WIPE:
UI_GetThemeColor3ubv(TH_SEQ_TRANSITION, col);
/* slightly offset hue to distinguish different effects */
- if (seq->type == SEQ_CROSS) rgb_byte_set_hue_float_offset(col, 0.04);
- if (seq->type == SEQ_GAMCROSS) rgb_byte_set_hue_float_offset(col, 0.08);
- if (seq->type == SEQ_WIPE) rgb_byte_set_hue_float_offset(col, 0.12);
+ if (seq->type == SEQ_TYPE_CROSS) rgb_byte_set_hue_float_offset(col, 0.04);
+ if (seq->type == SEQ_TYPE_GAMCROSS) rgb_byte_set_hue_float_offset(col, 0.08);
+ if (seq->type == SEQ_TYPE_WIPE) rgb_byte_set_hue_float_offset(col, 0.12);
break;
/* effects */
- case SEQ_TRANSFORM:
- case SEQ_SPEED:
- case SEQ_ADD:
- case SEQ_SUB:
- case SEQ_MUL:
- case SEQ_ALPHAOVER:
- case SEQ_ALPHAUNDER:
- case SEQ_OVERDROP:
- case SEQ_GLOW:
- case SEQ_MULTICAM:
- case SEQ_ADJUSTMENT:
+ case SEQ_TYPE_TRANSFORM:
+ case SEQ_TYPE_SPEED:
+ case SEQ_TYPE_ADD:
+ case SEQ_TYPE_SUB:
+ case SEQ_TYPE_MUL:
+ case SEQ_TYPE_ALPHAOVER:
+ case SEQ_TYPE_ALPHAUNDER:
+ case SEQ_TYPE_OVERDROP:
+ case SEQ_TYPE_GLOW:
+ case SEQ_TYPE_MULTICAM:
+ case SEQ_TYPE_ADJUSTMENT:
UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col);
/* slightly offset hue to distinguish different effects */
- if (seq->type == SEQ_ADD) rgb_byte_set_hue_float_offset(col, 0.04);
- else if (seq->type == SEQ_SUB) rgb_byte_set_hue_float_offset(col, 0.08);
- else if (seq->type == SEQ_MUL) rgb_byte_set_hue_float_offset(col, 0.12);
- else if (seq->type == SEQ_ALPHAOVER) rgb_byte_set_hue_float_offset(col, 0.16);
- else if (seq->type == SEQ_ALPHAUNDER) rgb_byte_set_hue_float_offset(col, 0.20);
- else if (seq->type == SEQ_OVERDROP) rgb_byte_set_hue_float_offset(col, 0.24);
- else if (seq->type == SEQ_GLOW) rgb_byte_set_hue_float_offset(col, 0.28);
- else if (seq->type == SEQ_TRANSFORM) rgb_byte_set_hue_float_offset(col, 0.36);
- else if (seq->type == SEQ_MULTICAM) rgb_byte_set_hue_float_offset(col, 0.32);
- else if (seq->type == SEQ_ADJUSTMENT) rgb_byte_set_hue_float_offset(col, 0.40);
+ if (seq->type == SEQ_TYPE_ADD) rgb_byte_set_hue_float_offset(col, 0.04);
+ else if (seq->type == SEQ_TYPE_SUB) rgb_byte_set_hue_float_offset(col, 0.08);
+ else if (seq->type == SEQ_TYPE_MUL) rgb_byte_set_hue_float_offset(col, 0.12);
+ else if (seq->type == SEQ_TYPE_ALPHAOVER) rgb_byte_set_hue_float_offset(col, 0.16);
+ else if (seq->type == SEQ_TYPE_ALPHAUNDER) rgb_byte_set_hue_float_offset(col, 0.20);
+ else if (seq->type == SEQ_TYPE_OVERDROP) rgb_byte_set_hue_float_offset(col, 0.24);
+ else if (seq->type == SEQ_TYPE_GLOW) rgb_byte_set_hue_float_offset(col, 0.28);
+ else if (seq->type == SEQ_TYPE_TRANSFORM) rgb_byte_set_hue_float_offset(col, 0.36);
+ else if (seq->type == SEQ_TYPE_MULTICAM) rgb_byte_set_hue_float_offset(col, 0.32);
+ else if (seq->type == SEQ_TYPE_ADJUSTMENT) rgb_byte_set_hue_float_offset(col, 0.40);
break;
- case SEQ_COLOR:
+ case SEQ_TYPE_COLOR:
if (colvars->col) {
rgb_float_to_uchar(col, colvars->col);
}
@@ -154,7 +154,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
}
break;
- case SEQ_SOUND:
+ case SEQ_TYPE_SOUND_RAM:
UI_GetThemeColor3ubv(TH_SEQ_AUDIO, col);
blendcol[0] = blendcol[1] = blendcol[2] = 128;
if (seq->flag & SEQ_MUTE) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.5, 20);
@@ -362,7 +362,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
}
/* draw! */
- if (seq->type < SEQ_EFFECT ||
+ if (seq->type < SEQ_TYPE_EFFECT ||
get_sequence_effect_num_inputs(seq->type) == 0)
{
glEnable(GL_BLEND);
@@ -409,7 +409,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
unsigned char col[3], blendcol[3];
View2D *v2d = &ar->v2d;
- if (seq->type >= SEQ_EFFECT) return;
+ if (seq->type >= SEQ_TYPE_EFFECT) return;
x1 = seq->startdisp;
x2 = seq->enddisp;
@@ -521,10 +521,10 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
if (name[0] == '\0')
name = give_seqname(seq);
- if (seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) {
+ if (seq->type == SEQ_TYPE_META || seq->type == SEQ_TYPE_ADJUSTMENT) {
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
- else if (seq->type == SEQ_SCENE) {
+ else if (seq->type == SEQ_TYPE_SCENE) {
if (seq->scene) {
if (seq->scene_camera) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s (%s)",
@@ -540,7 +540,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
seq->len, name);
}
}
- else if (seq->type == SEQ_MOVIECLIP) {
+ else if (seq->type == SEQ_TYPE_MOVIECLIP) {
if (seq->clip && strcmp(name, seq->clip->id.name + 2) != 0) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s",
seq->len, name, seq->clip->id.name + 2);
@@ -550,19 +550,19 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
seq->len, name);
}
}
- else if (seq->type == SEQ_MULTICAM) {
+ else if (seq->type == SEQ_TYPE_MULTICAM) {
BLI_snprintf(str, sizeof(str), "Cam | %s: %d",
name, seq->multicam_source);
}
- else if (seq->type == SEQ_IMAGE) {
+ else if (seq->type == SEQ_TYPE_IMAGE) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s%s",
seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
- else if (seq->type & SEQ_EFFECT) {
+ else if (seq->type & SEQ_TYPE_EFFECT) {
BLI_snprintf(str, sizeof(str), "%d | %s",
seq->len, name);
}
- else if (seq->type == SEQ_SOUND) {
+ else if (seq->type == SEQ_TYPE_SOUND_RAM) {
if (seq->sound)
BLI_snprintf(str, sizeof(str), "%d | %s: %s",
seq->len, name, seq->sound->name);
@@ -570,7 +570,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
BLI_snprintf(str, sizeof(str), "%d | %s",
seq->len, name);
}
- else if (seq->type == SEQ_MOVIE) {
+ else if (seq->type == SEQ_TYPE_MOVIE) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s%s",
seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
@@ -696,7 +696,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
x2 = seq->enddisp;
/* draw sound wave */
- if (seq->type == SEQ_SOUND) {
+ if (seq->type == SEQ_TYPE_SOUND_RAM) {
drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin) / ar->winx);
}
@@ -743,7 +743,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
glDisable(GL_LINE_STIPPLE);
}
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
drawmeta_contents(scene, seq, x1, y1, x2, y2);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 072cfa00622..c686f8440a9 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -79,21 +79,21 @@
/* XXX */
/* RNA Enums, used in multiple files */
EnumPropertyItem sequencer_prop_effect_types[] = {
- {SEQ_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"},
- {SEQ_ADD, "ADD", 0, "Add", "Add effect strip type"},
- {SEQ_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"},
- {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", "Alpha Over effect strip type"},
- {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", "Alpha Under effect strip type"},
- {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"},
- {SEQ_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"},
- {SEQ_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"},
- {SEQ_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"},
- {SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
- {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
- {SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
- {SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
- {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
- {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
+ {SEQ_TYPE_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"},
+ {SEQ_TYPE_ADD, "ADD", 0, "Add", "Add effect strip type"},
+ {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"},
+ {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", "Alpha Over effect strip type"},
+ {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", "Alpha Under effect strip type"},
+ {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"},
+ {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"},
+ {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"},
+ {SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"},
+ {SEQ_TYPE_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
+ {SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
+ {SEQ_TYPE_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
+ {SEQ_TYPE_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
+ {SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
+ {SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -478,7 +478,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
if (seq->flag & SELECT) {
- if (seq->type == SEQ_SOUND && get_sequence_effect_num_inputs(type) != 0) {
+ if (seq->type == SEQ_TYPE_SOUND_RAM && get_sequence_effect_num_inputs(type) != 0) {
*error_str = "Can't apply effects to audio sequence strips";
return 0;
}
@@ -543,7 +543,7 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq)
if (!seq)
return NULL;
- else if (!(seq->type & SEQ_EFFECT))
+ else if (!(seq->type & SEQ_TYPE_EFFECT))
return ((seq->flag & SELECT) ? NULL : seq);
else if (!(seq->flag & SELECT)) {
/* try to find replacement for effect inputs */
@@ -584,7 +584,7 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de
if ((seq->flag & flag) || deleteall) {
BLI_remlink(lb, seq);
if (seq == last_seq) BKE_sequencer_active_set(scene, NULL);
- if (seq->type == SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1);
+ if (seq->type == SEQ_TYPE_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1);
seq_free_sequence(scene, seq);
}
seq = seqn;
@@ -616,7 +616,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
if ((seq->startstill) && (cutframe < seq->start)) {
/* don't do funny things with METAs ... */
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
skip_dup = TRUE;
seq->startstill = seq->start - cutframe;
}
@@ -637,7 +637,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) {
seq->endstill -= seq->enddisp - cutframe;
/* don't do funny things with METAs ... */
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
skip_dup = TRUE;
}
}
@@ -712,7 +712,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
if ((seq->startstill) && (cutframe < seq->start)) {
/* don't do funny things with METAs ... */
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
skip_dup = TRUE;
seq->startstill = seq->start - cutframe;
}
@@ -731,7 +731,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) {
seq->endstill -= seq->enddisp - cutframe;
/* don't do funny things with METAs ... */
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
skip_dup = TRUE;
}
}
@@ -855,7 +855,7 @@ static void UNUSED_FUNCTION(touch_seq_files) (Scene * scene)
SEQP_BEGIN (ed, seq)
{
if (seq->flag & SELECT) {
- if (seq->type == SEQ_MOVIE) {
+ if (seq->type == SEQ_TYPE_MOVIE) {
if (seq->strip && seq->strip->stripdata) {
BLI_make_file_string(G.main->name, str, seq->strip->dir, seq->strip->stripdata->name);
BLI_file_touch(seq->name);
@@ -883,7 +883,7 @@ static void set_filter_seq(Scene *scene)
SEQP_BEGIN (ed, seq)
{
if (seq->flag & SELECT) {
- if (seq->type == SEQ_MOVIE) {
+ if (seq->type == SEQ_TYPE_MOVIE) {
seq->flag |= SEQ_FILTERY;
reload_sequence_new_file(scene, seq, FALSE);
calc_sequence(scene, seq);
@@ -1052,7 +1052,7 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op)
shuffle_seq(ed->seqbasep, seq, scene);
}
}
- else if (seq->type & SEQ_EFFECT) {
+ else if (seq->type & SEQ_TYPE_EFFECT) {
if (seq->seq1 && (seq->seq1->flag & SELECT))
calc_sequence(scene, seq);
else if (seq->seq2 && (seq->seq2->flag & SELECT))
@@ -1368,7 +1368,7 @@ static int sequencer_effect_poll(bContext *C)
if (ed) {
Sequence *last_seq = BKE_sequencer_active_get(scene);
- if (last_seq && (last_seq->type & SEQ_EFFECT)) {
+ if (last_seq && (last_seq->type & SEQ_TYPE_EFFECT)) {
return 1;
}
}
@@ -1626,7 +1626,7 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* for effects, try to find a replacement input */
for (seq = ed->seqbasep->first; seq; seq = seq->next)
- if ((seq->type & SEQ_EFFECT) && !(seq->flag & SELECT))
+ if ((seq->type & SEQ_TYPE_EFFECT) && !(seq->flag & SELECT))
del_seq_find_replace_recurs(scene, seq);
/* delete all selected strips */
@@ -1679,7 +1679,7 @@ static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* for effects, try to find a replacement input */
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
- if ((seq->type & SEQ_EFFECT) == 0 && (seq->flag & SELECT)) {
+ if ((seq->type & SEQ_TYPE_EFFECT) == 0 && (seq->flag & SELECT)) {
seq->startofs = seq->endofs = seq->startstill = seq->endstill = 0;
}
}
@@ -1692,7 +1692,7 @@ static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op))
}
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
- if ((seq->type & SEQ_EFFECT) == 0 && (seq->flag & SELECT)) {
+ if ((seq->type & SEQ_TYPE_EFFECT) == 0 && (seq->flag & SELECT)) {
if (seq_test_overlap(ed->seqbasep, seq)) {
shuffle_seq(ed->seqbasep, seq, scene);
}
@@ -1737,7 +1737,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
seq = ed->seqbasep->first; /* poll checks this is valid */
while (seq) {
- if ((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
+ if ((seq->flag & SELECT) && (seq->type == SEQ_TYPE_IMAGE) && (seq->len > 1)) {
/* remove seq so overlap tests don't conflict,
* see seq_free_sequence below for the real free'ing */
BLI_remlink(ed->seqbasep, seq);
@@ -1755,7 +1755,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
BLI_addtail(ed->seqbasep, seq_new);
seq_new->start = start_ofs;
- seq_new->type = SEQ_IMAGE;
+ seq_new->type = SEQ_TYPE_IMAGE;
seq_new->len = 1;
seq_new->endstill = step - 1;
@@ -1826,7 +1826,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *last_seq = BKE_sequencer_active_get(scene);
MetaStack *ms;
- if (last_seq && last_seq->type == SEQ_META && last_seq->flag & SELECT) {
+ if (last_seq && last_seq->type == SEQ_TYPE_META && last_seq->flag & SELECT) {
/* Enter Metastrip */
ms = MEM_mallocN(sizeof(MetaStack), "metastack");
BLI_addtail(&ed->metastack, ms);
@@ -1904,7 +1904,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
seqm = alloc_sequence(ed->seqbasep, 1, 1); /* channel number set later */
strcpy(seqm->name + 2, "MetaStrip");
- seqm->type = SEQ_META;
+ seqm->type = SEQ_TYPE_META;
seqm->flag = SELECT;
seq = ed->seqbasep->first;
@@ -1970,7 +1970,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *seq, *last_seq = BKE_sequencer_active_get(scene); /* last_seq checks (ed == NULL) */
- if (last_seq == NULL || last_seq->type != SEQ_META)
+ if (last_seq == NULL || last_seq->type != SEQ_TYPE_META)
return OPERATOR_CANCELLED;
BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase);
@@ -1983,7 +1983,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
/* emtpy meta strip, delete all effects depending on it */
for (seq = ed->seqbasep->first; seq; seq = seq->next)
- if ((seq->type & SEQ_EFFECT) && seq_depends_on_meta(seq, last_seq))
+ if ((seq->type & SEQ_TYPE_EFFECT) && seq_depends_on_meta(seq, last_seq))
seq->flag |= SEQ_FLAG_DELETE;
recurs_del_seq_flag(scene, ed->seqbasep, SEQ_FLAG_DELETE, 0);
@@ -2454,14 +2454,14 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op)
// XXX - should be a generic function
for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) {
- if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
+ if ((iseq->type & SEQ_TYPE_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
calc_sequence(scene, iseq);
}
}
/* do this in a new loop since both effects need to be calculated first */
for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) {
- if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
+ if ((iseq->type & SEQ_TYPE_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
/* this may now overlap */
if (seq_test_overlap(ed->seqbasep, iseq) ) {
shuffle_seq(ed->seqbasep, iseq, scene);
@@ -2512,16 +2512,16 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op))
if (active_seq->strip) {
switch (active_seq->type) {
- case SEQ_IMAGE:
+ case SEQ_TYPE_IMAGE:
se = give_stripelem(active_seq, scene->r.cfra);
break;
- case SEQ_MOVIE:
+ case SEQ_TYPE_MOVIE:
se = active_seq->strip->stripdata;
break;
- case SEQ_SCENE:
- case SEQ_META:
- case SEQ_RAM_SOUND:
- case SEQ_HD_SOUND:
+ case SEQ_TYPE_SCENE:
+ case SEQ_TYPE_META:
+ case SEQ_TYPE_SOUND_RAM:
+ case SEQ_TYPE_SOUND_HD:
default:
break;
}
@@ -2559,7 +2559,7 @@ void SEQUENCER_OT_rendersize(wmOperatorType *ot)
static void seq_copy_del_sound(Scene *scene, Sequence *seq)
{
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
Sequence *iseq;
for (iseq = seq->seqbase.first; iseq; iseq = iseq->next) {
seq_copy_del_sound(scene, iseq);
@@ -2900,7 +2900,7 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op)
/* free previous effect and init new effect */
struct SeqEffectHandle sh;
- if ((seq->type & SEQ_EFFECT) == 0) {
+ if ((seq->type & SEQ_TYPE_EFFECT) == 0) {
return OPERATOR_CANCELLED;
}
@@ -2947,7 +2947,7 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type");
+ ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_TYPE_CROSS, "Type", "Sequencer effect type");
}
static int sequencer_change_path_exec(bContext *C, wmOperator *op)
@@ -2958,7 +2958,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
Sequence *seq = BKE_sequencer_active_get(scene);
const int is_relative_path = RNA_boolean_get(op->ptr, "relative_path");
- if (seq->type == SEQ_IMAGE) {
+ if (seq->type == SEQ_TYPE_IMAGE) {
char directory[FILE_MAX];
const int len = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
StripElem *se;
@@ -3028,7 +3028,7 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, wmEvent *UN
RNA_string_set(op->ptr, "directory", seq->strip->dir);
/* set default display depending on seq type */
- if (seq->type == SEQ_IMAGE) {
+ if (seq->type == SEQ_TYPE_IMAGE) {
RNA_boolean_set(op->ptr, "filter_movie", FALSE);
}
else {
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;
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 61dff466387..1d4257ea3d3 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2239,7 +2239,7 @@ void flushTransSeq(TransInfo *t)
if ((seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
#else
- if (seq->type != SEQ_META && (seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
+ if (seq->type != SEQ_TYPE_META && (seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
#endif
if (seq->depth==0) {
@@ -2282,7 +2282,7 @@ void flushTransSeq(TransInfo *t)
/* calc all meta's then effects [#27953] */
for (seq = seqbasep->first; seq; seq = seq->next) {
- if (seq->type == SEQ_META && seq->flag & SELECT) {
+ if (seq->type == SEQ_TYPE_META && seq->flag & SELECT) {
calc_sequence(t->scene, seq);
}
}
@@ -3787,7 +3787,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
*count = 0;
*flag = 0;
}
- else if (seq->type == SEQ_META) {
+ else if (seq->type == SEQ_TYPE_META) {
/* for meta's we only ever need to extend their children, no matter what depth
* just check the meta's are in the bounds */
@@ -3844,7 +3844,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Recursive */
- if ((seq->type == SEQ_META) && ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == 0)) {
+ if ((seq->type == SEQ_TYPE_META) && ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == 0)) {
/* if any handles are selected, don't recurse */
*recursive = TRUE;
}
@@ -3859,9 +3859,9 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
#ifdef SEQ_TX_NESTED_METAS
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*count = 1; /* ignore the selection for nested */
- *recursive = (seq->type == SEQ_META);
+ *recursive = (seq->type == SEQ_TYPE_META);
#else
- if (seq->type == SEQ_META) {
+ if (seq->type == SEQ_TYPE_META) {
/* Meta's can only directly be moved between channels since they
* don't have their start and length set directly (children affect that)
* since this Meta is nested we don't need any of its data in fact.
@@ -4064,7 +4064,7 @@ static void freeSeqData(TransInfo *t)
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
/* check effects strips, we cant change their time */
- if ((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) {
has_effect= TRUE;
}
else {
@@ -4123,7 +4123,7 @@ static void freeSeqData(TransInfo *t)
for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
- if ((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) {
calc_sequence(t->scene, seq);
}
}
@@ -4135,7 +4135,7 @@ static void freeSeqData(TransInfo *t)
for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
- if ((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) {
if (seq_test_overlap(seqbasep, seq)) {
shuffle_seq(seqbasep, seq, t->scene);
}
@@ -4150,7 +4150,7 @@ static void freeSeqData(TransInfo *t)
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->type & SEQ_TYPE_EFFECT) {
if (seq->seq1 && seq->seq1->flag & SELECT) calc_sequence(t->scene, seq);
else if (seq->seq2 && seq->seq2->flag & SELECT) calc_sequence(t->scene, seq);
else if (seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(t->scene, seq);
@@ -4219,7 +4219,7 @@ static void createTransSeqData(bContext *C, TransInfo *t)
Sequence *seq;
for (seq= ed->seqbasep->first; seq; seq= seq->next) {
/* hack */
- if ((seq->flag & SELECT)==0 && seq->type & SEQ_EFFECT) {
+ if ((seq->flag & SELECT)==0 && seq->type & SEQ_TYPE_EFFECT) {
Sequence *seq_user;
int i;
for (i=0; i<3; i++) {