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:
authorCampbell Barton <ideasman42@gmail.com>2015-10-04 15:20:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-04 16:03:10 +0300
commit123b64f818da77dfaf3783d88f5c6be8bbd99a87 (patch)
tree6f2e7a201a1175435efc9abc56f42afa3f3cf66d /source/blender/editors/mesh/editmesh_tools.c
parent52f74923e6957b4dc6e7b37514d864588b922ae6 (diff)
BMesh: improved smooth subdivision
Instead of offsetting along normals, smooth positions are now calculated on a sphere defined by the vertices and their normals. This removes visible seams along original edges, which were common previously.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index d3937188358..67c23a9f7a1 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -85,7 +85,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
const int cuts = RNA_int_get(op->ptr, "number_cuts");
- float smooth = 0.292f * RNA_float_get(op->ptr, "smoothness");
+ float smooth = RNA_float_get(op->ptr, "smoothness");
const float fractal = RNA_float_get(op->ptr, "fractal") / 2.5f;
const float along_normal = RNA_float_get(op->ptr, "fractal_along_normal");
@@ -96,7 +96,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
}
BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT,
- smooth, SUBD_FALLOFF_INVSQUARE, false,
+ smooth, SUBD_FALLOFF_LIN, false,
fractal, along_normal,
cuts,
SUBDIV_SELECT_ORIG, RNA_enum_get(op->ptr, "quadcorner"),