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
path: root/source
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2014-01-14 20:21:56 +0400
committerHoward Trickey <howard.trickey@gmail.com>2014-01-14 20:21:56 +0400
commitc5d3abc8636808399629562dd0016051663fa00d (patch)
treefef88c0a8fcddbf1b6133627de72ed4f98c12120 /source
parent86616c675aeaccec060f9ac7a98fbff67816516b (diff)
Bevel fix to clamping for percent type.
The clamp code is still very crude and over-conservative, but was totally wrong for the percent amount type.
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 4207394fbd4..47898205ad3 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -3459,6 +3459,11 @@ static float bevel_limit_offset(BMesh *bm, BevelParams *bp)
bool vbeveled;
limited_offset = bp->offset;
+ if (bp->offset_type == BEVEL_AMT_PERCENT) {
+ if (limited_offset > 50.0f)
+ limited_offset = 50.0f;
+ return limited_offset;
+ }
BM_ITER_MESH (v, &v_iter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
if (bp->vertex_only) {