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/editors/curve | |
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/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 4 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 3b05975d22d..f8977b835b3 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6856,9 +6856,9 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op) /* Compensate for different bevel depth. */ bool do_radius = false; float compensate_radius = 0.0f; - if (cu->ext2 != 0.0f && cu_active->ext2 != 0.0f) { + if (cu->bevel_radius != 0.0f && cu_active->bevel_radius != 0.0f) { float compensate_scale = mat4_to_scale(cmat); - compensate_radius = cu->ext2 / cu_active->ext2 * compensate_scale; + compensate_radius = cu->bevel_radius / cu_active->bevel_radius * compensate_scale; do_radius = true; } diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 784f67ac4f1..403ace56e3b 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -144,7 +144,7 @@ static float stroke_elem_radius_from_pressure(const struct CurveDrawData *cdd, const float pressure) { const Curve *cu = cdd->vc.obedit->data; - return ((pressure * cdd->radius.range) + cdd->radius.min) * cu->ext2; + return ((pressure * cdd->radius.range) + cdd->radius.min) * cu->bevel_radius; } static float stroke_elem_radius(const struct CurveDrawData *cdd, const struct StrokeElem *selem) @@ -364,7 +364,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), Object *obedit = cdd->vc.obedit; Curve *cu = obedit->data; - if (cu->ext2 > 0.0f) { + if (cu->bevel_radius > 0.0f) { BLI_mempool_iter iter; const struct StrokeElem *selem; |