From 6303cb7bd00701ddc66a55c1731cc70982005ae1 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 18 Sep 2020 09:32:09 -0500 Subject: Fix 80909: Switching to profile bevel can explode Curve geometry We need to make sure the CurveProfile is initialized with the proper number of segments when switching to profile bevel mode. --- source/blender/makesrna/intern/rna_curve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 854c8757d4d..d73eea52f4b 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1614,7 +1614,9 @@ static void rna_def_curve(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Bevel Mode", "Determine how to build the curve's bevel geometry"); RNA_def_property_enum_funcs(prop, NULL, "rna_Curve_bevel_mode_set", NULL); - RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + /* Use this update function so the curve profile is properly initialized when + * switching back to "Profile" mode after changing the resolution. */ + RNA_def_property_update(prop, 0, "rna_Curve_bevel_resolution_update"); prop = RNA_def_property(srna, "bevel_profile", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "CurveProfile"); -- cgit v1.2.3