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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-19 19:41:56 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-19 19:41:56 +0400
commit995a19a983b2c44ec9afec049395d7c1b4320137 (patch)
tree8333563ae983641434179839755aab67ecdc2aad /source/blender/makesrna
parent994d75b6ae78fee99afd949292e48c4f32292995 (diff)
Sequencer: per-sequence modifier stack for color grading
This implements basic color grading modifiers in sequencer, supporting color balance, RGB curves and HUE corrections. Implementation is close to object modifiers, some details are there: http://wiki.blender.org/index.php/User:Nazg-gul/SequencerModifiers Modifiers supports multi-threaded calculation, masks and instant parameter changes. Also added cache for pre-processed image buffers for current frame, so changing sequence properties does not require rendering of original sequence (like rendering scene, loading file from disk and so)
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c333
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c1
2 files changed, 314 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 6fc304e6bbb..fd8195005aa 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -332,8 +332,9 @@ static char *rna_SequenceTransform_path(PointerRNA *ptr)
return BLI_strdup("");
}
-static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_transform(ed, ptr->data);
@@ -376,8 +377,9 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr)
return BLI_strdup("");
}
-static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_crop(ed, ptr->data);
@@ -613,8 +615,9 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
}
#endif
-static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (ed) {
@@ -638,8 +641,9 @@ static int rna_Sequence_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
return TRUE;
}
-static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE);
@@ -648,16 +652,18 @@ static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene,
BKE_sequencer_update_sound_bounds(scene, ptr->data);
}
-static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Sequence_mute_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
BKE_sequencer_update_muting(ed);
rna_Sequence_update(bmain, scene, ptr);
}
-static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Sequence *seq = (Sequence *)(ptr->data);
BKE_sequence_reload_new_file(scene, seq, TRUE);
BKE_sequence_calc(scene, seq);
@@ -686,8 +692,9 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
return data.seq;
}
-static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
@@ -695,8 +702,9 @@ static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *p
rna_Sequence_frame_change_update(scene, seq);
}
-static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
@@ -724,6 +732,22 @@ static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
data->seq = seq;
return -1; /* done so bail out */
}
+
+ if (seq->modifiers.first) {
+ SequenceModifierData *smd = seq->modifiers.first;
+
+ for (smd = seq->modifiers.first; smd; smd = smd->next) {
+ if (smd->type == seqModifierType_ColorBalance) {
+ ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd;
+
+ if (&cbmd->color_balance == data->data) {
+ data->seq = seq;
+ return -1; /* done so bail out */
+ }
+ }
+ }
+ }
+
return 1;
}
@@ -752,12 +776,16 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
return BLI_strdup("");
}
-static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
+ Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data);
- BKE_sequence_invalidate_cache(scene, seq);
+ if (seq->strip->color_balance == ptr->data)
+ BKE_sequence_invalidate_cache(scene, seq);
+ else
+ BKE_sequence_invalidate_cache_for_modifier(scene, seq);
}
static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
@@ -825,6 +853,113 @@ static float rna_WipeSequence_angle_get(PointerRNA *ptr)
return DEG2RADF(((WipeVars *)seq->effectdata)->angle);
}
+static int modifier_seq_cmp_cb(Sequence *seq, void *arg_pt)
+{
+ SequenceSearchData *data = arg_pt;
+
+ if (BLI_findindex(&seq->modifiers, data->data) != -1) {
+ data->seq = seq;
+ return -1; /* done so bail out */
+ }
+
+ return 1;
+}
+
+static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd)
+{
+ SequenceSearchData data;
+
+ data.seq = NULL;
+ data.data = smd;
+
+ /* irritating we need to search for our sequence! */
+ BKE_sequencer_base_recursive_apply(&ed->seqbase, modifier_seq_cmp_cb, &data);
+
+ return data.seq;
+}
+
+static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr)
+{
+ SequenceModifierData *smd = (SequenceModifierData *) ptr->data;
+
+ switch (smd->type) {
+ case seqModifierType_ColorBalance:
+ return &RNA_ColorBalanceModifier;
+ case seqModifierType_Curves:
+ return &RNA_CurvesModifier;
+ case seqModifierType_HueCorrect:
+ return &RNA_HueCorrectModifier;
+ default:
+ return &RNA_SequenceModifier;
+ }
+}
+
+static char *rna_SequenceModifier_path(PointerRNA *ptr)
+{
+ Scene *scene = ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+ SequenceModifierData *smd = ptr->data;
+ Sequence *seq = sequence_get_by_modifier(ed, smd);
+
+ if (seq && seq->name + 2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"]", seq->name + 2, smd->name);
+ else
+ return BLI_strdup("");
+}
+
+static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value)
+{
+ SequenceModifierData *smd = ptr->data;
+ Scene *scene = (Scene *) ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+ Sequence *seq = sequence_get_by_modifier(ed, smd);
+ AnimData *adt;
+ char oldname[sizeof(smd->name)];
+
+ /* make a copy of the old name first */
+ BLI_strncpy(oldname, smd->name, sizeof(smd->name));
+
+ /* copy the new name into the name slot */
+ BLI_strncpy_utf8(smd->name, value, sizeof(smd->name));
+
+ /* make sure the name is truly unique */
+ BKE_sequence_modifier_unique_name(seq, smd);
+
+ /* fix all the animation data which may link to this */
+ adt = BKE_animdata_from_id(&scene->id);
+ if (adt) {
+ char path[1024];
+
+ BLI_snprintf(path, sizeof(path), "sequence_editor.sequences_all[\"%s\"].modifiers", seq->name);
+ BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, path, oldname, smd->name + 2, 0, 0, 1);
+ }
+}
+
+static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ /* strip from other scenes could be modified, so using active scene is not reliable */
+ Scene *scene = (Scene *) ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+ Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
+
+ BKE_sequence_invalidate_cache_for_modifier(scene, seq);
+}
+
+static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
+{
+ Scene *scene = (Scene *) ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+ Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
+ Sequence *cur = (Sequence *) value.data;
+
+ if (seq == cur)
+ return FALSE;
+
+ if (BKE_sequence_check_depend(seq, cur))
+ return FALSE;
+
+ return TRUE;
+}
#else
@@ -991,13 +1126,13 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
}
-static void rna_def_strip_color_balance(BlenderRNA *brna)
+static void rna_def_color_balance(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "SequenceColorBalance", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
+ srna = RNA_def_struct(brna, "SequenceColorBalanceData", NULL);
+ RNA_def_struct_ui_text(srna, "Sequence Color Balance Data", "Color balance parameters for a sequence strip and it's modifiers");
RNA_def_struct_sdna(srna, "StripColorBalance");
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
@@ -1005,19 +1140,19 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
-
+
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
-
+
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
-
+
prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
RNA_def_property_ui_text(prop, "Inverse Gain", "");
@@ -1033,15 +1168,13 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse Lift", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
- RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
-
/* not yet used */
#if 0
prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Exposure", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
-
+
prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Saturation", "");
@@ -1049,6 +1182,17 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
#endif
}
+static void rna_def_strip_color_balance(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna = RNA_def_struct(brna, "SequenceColorBalance", "SequenceColorBalanceData");
+ RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
+ RNA_def_struct_sdna(srna, "StripColorBalance");
+
+ RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
+}
+
EnumPropertyItem blend_mode_items[] = {
{SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
{SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
@@ -1062,6 +1206,18 @@ EnumPropertyItem blend_mode_items[] = {
{0, NULL, 0, NULL, NULL}
};
+static void rna_def_sequence_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+
+ RNA_def_property_srna(cprop, "SequenceModifiers");
+ srna = RNA_def_struct(brna, "SequenceModifiers", NULL);
+ RNA_def_struct_sdna(srna, "Sequence");
+ RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers");
+
+ /* TODO: implement new/remove/clear methods for modifier stack */
+}
+
static void rna_def_sequence(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1253,6 +1409,12 @@ static void rna_def_sequence(BlenderRNA *brna)
"to this frame");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+ /* modifiers */
+ prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "SequenceModifier");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip");
+ rna_def_sequence_modifiers(brna, prop);
+
RNA_api_sequence_strip(srna);
}
@@ -1475,7 +1637,7 @@ static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
*/
if (supports_mask) {
- prop = RNA_def_property(srna, "input_mask", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Sequence_otherSequence_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1963,8 +2125,138 @@ static void rna_def_effects(BlenderRNA *brna)
}
}
+static void rna_def_modifier(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem sequence_modifier_type_items[] = {
+ {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""},
+ {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""},
+ {seqModifierType_HueCorrect,"HUE_CORRECT", ICON_NONE, "Hue Correct", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static const EnumPropertyItem mask_input_type_items[] = {
+ {SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"},
+ {SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ srna = RNA_def_struct(brna, "SequenceModifier", NULL);
+ RNA_def_struct_sdna(srna, "SequenceModifierData");
+ RNA_def_struct_ui_text(srna, "SequenceModifier", "Modifier for sequence strip");
+ RNA_def_struct_refine_func(srna, "rna_SequenceModifier_refine");
+ RNA_def_struct_path_func(srna, "rna_SequenceModifier_path");
+
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceModifier_name_set");
+ RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
+
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_enum_items(prop, sequence_modifier_type_items);
+ RNA_def_property_ui_text(prop, "Type", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
+
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_MUTE);
+ RNA_def_property_ui_text(prop, "Mute", "Mute this modifier");
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_EXPANDED);
+ RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
+
+ prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mask_input_type");
+ RNA_def_property_enum_items(prop, mask_input_type_items);
+ RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+
+ prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SequenceModifier_otherSequence_poll");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+
+ prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "mask_id");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+}
+
+static void rna_def_colorbalance_modifier(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "ColorBalanceModifier", "SequenceModifier");
+ RNA_def_struct_sdna(srna, "ColorBalanceModifierData");
+ RNA_def_struct_ui_text(srna, "ColorBalanceModifier", "Color balance modifier for sequence strip");
+
+ prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "SequenceColorBalanceData");
+
+ prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
+ RNA_def_property_float_sdna(prop, NULL, "color_multiply");
+ RNA_def_property_range(prop, 0.0f, 20.0f);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Multiply Colors", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+}
+
+static void rna_def_curves_modifier(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "CurvesModifier", "SequenceModifier");
+ RNA_def_struct_sdna(srna, "CurvesModifierData");
+ RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip");
+
+ prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
+ RNA_def_property_struct_type(prop, "CurveMapping");
+ RNA_def_property_ui_text(prop, "Curve Mapping", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+}
+
+static void rna_def_hue_modifier(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "HueCorrectModifier", "SequenceModifier");
+ RNA_def_struct_sdna(srna, "HueCorrectModifierData");
+ RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip");
+
+ prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
+ RNA_def_property_struct_type(prop, "CurveMapping");
+ RNA_def_property_ui_text(prop, "Curve Mapping", "");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
+}
+
+static void rna_def_modifiers(BlenderRNA *brna)
+{
+ rna_def_modifier(brna);
+ rna_def_colorbalance_modifier(brna);
+ rna_def_curves_modifier(brna);
+ rna_def_hue_modifier(brna);
+}
+
void RNA_def_sequencer(BlenderRNA *brna)
{
+ rna_def_color_balance(brna);
+
rna_def_strip_element(brna);
rna_def_strip_proxy(brna);
rna_def_strip_color_balance(brna);
@@ -1983,6 +2275,7 @@ void RNA_def_sequencer(BlenderRNA *brna)
rna_def_sound(brna);
rna_def_effect(brna);
rna_def_effects(brna);
+ rna_def_modifiers(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 96ddcce6004..cf43bd74d72 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -125,6 +125,7 @@ void RNA_api_ui_layout(StructRNA *srna)
{0, "NONE", 0, "None", ""},
{'v', "VECTOR", 0, "Vector", ""},
{'c', "COLOR", 0, "Color", ""},
+ {'h', "HUE", 0, "Hue", ""},
{0, NULL, 0, NULL, NULL}
};