[Bf-blender-cvs] [117a7e3] master: Sequencer: optionally show strip offsets

Campbell Barton noreply at git.blender.org
Tue Dec 9 21:49:57 CET 2014


Commit: 117a7e3545409993f7a424f470130d63ec0cfc30
Author: Campbell Barton
Date:   Tue Dec 9 21:42:25 2014 +0100
Branches: master
https://developer.blender.org/rB117a7e3545409993f7a424f470130d63ec0cfc30

Sequencer: optionally show strip offsets

was disabled in recent sequencer refactor, enable with view menu option.

===================================================================

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 8826704..7eaf300 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -198,6 +198,7 @@ class SEQUENCER_MT_view(Menu):
         if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
             layout.prop(st, "show_seconds")
             layout.prop(st, "show_frame_indicator")
+            layout.prop(st, "show_strip_offset")
 
         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             if st.display_mode == 'IMAGE':
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index e499cd7..144f787 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -669,7 +669,7 @@ void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq)
 		draw_shadedstrip(seq, col, x1, y1, (float)(seq->start), y2);
 		
 		/* feint pinstripes, helps see exactly which is extended and which isn't,
-			 * especially when the extension is very small */
+		 * especially when the extension is very small */
 		if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
 		else UI_GetColorPtrShade3ubv(col, col, -16);
 		
@@ -687,7 +687,7 @@ void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq)
 		draw_shadedstrip(seq, col, (float)(seq->start + seq->len), y1, x2, y2);
 		
 		/* feint pinstripes, helps see exactly which is extended and which isn't,
-			 * especially when the extension is very small */
+		 * especially when the extension is very small */
 		if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, 24);
 		else UI_GetColorPtrShade3ubv(col, col, -16);
 		
@@ -736,6 +736,10 @@ static void draw_seq_strip(const bContext *C, SpaceSeq *sseq, Scene *scene, AReg
 		draw_shadedstrip(seq, background_col, x1, y1, x2, y2);
 	}
 	
+	if ((sseq->draw_flag & SEQ_DRAW_OFFSET_EXT) && !is_single_image) {
+		draw_sequence_extensions(scene, ar, seq);
+	}
+
 	draw_seq_handle(v2d, seq, handsize_clamped, SEQ_LEFTHANDLE);
 	draw_seq_handle(v2d, seq, handsize_clamped, SEQ_RIGHTHANDLE);
 	
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6489853..339b232 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -518,6 +518,7 @@ typedef enum eSpaceSeq_RegionType {
 /* sseq->draw_flag */
 typedef enum eSpaceSeq_DrawFlag {
 	SEQ_DRAW_BACKDROP              = (1 << 0),
+	SEQ_DRAW_OFFSET_EXT            = (1 << 1),
 } eSpaceSeq_DrawFlag;
 
 
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 017e60c..17d4c1b 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2630,6 +2630,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
 	RNA_def_property_boolean_sdna(prop, NULL, "draw_flag", SEQ_DRAW_BACKDROP);
 	RNA_def_property_ui_text(prop, "Use Backdrop", "Display result under strips");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+
+	prop = RNA_def_property(srna, "show_strip_offset", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "draw_flag", SEQ_DRAW_OFFSET_EXT);
+	RNA_def_property_ui_text(prop, "Show Offsets", "Display strip in/out offsets");
+	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
 }
 
 static void rna_def_space_text(BlenderRNA *brna)




More information about the Bf-blender-cvs mailing list