diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-28 03:51:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-28 03:51:01 +0400 |
commit | 5de17660e20efb28719847f24f4b99cd99f1772d (patch) | |
tree | 07d9e53f3c7b4ab45d1b7b21260960c7d26ef9b0 /source/blender/makesrna/intern/rna_curve.c | |
parent | c498a8f2b4899a6fbad2c8278e29064dc3cdcfaa (diff) |
fix [#35543] Bezier curve width and twist fail to apply when more than 1 point is edited
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 0d354b0827f..c9734545245 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -32,6 +32,7 @@ #include "DNA_scene_types.h" #include "BLI_utildefines.h" +#include "BLI_math.h" #include "BKE_font.h" @@ -688,6 +689,7 @@ static void rna_def_bpoint(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; + const float tilt_limit = DEG2RADF(21600.0f); srna = RNA_def_struct(brna, "SplinePoint", NULL); RNA_def_struct_sdna(srna, "BPoint"); @@ -720,7 +722,8 @@ static void rna_def_bpoint(BlenderRNA *brna) /* Number values */ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "alfa"); - /*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ + RNA_def_property_range(prop, -tilt_limit, tilt_limit); + RNA_def_property_ui_range(prop, -tilt_limit, tilt_limit, 0.1, 3); RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); |