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:
authorJoshua Leung <aligorith@gmail.com>2011-06-16 06:46:38 +0400
committerJoshua Leung <aligorith@gmail.com>2011-06-16 06:46:38 +0400
commitcfcc4b4fcd7dabd0929db53fc5a9cf0833704259 (patch)
treea61c1736ae50f7581e3d06ddeafb8ae7901a978b /source/blender/makesrna/intern/rna_sequencer.c
parent4ef1e67ce8245e03ff41c00a09be98d65dfe49f5 (diff)
== Simple Title Cards for Sequencer ==
This commit adds an experimental effect strip to the sequencer: "Title Card". This is useful for adding simple one-line text section headers or "title cards" (i.e. title + author/contact details) to video clips, which is often seen in demo videos accompanying papers and/or animation tests. See http://aligorith.blogspot.com/2011/06/gsoc11-simple-title- cards.html for some more details on usage. Code notes: - There are a few things I've done here which will probably need cleaning up. For instance, the hacks to get threadsafe fonts for rendering, and also the way I've tried to piggyback the backdrop drawing on top of the Solid Colour strips (this method was used to keep changes here minimal, but is quite fragile if things change).
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 8c4e4d9e736..eb2d38e9778 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -418,6 +418,8 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
return &RNA_ColorSequence;
case SEQ_SPEED:
return &RNA_SpeedControlSequence;
+ case SEQ_TITLECARD:
+ return &RNA_TitleCardSequence;
default:
return &RNA_Sequence;
}
@@ -886,6 +888,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_SPEED, "SPEED", 0, "Speed", ""},
{SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
+ {SEQ_TITLECARD, "TITLE_CARD", 0, "Title Card", ""},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem blend_mode_items[]= {
@@ -1666,6 +1669,37 @@ static void rna_def_speed_control(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
+static void rna_def_title_card(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "TitleCardSequence", "EffectSequence");
+ RNA_def_struct_ui_text(srna, "Title Card Sequence", "Sequence strip creating an image displaying some text on a plain color background");
+ RNA_def_struct_sdna_from(srna, "TitleCardVars", "effectdata");
+
+ /* texts */
+ prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "titlestr");
+ RNA_def_property_ui_text(prop, "Title", "Text for main heading");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "subtitle", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Subtitle", "Additional text to be shown under the main heading");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ /* colors */
+ prop= RNA_def_property(srna, "color_background", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "bgcol");
+ RNA_def_property_ui_text(prop, "Background Color", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "color_foreground", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "fgcol");
+ RNA_def_property_ui_text(prop, "Text Color", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+}
+
void RNA_def_sequencer(BlenderRNA *brna)
{
rna_def_strip_element(brna);
@@ -1691,6 +1725,7 @@ void RNA_def_sequencer(BlenderRNA *brna)
rna_def_transform(brna);
rna_def_solid_color(brna);
rna_def_speed_control(brna);
+ rna_def_title_card(brna);
}
#endif