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>2010-07-08 14:03:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-08 14:03:29 +0400
commitb511fbea6d3e0185f8ba39405bc9f71dab7a5f20 (patch)
treeee404999004e76ccc6ff941d62b4d62d7afae69a /source/blender/makesrna/intern/rna_sequencer.c
parentff51a96d58f423a686cc9b195f0bf2361625fb1a (diff)
Sequencer display overlay option, this can show a border area from another time to help compare for color grading.
- Okey sets the border in the display. - Okey resets the frame offset in the sequencer timeline. - ghost icon in the header can enable/disable. - frame offset can be relative or absolute (lock icon) Not very happy that this commit adds a call to BKE_animsys_evaluate_animdata(scene, ...) in do_build_seq_array_recursively() without this the offset frames dont have fcurves applied. Though we will need something like this for prefetch frames to work too.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index c8b7299b539..0c60f04c2c2 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -521,6 +521,55 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
return BLI_strdup("");
}
+static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return;
+
+ /* convert from abs to relative and back */
+ if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS)==0 && value) {
+ ed->over_cfra= scene->r.cfra + ed->over_ofs;
+ ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
+ }
+ else if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
+ ed->over_ofs= ed->over_cfra - scene->r.cfra;
+ ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
+ }
+}
+
+static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return scene->r.cfra;
+
+ if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ return ed->over_cfra - scene->r.cfra;
+ else
+ return ed->over_ofs;
+
+}
+
+static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= (Scene *)ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return;
+
+
+ if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ ed->over_cfra= (scene->r.cfra + value);
+ else
+ ed->over_ofs= value;
+}
+
#else
static void rna_def_strip_element(BlenderRNA *brna)
@@ -887,6 +936,22 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
RNA_def_property_flag(prop, PROP_EDITABLE);
+ prop= RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
+ RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay ontop of the sequencer");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+
+ prop= RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
+ RNA_def_property_ui_text(prop, "Overlay Lock", "");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+
+ /* access to fixed and relative frame */
+ prop= RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Overlay Offset", "");
+ RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
RNA_def_property_ui_text(prop, "Active Strip", "Sequencers active strip");
}