[Bf-blender-cvs] [b4700a13c6a] master: VSE: Use float for transformation offset
Richard Antalik
noreply at git.blender.org
Wed Feb 9 13:44:29 CET 2022
Commit: b4700a13c6aba992539af9d31c5f2c23d95b23fb
Author: Richard Antalik
Date: Wed Feb 9 13:42:58 2022 +0100
Branches: master
https://developer.blender.org/rBb4700a13c6aba992539af9d31c5f2c23d95b23fb
VSE: Use float for transformation offset
When image position is animated, float makes movement look smoother.
===================================================================
M source/blender/makesdna/DNA_sequence_types.h
M source/blender/makesrna/intern/rna_sequencer.c
===================================================================
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 70f0dc3f5de..622175a8429 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -73,8 +73,8 @@ typedef struct StripCrop {
} StripCrop;
typedef struct StripTransform {
- int xofs;
- int yofs;
+ float xofs;
+ float yofs;
float scale_x;
float scale_y;
float rotation;
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 9fee54ef38d..15b3a2fe998 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1485,16 +1485,16 @@ static void rna_def_strip_transform(BlenderRNA *brna)
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
- prop = RNA_def_property(srna, "offset_x", PROP_INT, PROP_PIXEL);
- RNA_def_property_int_sdna(prop, NULL, "xofs");
+ prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_PIXEL);
+ RNA_def_property_float_sdna(prop, NULL, "xofs");
RNA_def_property_ui_text(prop, "Translate X", "Move along X axis");
- RNA_def_property_ui_range(prop, INT_MIN, INT_MAX, 1, 6);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
- prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_PIXEL);
- RNA_def_property_int_sdna(prop, NULL, "yofs");
+ prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_PIXEL);
+ RNA_def_property_float_sdna(prop, NULL, "yofs");
RNA_def_property_ui_text(prop, "Translate Y", "Move along Y axis");
- RNA_def_property_ui_range(prop, INT_MIN, INT_MAX, 1, 6);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);
More information about the Bf-blender-cvs
mailing list