VSE: Strip drawing improvements
This patch include changes: - Thicker and clearer selection indication - Slimmer handles - More transparent muted strips - Trim frame number is drawn inside the strip - Strip text is drawn in upper part of strip - Color strips now have specific color, with chosen color drawn under strip text - Transition strip will use color of input strips showing direction of transition - Selecting effect strip will highlight input strips - Selecting multicam strips will highlight target channel - Missing media state is now indicated by a red line drawn on the top part of the strip - A checkerboard pattern is now drawn on the outsides of the meta range - Hold still regions are now always drawn if existent, with a darker shade of the strip’s background color Author: Alessio Monti di Sopra <a.monti> Reviewed By: ISS Differential Revision: https://developer.blender.org/D6883
This commit is contained in:
@@ -806,14 +806,6 @@ void BKE_sequence_calc_disp(Scene *scene, Sequence *seq)
|
||||
seq->startdisp = seq->start + seq->startofs - seq->startstill;
|
||||
seq->enddisp = seq->start + seq->len - seq->endofs + seq->endstill;
|
||||
|
||||
seq->handsize = 10.0; /* 10 frames */
|
||||
if (seq->enddisp - seq->startdisp < 10) {
|
||||
seq->handsize = (float)(0.5 * (seq->enddisp - seq->startdisp));
|
||||
}
|
||||
else if (seq->enddisp - seq->startdisp > 250) {
|
||||
seq->handsize = (float)((seq->enddisp - seq->startdisp) / 25);
|
||||
}
|
||||
|
||||
if (seq->type == SEQ_TYPE_META) {
|
||||
seq_update_sound_bounds_recursive(scene, seq);
|
||||
}
|
||||
|
||||
@@ -207,6 +207,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
||||
*/
|
||||
{
|
||||
/* Keep this block, even when empty. */
|
||||
FROM_DEFAULT_V4_UCHAR(space_sequencer.active_strip);
|
||||
FROM_DEFAULT_V4_UCHAR(space_sequencer.selected_strip);
|
||||
FROM_DEFAULT_V4_UCHAR(space_sequencer.color_strip);
|
||||
FROM_DEFAULT_V4_UCHAR(space_sequencer.mask);
|
||||
}
|
||||
|
||||
#undef FROM_DEFAULT_V4_UCHAR
|
||||
|
||||
@@ -205,10 +205,12 @@ typedef enum ThemeColorID {
|
||||
TH_SEQ_SCENE,
|
||||
TH_SEQ_AUDIO,
|
||||
TH_SEQ_EFFECT,
|
||||
TH_SEQ_TRANSITION,
|
||||
TH_SEQ_META,
|
||||
TH_SEQ_TEXT,
|
||||
TH_SEQ_PREVIEW,
|
||||
TH_SEQ_COLOR,
|
||||
TH_SEQ_ACTIVE,
|
||||
TH_SEQ_SELECTED,
|
||||
|
||||
TH_EDGE_SHARP,
|
||||
TH_EDITMESH_ACTIVE,
|
||||
|
||||
@@ -665,9 +665,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
case TH_SEQ_EFFECT:
|
||||
cp = ts->effect;
|
||||
break;
|
||||
case TH_SEQ_TRANSITION:
|
||||
cp = ts->transition;
|
||||
break;
|
||||
case TH_SEQ_META:
|
||||
cp = ts->meta;
|
||||
break;
|
||||
@@ -677,6 +674,15 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
case TH_SEQ_PREVIEW:
|
||||
cp = ts->preview_back;
|
||||
break;
|
||||
case TH_SEQ_COLOR:
|
||||
cp = ts->color_strip;
|
||||
break;
|
||||
case TH_SEQ_ACTIVE:
|
||||
cp = ts->active_strip;
|
||||
break;
|
||||
case TH_SEQ_SELECTED:
|
||||
cp = ts->selected_strip;
|
||||
break;
|
||||
|
||||
case TH_CONSOLE_OUTPUT:
|
||||
cp = ts->console_output;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
set(INC
|
||||
../include
|
||||
../../blenfont
|
||||
../../blenkernel
|
||||
../../blenlib
|
||||
../../blentranslation
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -407,7 +407,7 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[
|
||||
|
||||
/* clamp handles to defined size in pixel space */
|
||||
|
||||
handsize = seq->handsize;
|
||||
handsize = 2.0f * sequence_handle_size_get_clamped(seq, pixelx);
|
||||
displen = (float)abs(seq->startdisp - seq->enddisp);
|
||||
|
||||
/* don't even try to grab the handles of small strips */
|
||||
|
||||
@@ -1044,7 +1044,7 @@ static int sequencer_box_select_exec(bContext *C, wmOperator *op)
|
||||
if (handles) {
|
||||
/* Get the handles draw size. */
|
||||
float pixelx = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask);
|
||||
float handsize = sequence_handle_size_get_clamped(seq, pixelx) * 0.75f;
|
||||
float handsize = sequence_handle_size_get_clamped(seq, pixelx);
|
||||
|
||||
/* Right handle. */
|
||||
if (rectf.xmax > (seq->enddisp - handsize)) {
|
||||
|
||||
@@ -324,7 +324,7 @@ typedef struct ThemeSpace {
|
||||
unsigned char syntaxd[4], syntaxr[4]; // in nodespace used for distort
|
||||
|
||||
unsigned char line_numbers[4];
|
||||
char _pad6[3];
|
||||
char _pad6[7];
|
||||
|
||||
unsigned char nodeclass_output[4], nodeclass_filter[4];
|
||||
unsigned char nodeclass_vector[4], nodeclass_texture[4];
|
||||
@@ -333,7 +333,8 @@ typedef struct ThemeSpace {
|
||||
|
||||
/** For sequence editor. */
|
||||
unsigned char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4];
|
||||
unsigned char effect[4], transition[4], meta[4], text_strip[4];
|
||||
unsigned char effect[4], transition[4], meta[4], text_strip[4], color_strip[4];
|
||||
unsigned char active_strip[4], selected_strip[4];
|
||||
|
||||
/** For dopesheet - scale factor for size of keyframes (i.e. height of channels). */
|
||||
float keyframe_scale_fac;
|
||||
|
||||
@@ -3079,10 +3079,9 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Effect Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "transition");
|
||||
prop = RNA_def_property(srna, "color_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Transition Strip", "");
|
||||
RNA_def_property_ui_text(prop, "Color Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
@@ -3091,11 +3090,27 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Meta Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "mask_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "mask");
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Mask Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "text_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Text Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "active_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Active Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "selected_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Selected Strips", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "cframe");
|
||||
RNA_def_property_array(prop, 3);
|
||||
|
||||
Reference in New Issue
Block a user