Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2014-01-08 16:40:01 +0400
committerHoward Trickey <howard.trickey@gmail.com>2014-01-08 16:40:01 +0400
commit49aa701645e97ea7a6f698e4063a5327f6c79815 (patch)
tree3469853a0ec2ca2c58c4c50184d05d66ff978d85 /source/blender/bmesh/operators/bmo_bevel.c
parent8094ac91944f080c53943c8319eeaa9c3d1b9720 (diff)
Add profile control parameter to Bevel.
Parameter controls concavity / convexity. <.25 means: concave inward .25 means: straight slanted >.25 means: concave outward .5 means: circular (the default) 1 means: straight along original sides For now, there is a hard lower limit of .15 because more work is needed to get decent results in the range below that. The profile is actually a superellipse, and the parameter is 1/4 of the exponent in the implicit equation for a superellipse, except at the extreme values of 0 and 1.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_bevel.c')
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index 4eec15d4d7e..07a2e674863 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -39,6 +39,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
const int offset_type = BMO_slot_int_get(op->slots_in, "offset_type");
const int seg = BMO_slot_int_get(op->slots_in, "segments");
const bool vonly = BMO_slot_bool_get(op->slots_in, "vertex_only");
+ const float profile = BMO_slot_float_get(op->slots_in, "profile");
if (offset > 0) {
BMOIter siter;
@@ -59,7 +60,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
}
}
- BM_mesh_bevel(bm, offset, offset_type, seg, vonly, false, false, NULL, -1);
+ BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, false, NULL, -1);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
}