[Bf-blender-cvs] [b585872450b] master: Fix frame_final_start/end strip property not setting handle position

Richard Antalik noreply at git.blender.org
Tue Jun 28 15:58:16 CEST 2022


Commit: b585872450b429540b895aa908d779134485516b
Author: Richard Antalik
Date:   Tue Jun 28 15:51:27 2022 +0200
Branches: master
https://developer.blender.org/rBb585872450b429540b895aa908d779134485516b

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.

===================================================================

M	source/blender/makesrna/intern/rna_sequencer.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list