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:
authorRichard Antalik <richardantalik@gmail.com>2022-06-28 16:51:27 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-06-28 16:58:08 +0300
commitb585872450b429540b895aa908d779134485516b (patch)
treed567e3a5ecb372da016dd5b3114682ff1a18cbf3 /source/blender/makesrna/intern/rna_sequencer.c
parentd5dcbabdd24a3e3854ac6367d3c641a9a3cde84e (diff)
Fix frame_final_start/end strip property not setting handle position
This was a mistake in 17a773cdcee9 - I did not notice existing set function and assumed, that property set DNA directly. Both get and set functions are now available and readonly flag is removed.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 9edf17614c8..d14763d2609 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -322,6 +322,28 @@ static int rna_Sequence_frame_final_end_get(PointerRNA *ptr)
return SEQ_time_right_handle_frame_get((Sequence *)ptr->data);
}
+static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->owner_id;
+
+ SEQ_time_left_handle_frame_set(scene, seq, value);
+ SEQ_transform_fix_single_image_seq_offsets(scene, seq);
+ do_sequence_frame_change_update(scene, seq);
+ SEQ_relations_invalidate_cache_composite(scene, seq);
+}
+
+static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->owner_id;
+
+ SEQ_time_right_handle_frame_set(scene, seq, value);
+ SEQ_transform_fix_single_image_seq_offsets(scene, seq);
+ do_sequence_frame_change_update(scene, seq);
+ SEQ_relations_invalidate_cache_composite(scene, seq);
+}
+
static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
{
Sequence *seq = (Sequence *)ptr->data;
@@ -1959,8 +1981,10 @@ static void rna_def_sequence(BlenderRNA *brna)
prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startdisp");
- RNA_def_property_int_funcs(prop, "rna_Sequence_frame_final_start_get", NULL, NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE | PROP_ANIMATABLE);
+ RNA_def_property_int_funcs(
+ prop, "rna_Sequence_frame_final_start_get", "rna_Sequence_start_frame_final_set", NULL);
+ RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(
prop,
"Start Frame",
@@ -1972,8 +1996,10 @@ static void rna_def_sequence(BlenderRNA *brna)
prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "enddisp");
- RNA_def_property_int_funcs(prop, "rna_Sequence_frame_final_end_get", NULL, NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE | PROP_ANIMATABLE);
+ RNA_def_property_int_funcs(
+ prop, "rna_Sequence_frame_final_end_get", "rna_Sequence_end_frame_final_set", NULL);
+ RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(
prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
/* overlap tests and calc_seq_disp */