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-06 20:44:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-06 20:44:05 +0400
commit2a95a246eda72b3d08d0572562953a5703baa4b7 (patch)
tree788de89efeecb3cef2ca2af681310be4fa6a7224 /source/blender/makesrna/intern/rna_sequencer.c
parent577cd54c8e88d97ecb87c7c0b01bf3fd6703e2ee (diff)
color balance can now be animated in the sequencer.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 5cd4db205f5..b7bdffa0e13 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -483,6 +483,37 @@ static void rna_Sequence_opacity_set(PointerRNA *ptr, float value) {
((Sequence*)(ptr->data))->blend_opacity = value * 100.0f;
}
+
+static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
+{
+ struct { Sequence *seq; void *color_balance; } *data= arg_pt;
+
+ if(seq->strip && seq->strip->color_balance == data->color_balance) {
+ data->seq= seq;
+ return -1; /* done so bail out */
+ }
+ return 1;
+}
+static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
+{
+ Scene *scene= ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+ Sequence *seq;
+
+ struct { Sequence *seq; void *color_balance; } data;
+ data.seq= NULL;
+ data.color_balance= ptr->data;
+
+ /* irritating we need to search for our sequence! */
+ seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
+ seq= data.seq;
+
+ if (seq && seq->name+2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name+2);
+ else
+ return BLI_strdup("");
+}
+
#else
static void rna_def_strip_element(BlenderRNA *brna)
@@ -613,7 +644,9 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
RNA_def_property_ui_text(prop, "Inverse Lift", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
+
+ RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
+
/* not yet used
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -1320,7 +1353,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
+ RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single g");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);