diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 20 |
2 files changed, 23 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index e849e84ff38..a41551fc8da 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1401,26 +1401,26 @@ static void rna_def_sequence(BlenderRNA *brna) prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "startofs"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ +// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ RNA_def_property_ui_text(prop, "Start Offset", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "endofs"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ +// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ RNA_def_property_ui_text(prop, "End Offset", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "startstill"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ +// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "Start Still", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "endstill"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ +// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "End Still", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 7602ec99c2b..69d35a3c2f0 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -37,6 +37,8 @@ #include "DNA_scene_types.h" #include "DNA_sequence_types.h" +#include "BLI_utildefines.h" + #ifdef RNA_RUNTIME //#include "DNA_anim_types.h" @@ -62,6 +64,16 @@ #include "WM_api.h" +static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, int do_data) +{ + if (do_data) { + BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true); + // new_tstripdata(self); // need 2.6x version of this. + } + BKE_sequence_calc((Scene *)id, self); + BKE_sequence_calc_disp((Scene *)id, self); +} + static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports, Sequence *seq_other) { const char *error_msg; @@ -389,7 +401,13 @@ void RNA_api_sequence_strip(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - func = RNA_def_function(srna, "getStripElem", "BKE_sequencer_give_stripelem"); + func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc"); + RNA_def_function_flag(func, FUNC_USE_SELF_ID); + RNA_def_function_ui_description(func, "Update the strip dimensions"); + parm = RNA_def_boolean(func, "data", false, "Frame", + "Update strip data"); + + func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem"); RNA_def_function_ui_description(func, "Return the strip element from a given frame or None"); parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame", "The frame to get the strip element from", -MAXFRAME, MAXFRAME); |