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>2019-01-07 02:12:00 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-01-07 02:12:00 +0300
commit496f6adce29cd0da2f91cb574ca396679aa35645 (patch)
treeb854406a89fc31d7dfcaf754a42a020ad53b33f6 /source/blender/bmesh/operators
parentb4a77a351e31256c91e573b85b7252e3ca6d61e7 (diff)
Better bevel normal hardening when some faces were smooth.
Harden normals causes normal splitting, which will not give the appearance expected due to autosmooth unless some edges are sharpened, so this change fixes that. Also bevel tool will turn on autosmooth if not already on if hardening normals.
Diffstat (limited to 'source/blender/bmesh/operators')
-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 1ef8531397f..3277824b890 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -47,6 +47,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
const bool mark_sharp = BMO_slot_bool_get(op->slots_in, "mark_sharp");
const bool harden_normals = BMO_slot_bool_get(op->slots_in, "harden_normals");
const int face_strength_mode = BMO_slot_int_get(op->slots_in, "face_strength_mode");
+ const float smoothresh = BMO_slot_float_get(op->slots_in, "smoothresh");
if (offset > 0) {
BMOIter siter;
@@ -72,7 +73,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
BM_mesh_bevel(
bm, offset, offset_type, seg, profile, vonly, false, clamp_overlap, NULL, -1, material,
- loop_slide, mark_seam, mark_sharp, harden_normals, face_strength_mode);
+ loop_slide, mark_seam, mark_sharp, harden_normals, face_strength_mode, smoothresh);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "edges.out", BM_EDGE, BM_ELEM_TAG);