diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-24 13:07:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-24 13:07:04 +0400 |
commit | 501efb0e7cb671cfa2e0dd37308ab6759f32cb49 (patch) | |
tree | dbdc6fb52c48447dfdeb8f0e411f1a89e517739e /source/blender/makesrna | |
parent | 93d89ec7683af9daf989fa643be3edceb1615ba1 (diff) |
Sequencer: bright/contrast modifier
Behaves in exactly the same way as bright/contrast compositor node.
Some code could be de-duplicated, like contrast formula and mask
influence, but wouldn't call it stopper for commit since it's
already needed for grading Mango.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index ab59d043daf..932c578899d 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -63,6 +63,7 @@ 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", ""}, + {seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""}, {0, NULL, 0, NULL, NULL} }; @@ -918,6 +919,8 @@ static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr) return &RNA_CurvesModifier; case seqModifierType_HueCorrect: return &RNA_HueCorrectModifier; + case seqModifierType_BrightContrast: + return &RNA_BrightContrastModifier; default: return &RNA_SequenceModifier; } @@ -2340,12 +2343,34 @@ static void rna_def_hue_modifier(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); } +static void rna_def_brightcontrast_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "BrightContrastModifier", "SequenceModifier"); + RNA_def_struct_sdna(srna, "BrightContrastModifierData"); + RNA_def_struct_ui_text(srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip"); + + prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "bright"); + RNA_def_property_ui_text(prop, "Bright", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); + + prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "contrast"); + RNA_def_property_ui_text(prop, "Contrast", ""); + 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); + rna_def_brightcontrast_modifier(brna); } void RNA_def_sequencer(BlenderRNA *brna) |