diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-08 15:59:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-08 15:59:21 +0300 |
commit | 0304b623f559a515e844cdb12bec6a27e01251c2 (patch) | |
tree | 9edc1557dae3f464636ce13a6570728f450c569c /source | |
parent | 88b0e1c52ad9df86ea3ca7c897672babfe21be0b (diff) |
RNA: added common sequencer properties notifiers/updates. Still some
updates missing.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequence.c | 185 |
1 files changed, 115 insertions, 70 deletions
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c index cb9863d7ea5..4f9d2a3d6ca 100644 --- a/source/blender/makesrna/intern/rna_sequence.c +++ b/source/blender/makesrna/intern/rna_sequence.c @@ -42,7 +42,7 @@ #ifdef RNA_RUNTIME -static void rna_SequenceEditor_start_frame_set(PointerRNA *ptr, int value) +static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; Scene *sce= (Scene*)ptr->id.data; @@ -57,7 +57,7 @@ static void rna_SequenceEditor_start_frame_set(PointerRNA *ptr, int value) sort_seq(sce); } -static void rna_SequenceEditor_length_set(PointerRNA *ptr, int value) +static void rna_Sequence_length_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; Scene *sce= (Scene*)ptr->id.data; @@ -72,13 +72,13 @@ static void rna_SequenceEditor_length_set(PointerRNA *ptr, int value) sort_seq(sce); } -static int rna_SequenceEditor_length_get(PointerRNA *ptr) +static int rna_Sequence_length_get(PointerRNA *ptr) { Sequence *seq= (Sequence*)ptr->data; return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0); } -static void rna_SequenceEditor_channel_set(PointerRNA *ptr, int value) +static void rna_Sequence_channel_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; Scene *sce= (Scene*)ptr->id.data; @@ -93,7 +93,7 @@ static void rna_SequenceEditor_channel_set(PointerRNA *ptr, int value) } /* properties that need to allocate structs */ -static void rna_SequenceEditor_use_color_balance_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; int c; @@ -113,7 +113,7 @@ static void rna_SequenceEditor_use_color_balance_set(PointerRNA *ptr, int value) } } -static void rna_SequenceEditor_use_proxy_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; if(value) { @@ -126,7 +126,7 @@ static void rna_SequenceEditor_use_proxy_set(PointerRNA *ptr, int value) } } -static void rna_SequenceEditor_use_translation_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; if(value) { @@ -139,7 +139,7 @@ static void rna_SequenceEditor_use_translation_set(PointerRNA *ptr, int value) } } -static void rna_SequenceEditor_use_crop_set(PointerRNA *ptr, int value) +static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; if(value) { @@ -263,6 +263,19 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value) BLI_strncpy(elem->name, name, sizeof(elem->name)); } +static void rna_Sequence_update(bContext *C, PointerRNA *ptr) +{ + Scene *scene= (Scene*)ptr->id.data; + Editing *ed= seq_give_editing(scene, FALSE); + + free_imbuf_seq(scene, &ed->seqbase, FALSE); +} + +static void rna_Sequence_sound_update(bContext *C, PointerRNA *ptr) +{ + /* TODO */ +} + #else static void rna_def_strip_element(BlenderRNA *brna) @@ -278,6 +291,7 @@ static void rna_def_strip_element(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "Filename", ""); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceElement_filename_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_strip_crop(BlenderRNA *brna) @@ -292,18 +306,22 @@ static void rna_def_strip_crop(BlenderRNA *brna) prop= RNA_def_property(srna, "top", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Top", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "bottom", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Bottom", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "left", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Left", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "right", PROP_INT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Right", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_strip_transform(BlenderRNA *brna) @@ -319,11 +337,13 @@ static void rna_def_strip_transform(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "xofs"); RNA_def_property_ui_text(prop, "Offset Y", ""); RNA_def_property_ui_range(prop, -4096, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "yofs"); RNA_def_property_ui_text(prop, "Offset Y", ""); RNA_def_property_ui_range(prop, -4096, 4096, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_strip_proxy(BlenderRNA *brna) @@ -338,10 +358,12 @@ static void rna_def_strip_proxy(BlenderRNA *brna) prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "dir"); RNA_def_property_ui_text(prop, "Directory", "Location to story the proxy file"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "file", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "file"); RNA_def_property_ui_text(prop, "File", "Proxy file name"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_strip_color_balance(BlenderRNA *brna) @@ -355,33 +377,41 @@ static void rna_def_strip_color_balance(BlenderRNA *brna) prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR); RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_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_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_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_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "inverse_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", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "inverse_gamma", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAMMA); RNA_def_property_ui_text(prop, "Inverse Gamma", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "inverse_lift", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT); RNA_def_property_ui_text(prop, "Inverse Lift", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); /* not yet used 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_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", "");*/ + RNA_def_property_ui_text(prop, "Saturation", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); */ } static void rna_def_sequence(BlenderRNA *brna) @@ -434,11 +464,13 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_string_maxlength(prop, sizeof(((Sequence*)NULL)->name)-2); 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, seq_type_items); RNA_def_property_ui_text(prop, "Type", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); //prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by this sequence."); @@ -448,28 +480,32 @@ static void rna_def_sequence(BlenderRNA *brna) prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); prop= RNA_def_property(srna, "left_handle_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL); RNA_def_property_ui_text(prop, "Left Handle Selected", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); prop= RNA_def_property(srna, "right_handle_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL); RNA_def_property_ui_text(prop, "Right Handle Selected", ""); + 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", SEQ_MUTE); RNA_def_property_ui_text(prop, "Mute", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED); RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK); RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); /* strip positioning */ @@ -477,76 +513,76 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "len"); RNA_def_property_range(prop, 1, MAXFRAME); RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied"); - RNA_def_property_int_funcs(prop, "rna_SequenceEditor_length_get", "rna_SequenceEditor_length_set",NULL); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_int_funcs(prop, "rna_Sequence_length_get", "rna_Sequence_length_set",NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "start"); RNA_def_property_ui_text(prop, "Start Frame", ""); - RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_start_frame_set",NULL); // overlap tests and calc_seq_disp - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); // overlap tests and calc_seq_disp + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "start_offset", 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_ui_text(prop, "Start Offset", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "end_offset", 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_ui_text(prop, "End offset", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "start_still", 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_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "Start Still", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "end_still", 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_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "End Still", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "machine"); RNA_def_property_range(prop, 0, MAXSEQ-1); RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip."); - RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_channel_set",NULL); // overlap test - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); // overlap test + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); /* blending */ prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, blend_mode_items); RNA_def_property_ui_text(prop, "Blend Mode", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "blend_opacity", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 100.0f); RNA_def_property_ui_text(prop, "Blend Opacity", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_float_sdna(prop, NULL, "effect_fader"); RNA_def_property_ui_text(prop, "Effect fader position", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "use_effect_default_fade", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE); RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the builtin default (usually make transition as long as effect strip)."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "speed_fader", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "speed_fader"); RNA_def_property_ui_text(prop, "Speed effect fader position", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); /* functions */ func= RNA_def_function(srna, "getStripElem", "give_stripelem"); @@ -598,66 +634,63 @@ static void rna_def_filter_video(StructRNA *srna) prop= RNA_def_property(srna, "flip_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX); RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "flip_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY); RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "convert_float", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT); RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "reverse_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES); RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "multiply_colors", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "mul"); RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_text(prop, "Multiply Colors", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 1.0f, 30.0f); RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE); RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input."); - RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_color_balance_set"); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance"); RNA_def_property_ui_text(prop, "Color Balance", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM); RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing."); - RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_translation_set"); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "strip->transform"); RNA_def_property_ui_text(prop, "Transform", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP); RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing."); - RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_crop_set"); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "strip->crop"); RNA_def_property_ui_text(prop, "Crop", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); } static void rna_def_proxy(StructRNA *srna) @@ -667,7 +700,7 @@ static void rna_def_proxy(StructRNA *srna) prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY); RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip."); - RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_use_proxy_set"); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set"); prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy"); @@ -676,6 +709,7 @@ static void rna_def_proxy(StructRNA *srna) prop= RNA_def_property(srna, "proxy_custom_directory", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR); RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_input(StructRNA *srna) @@ -686,13 +720,13 @@ static void rna_def_input(StructRNA *srna) RNA_def_property_int_sdna(prop, NULL, "anim_startofs"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "anim_endofs"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_image(BlenderRNA *brna) @@ -707,13 +741,13 @@ static void rna_def_image(BlenderRNA *brna) prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "strip->dir"); RNA_def_property_ui_text(prop, "Directory", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", "strip->len"); RNA_def_property_struct_type(prop, "SequenceElement"); RNA_def_property_ui_text(prop, "Elements", ""); - rna_def_filter_video(srna); rna_def_proxy(srna); rna_def_input(srna); @@ -750,7 +784,7 @@ static void rna_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); rna_def_filter_video(srna); rna_def_proxy(srna); @@ -770,15 +804,18 @@ static void rna_def_movie(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "anim_preseek"); RNA_def_property_range(prop, 0, 50); RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name"); RNA_def_property_ui_text(prop, "Filename", ""); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MovieSequence_filename_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "strip->dir"); RNA_def_property_ui_text(prop, "Directory", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); rna_def_filter_video(srna); rna_def_proxy(srna); @@ -797,15 +834,18 @@ static void rna_def_sound(BlenderRNA *brna) prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Sound"); RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_sound_update"); prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name"); RNA_def_property_ui_text(prop, "Filename", ""); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoundSequence_filename_set"); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_sound_update"); prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "strip->dir"); RNA_def_property_ui_text(prop, "Directory", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_sound_update"); rna_def_input(srna); @@ -815,7 +855,7 @@ static void rna_def_sound(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "volume"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound"); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_sound_update"); } static void rna_def_effect(BlenderRNA *brna) @@ -842,6 +882,7 @@ static void rna_def_plugin(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", ""); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); /* plugin properties need custom wrapping code like ID properties */ } @@ -875,25 +916,25 @@ static void rna_def_wipe(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "edgeWidth"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "angle"); RNA_def_property_range(prop, -90.0f, 90.0f); RNA_def_property_ui_text(prop, "Angle", "Edge angle."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "forward"); RNA_def_property_enum_items(prop, wipe_direction_items); RNA_def_property_ui_text(prop, "Direction", "Wipe direction."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "wipetype"); RNA_def_property_enum_items(prop, wipe_type_items); RNA_def_property_ui_text(prop, "Transition Type", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_glow(BlenderRNA *brna) @@ -909,36 +950,36 @@ static void rna_def_glow(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "fMini"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow"); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fClamp"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Clamp", "rightness limit of intensity."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fBoost"); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "blur_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dDist"); RNA_def_property_range(prop, 0.5f, 20.0f); RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dQuality"); RNA_def_property_range(prop, 1, 5); RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "only_boost", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0); RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only."); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_transform(BlenderRNA *brna) @@ -967,72 +1008,72 @@ static void rna_def_transform(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "ScalexIni"); RNA_def_property_ui_text(prop, "Scale Start X", ""); RNA_def_property_ui_range(prop, 0, 10, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "ScaleyIni"); RNA_def_property_ui_text(prop, "Scale Start Y", ""); RNA_def_property_ui_range(prop, 0, 10, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "scale_end_x", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "ScalexFin"); RNA_def_property_ui_text(prop, "Scale End X", ""); RNA_def_property_ui_range(prop, 0, 10, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "scale_end_y", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "ScaleyFin"); RNA_def_property_ui_text(prop, "Scale End Y", ""); RNA_def_property_ui_range(prop, 0, 10, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xIni"); RNA_def_property_ui_text(prop, "Translate Start X", ""); RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yIni"); RNA_def_property_ui_text(prop, "Translate Start Y", ""); RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "translate_end_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xFin"); RNA_def_property_ui_text(prop, "Translate End X", ""); RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "translate_end_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "yFin"); RNA_def_property_ui_text(prop, "Translate End Y", ""); RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rotIni"); RNA_def_property_range(prop, 0.0f, 360.0f); RNA_def_property_ui_text(prop, "Rotation Start", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "rotation_end", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rotFin"); RNA_def_property_range(prop, 0.0f, 360.0f); RNA_def_property_ui_text(prop, "Rotation End", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "percent"); RNA_def_property_enum_items(prop, translation_unit_items); RNA_def_property_ui_text(prop, "Translation Unit", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, interpolation_items); RNA_def_property_ui_text(prop, "Interpolation", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_solid_color(BlenderRNA *brna) @@ -1047,7 +1088,7 @@ static void rna_def_solid_color(BlenderRNA *brna) prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "col"); RNA_def_property_ui_text(prop, "Color", ""); - RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } static void rna_def_speed_control(BlenderRNA *brna) @@ -1064,18 +1105,22 @@ static void rna_def_speed_control(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */ RNA_def_property_ui_text(prop, "Global Speed", ""); RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "curve_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE); RNA_def_property_ui_text(prop, "F-Curve Velocity", "Interpret the F-Curve value as a velocity instead of a frame number."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_blending", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND); RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "curve_compress_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y); RNA_def_property_ui_text(prop, "F-Curve Compress Y", "Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0."); + RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } void RNA_def_sequence(BlenderRNA *brna) |