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.
This commit is contained in:
Hans Goudey
2020-09-18 09:32:09 -05:00
parent 402a4cadba
commit 6303cb7bd0

View File

@@ -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");