From 5de17660e20efb28719847f24f4b99cd99f1772d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 May 2013 23:51:01 +0000 Subject: fix [#35543] Bezier curve width and twist fail to apply when more than 1 point is edited --- source/blender/makesrna/intern/rna_curve.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') 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"); -- cgit v1.2.3