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>2016-01-25 13:16:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-25 13:16:49 +0300
commit8850775ce86fc2873f00bdd87aaec11f460c298a (patch)
treee46ecd0ba8c6187cc78350fd63e7e9175e5585d7 /source/blender/makesrna/intern/rna_sequencer.c
parent4f8b7f44206264d38562bb92a7c73596ab7d3b6c (diff)
Sequencer: Add option to use absolute mask animation time
This is handy for cases when mask is created on top of the edit and used for tasks like color grading and other enhancement. That was the main purpose of the masks which was totally broken in 6786ef6. Now it's possible to have masks created as both a part of input movie roto process (which then better be re-mapped to the strip timing) and as a grading tool (which should be using scene timing for the animation). Thanks artists from the Nieve for screaming about such a broken case.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index b49318b436e..2c66b737ca4 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -2422,6 +2422,12 @@ static void rna_def_modifier(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static const EnumPropertyItem mask_time_items[] = {
+ {SEQUENCE_MASK_TIME_RELATIVE, "RELATIVE", 0, "Relative", "Mask animation is offset to start of strip"},
+ {SEQUENCE_MASK_TIME_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Mask animation is in sync with scene frame"},
+ {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");
@@ -2458,6 +2464,12 @@ static void rna_def_modifier(BlenderRNA *brna)
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, "mask_time", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mask_time");
+ RNA_def_property_enum_items(prop, mask_time_items);
+ RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation");
+ 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");