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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index d62509e5ab5..d7311b93b2f 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -546,6 +546,8 @@ static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
return &RNA_SpeedControlSequence;
case SEQ_TYPE_GAUSSIAN_BLUR:
return &RNA_GaussianBlurSequence;
+ case SEQ_TYPE_TEXT:
+ return &RNA_TextSequence;
default:
return &RNA_Sequence;
}
@@ -1407,6 +1409,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
+ {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -2302,6 +2305,42 @@ static void rna_def_gaussian_blur(StructRNA *srna)
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
+static void rna_def_text(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
+
+ prop = RNA_def_property(srna, "text_size", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "Size", "Size of the text");
+ RNA_def_property_ui_range(prop, 0.0f, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "xpos", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "X Position", "X position of the text");
+ RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "ypos", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Y Position", "Y position of the text");
+ RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow", "draw text with shadow");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "use_autocenter", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_AUTO_CENTER);
+ RNA_def_property_ui_text(prop, "Auto-Center", "draw text centered in x axis");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+}
+
static EffectInfo def_effects[] = {
{"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
{"AdjustmentSequence", "Adjustment Layer Sequence",
@@ -2326,6 +2365,8 @@ static EffectInfo def_effects[] = {
rna_def_wipe, 1},
{"GaussianBlurSequence", "Gaussian Blur Sequence", "Sequence strip creating a gaussian blur",
rna_def_gaussian_blur, 1},
+ {"TextSequence", "Text Sequence", "Sequence strip creating text",
+ rna_def_text, 0},
{"", "", "", NULL, 0}
};