diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-02 06:01:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-02 06:01:35 +0300 |
commit | 218360a89217f4e8321319035bf4d9ff97fb2658 (patch) | |
tree | ebea2a1c90847a62315d81bf4f427b287c7e6e7f /source/blender/makesrna | |
parent | ca9cdba2df8231e88575c0d56df1f72efc819950 (diff) |
Cleanup: Rename curve struct fields
These existing names were unhelpful at best, actively confusing at
worst. This patch renames them to be consistent with the terms
used to refer to the values in the UI.
- `width` -> `offset`
- `ext1` -> `extrude`
- `ext2` -> `bevel_radius`
Differential Revision: https://developer.blender.org/D9627
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 8c89162f571..5dea3d32bbc 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -569,13 +569,13 @@ static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, Pointe static float rna_Curve_offset_get(PointerRNA *ptr) { Curve *cu = (Curve *)ptr->owner_id; - return cu->width - 1.0f; + return cu->offset - 1.0f; } static void rna_Curve_offset_set(PointerRNA *ptr, float value) { Curve *cu = (Curve *)ptr->owner_id; - cu->width = 1.0f + value; + cu->offset = 1.0f + value; } static int rna_Curve_body_length(PointerRNA *ptr); @@ -1656,14 +1656,14 @@ static void rna_def_curve(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Curve_bevel_resolution_update"); prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE | PROP_UNIT_LENGTH); - RNA_def_property_float_sdna(prop, NULL, "width"); + RNA_def_property_float_sdna(prop, NULL, "offset"); RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3); RNA_def_property_float_funcs(prop, "rna_Curve_offset_get", "rna_Curve_offset_set", NULL); RNA_def_property_ui_text(prop, "Offset", "Distance to move the curve parallel to its normals"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE | PROP_UNIT_LENGTH); - RNA_def_property_float_sdna(prop, NULL, "ext1"); + RNA_def_property_float_sdna(prop, NULL, "extrude"); RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_ui_text(prop, @@ -1673,7 +1673,7 @@ static void rna_def_curve(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE | PROP_UNIT_LENGTH); - RNA_def_property_float_sdna(prop, NULL, "ext2"); + RNA_def_property_float_sdna(prop, NULL, "bevel_radius"); RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3); RNA_def_property_ui_text( prop, "Bevel Depth", "Radius of the bevel geometry, not including extrusion"); |