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-27 23:22:18 +0300
committerXavier Hallade <xavier.hallade@intel.com>2022-06-29 10:27:26 +0300
commit2cccae2784c194e4ca84e840f2978b7c8464a9ea (patch)
tree6e543113cec15a74fb8bc024d29dab7943b4372f
parentd45bacd2e7e90155e31d36cd9792ebd233bf33e6 (diff)
Fix T99216: RNA startdisp and enddisp return unreliable values
Since 7afcfe111aac `startdisp` and `enddisp` fields are used as runtime position storage for effect strips exclusively. Use getter functon to return handle position and make properties read only.
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 9bfdcda79a7..1c7ca8656fd 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -312,6 +312,16 @@ static void rna_Sequence_frame_change_update(Main *UNUSED(bmain),
do_sequence_frame_change_update(scene, (Sequence *)ptr->data);
}
+static int rna_Sequence_frame_final_start_get(PointerRNA *ptr)
+{
+ return SEQ_time_left_handle_frame_get((Sequence *)ptr->data);
+}
+
+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_set(PointerRNA *ptr, int value)
{
Sequence *seq = (Sequence *)ptr->data;
@@ -1971,7 +1981,8 @@ 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_clear_flag(prop, PROP_ANIMATABLE);
+ 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_ui_text(
prop,
"Start Frame",
@@ -1985,7 +1996,8 @@ 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_clear_flag(prop, PROP_ANIMATABLE);
+ 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_ui_text(
prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
/* overlap tests and calc_seq_disp */