diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-02 13:05:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-02 13:07:23 +0300 |
commit | 2fc69d11c8a2df89c32a8bb320da2350fff7c8ba (patch) | |
tree | 6bba9022159f5c79b455c7d2a2138318045a6f3c /source/blender/makesrna | |
parent | ac2530be8c7b5742e89e517ae97386d89d935982 (diff) |
Add custom properties to sequence strips
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 231341ef554..0d46924c129 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -72,6 +72,7 @@ EnumPropertyItem sequence_modifier_type_items[] = { #ifdef RNA_RUNTIME #include "BKE_report.h" +#include "BKE_idprop.h" #include "WM_api.h" #include "WM_types.h" @@ -564,6 +565,18 @@ static char *rna_Sequence_path(PointerRNA *ptr) } } +static IDProperty *rna_Sequence_idprops(PointerRNA *ptr, bool create) +{ + Sequence *seq = ptr->data; + + if (create && !seq->prop) { + IDPropertyTemplate val = {0}; + seq->prop = IDP_New(IDP_GROUP, &val, "Sequence ID properties"); + } + + return seq->prop; +} + static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter) { ListBaseIterator *internal = &iter->internal.listbase; @@ -1397,6 +1410,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor"); RNA_def_struct_refine_func(srna, "rna_Sequence_refine"); RNA_def_struct_path_func(srna, "rna_Sequence_path"); + RNA_def_struct_idprops_func(srna, "rna_Sequence_idprops"); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set"); |