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>2013-05-23 10:19:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-23 10:19:04 +0400
commit0ff22044cd130c1a1b534522ee89b1194a91d0ac (patch)
tree991b0e1463393d4bd9415f8021c499c19eba74a0 /source/blender/bmesh/operators/bmo_subdivide.c
parent4625e7043065b7dbb405fee6acb2f36d21a8bf67 (diff)
Support for bridge tool subdivisions, smoothing and shape along the profile.
also added the underlying subdivision as a standalone operator in the edge menu, named: subdivide edge-ring. http://www.graphicall.org/ftp/ideasman42/bridge_subd.png
Diffstat (limited to 'source/blender/bmesh/operators/bmo_subdivide.c')
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index 2a75c77f33b..0fcf17cd718 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -178,25 +178,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar
/* falloff for multi subdivide */
val = fabsf(1.0f - 2.0f * fabsf(0.5f - perc));
-
- switch (params->smooth_falloff) {
- case SUBD_FALLOFF_SMOOTH:
- val = 3.0f * val * val - 2.0f * val * val * val;
- break;
- case SUBD_FALLOFF_SPHERE:
- val = sqrtf(2.0f * val - val * val);
- break;
- case SUBD_FALLOFF_ROOT:
- val = sqrtf(val);
- break;
- case SUBD_FALLOFF_SHARP:
- val = val * val;
- break;
- case SUBD_FALLOFF_LIN:
- break;
- default:
- BLI_assert(0);
- }
+ val = bmesh_subd_falloff_calc(params->smooth_falloff, val);
mul_v3_fl(tvec, params->smooth * val * len);