[Bf-blender-cvs] [f5efcfd] terrible_consequencer: WIP for overlay under sequencer strip view.

Antony Riakiotakis noreply at git.blender.org
Fri Sep 19 19:15:42 CEST 2014


Commit: f5efcfd3a7b40f0849b9a56c173e4c3a1e66e83a
Author: Antony Riakiotakis
Date:   Thu Sep 4 19:51:17 2014 +0200
Branches: terrible_consequencer
https://developer.blender.org/rBf5efcfd3a7b40f0849b9a56c173e4c3a1e66e83a

WIP for overlay under sequencer strip view.

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

M	release/scripts/startup/bl_ui/space_sequencer.py
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_sequencer/sequencer_edit.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 d887e37..7325afb 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -82,6 +82,7 @@ class SEQUENCER_HT_header(Header):
 
             layout.separator()
             layout.operator("sequencer.refresh_all")
+            layout.prop(st, "overlay_viewer")
         else:
             if st.view_type == 'SEQUENCER_PREVIEW':
                 layout.separator()
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index bc251a4..830e47b 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1607,11 +1607,14 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
 	
 	/* draw backdrop */
 	draw_seq_backdrop(v2d);
-	
+
 	/* regular grid-pattern over the rest of the view (i.e. 25-frame grid lines) */
 	// NOTE: the gridlines are currently spaced every 25 frames, which is only fine for 25 fps, but maybe not for 30...
 	UI_view2d_constant_grid_draw(v2d);
 
+	if (sseq->overlay_viewer)
+		draw_image_seq(C, scene, ar, sseq, scene->r.cfra, 0, false);
+	
 	ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
 	
 	seq_draw_sfra_efra(scene, v2d);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 223bada..05467bd 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1921,7 +1921,7 @@ void SEQUENCER_OT_trim(struct wmOperatorType *ot)
 	/* identifiers */
 	ot->name = "Trim Strips";
 	ot->idname = "SEQUENCER_OT_trim";
-	ot->description = "Trim the contents of the selected strips";
+	ot->description = "Trim the contents of the active strip";
 	
 	/* api callbacks */
 	ot->invoke = sequencer_trim_invoke;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6f57f54..e6e2df5 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -498,7 +498,9 @@ typedef struct SpaceSeq {
 	float zoom DNA_DEPRECATED;  /* deprecated, handled by View2D now */
 	int view; /* see SEQ_VIEW_* below */
 	int overlay_type;
-
+	int overlay_viewer; /* overlay an image of the editing on below the strips */
+	int pad;
+	
 	struct bGPdata *gpd;        /* grease-pencil data */
 
 	struct SequencerScopes scopes;  /* different scoped displayed in space */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 5ca38aa..764fbfc 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2603,6 +2603,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
 	RNA_def_property_enum_items(prop, overlay_type_items);
 	RNA_def_property_ui_text(prop, "Overlay Type", "Overlay draw type");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+
+	prop = RNA_def_property(srna, "overlay_viewer", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "overlay_viewer", 1);
+	RNA_def_property_ui_text(prop, "Overlay", "Overlay result under strips");
+	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