[Bf-blender-cvs] [09df0f0] gooseberry: Sequencer:
Antony Riakiotakis
noreply at git.blender.org
Wed Jun 10 14:06:33 CEST 2015
Commit: 09df0f0b772b836badf6e97bd91fcd88f63e5df2
Author: Antony Riakiotakis
Date: Wed Jun 10 14:05:47 2015 +0200
Branches: gooseberry
https://developer.blender.org/rB09df0f0b772b836badf6e97bd91fcd88f63e5df2
Sequencer:
Add option to ommit strip name and info display.
===================================================================
M release/scripts/startup/bl_ui/space_sequencer.py
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index e5fce82..ed04983 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -201,17 +201,17 @@ class SEQUENCER_MT_view(Menu):
layout.prop(st, "show_seconds")
layout.prop(st, "show_frame_indicator")
layout.prop(st, "show_strip_offset")
+ layout.prop(st, "show_info")
layout.prop_menu_enum(st, "waveform_draw_type")
if is_preview:
- if st.display_mode == 'IMAGE':
- layout.prop(st, "show_metadata")
- elif st.display_mode == 'WAVEFORM':
+ if st.display_mode == 'WAVEFORM':
layout.prop(st, "show_separate_color")
layout.prop(st, "show_metadata")
+
layout.separator()
if is_sequencer_view:
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 461afa0..b0d3fad 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -839,20 +839,22 @@ static void draw_seq_strip(const bContext *C, SpaceSeq *sseq, Scene *scene, AReg
{
drawmeta_contents(scene, seq, x1, y1, x2, y2);
}
-
- /* calculate if seq is long enough to print a name */
- x1 = seq->startdisp + handsize_clamped;
- x2 = seq->enddisp - handsize_clamped;
-
- /* info text on the strip */
- if (x1 < v2d->cur.xmin) x1 = v2d->cur.xmin;
- else if (x1 > v2d->cur.xmax) x1 = v2d->cur.xmax;
- if (x2 < v2d->cur.xmin) x2 = v2d->cur.xmin;
- else if (x2 > v2d->cur.xmax) x2 = v2d->cur.xmax;
-
- /* nice text here would require changing the view matrix for texture text */
- if ((x2 - x1) / pixelx > 32) {
- draw_seq_text(v2d, seq, x1, x2, y1, y2, background_col);
+
+ if (!(sseq->flag & SEQ_NO_INFO)) {
+ /* calculate if seq is long enough to print a name */
+ x1 = seq->startdisp + handsize_clamped;
+ x2 = seq->enddisp - handsize_clamped;
+
+ /* info text on the strip */
+ if (x1 < v2d->cur.xmin) x1 = v2d->cur.xmin;
+ else if (x1 > v2d->cur.xmax) x1 = v2d->cur.xmax;
+ if (x2 < v2d->cur.xmin) x2 = v2d->cur.xmin;
+ else if (x2 > v2d->cur.xmax) x2 = v2d->cur.xmax;
+
+ /* nice text here would require changing the view matrix for texture text */
+ if ((x2 - x1) / pixelx > 32) {
+ draw_seq_text(v2d, seq, x1, x2, y1, y2, background_col);
+ }
}
}
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index ad8b0fe..c7071d7 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -546,6 +546,7 @@ typedef enum eSpaceSeq_Flag {
SEQ_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */
SEQ_SHOW_SAFE_CENTER = (1 << 9),
SEQ_SHOW_METADATA = (1 << 10),
+ SEQ_NO_INFO = (1 << 11), /* do not draw names on strips */
} eSpaceSeq_Flag;
/* sseq->view */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 3e6c3ef..f97cc1e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3089,6 +3089,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of first visible strip");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+ prop = RNA_def_property(srna, "show_info", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_INFO);
+ RNA_def_property_ui_text(prop, "Show Strip Info", "Show source info on the strip");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+
prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
More information about the Bf-blender-cvs
mailing list