diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-02 20:30:50 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-02 20:30:50 +0300 |
commit | 5709b9951eed094f6bcfb00ba22b4807dd81873b (patch) | |
tree | 4a15613b3ff953e572c5a1624cf6e19f0a921fd6 /source/blender/makesrna | |
parent | 1d930382e67e4779b3c87ccdd311a043b89ca107 (diff) | |
parent | 00808eb39ac04c484fcabac6b18666cb2a0191e7 (diff) |
Merge branch 'master' into gooseberry
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_camera.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 41 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 1 |
4 files changed, 45 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index acbaae167db..f769e0de2ac 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -632,6 +632,7 @@ extern StructRNA RNA_ThemeNodeEditor; extern StructRNA RNA_ThemeOutliner; extern StructRNA RNA_ThemeProperties; extern StructRNA RNA_ThemeSequenceEditor; +extern StructRNA RNA_TextSequence; extern StructRNA RNA_ThemeSpaceGeneric; extern StructRNA RNA_ThemeSpaceGradient; extern StructRNA RNA_ThemeSpaceListGeneric; diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 9aec0ea43cc..b82f3c88c56 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -281,14 +281,14 @@ void RNA_def_camera(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "shiftx"); RNA_def_property_range(prop, -10.0f, 10.0f); RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3); - RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift"); + RNA_def_property_ui_text(prop, "Shift X", "Camera horizontal shift"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); prop = RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shifty"); RNA_def_property_range(prop, -10.0f, 10.0f); RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3); - RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift"); + RNA_def_property_ui_text(prop, "Shift Y", "Camera vertical shift"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); prop = RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_DISTANCE); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 1cb728c7b9e..02360ebf85e 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} }; @@ -2307,6 +2310,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", @@ -2331,6 +2370,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} }; diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 5e9866fa73e..13fda02c7c8 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -474,6 +474,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) {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} }; |