Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
| Show First 20 Lines • Show All 1,917 Lines • ▼ Show 20 Lines | static void smooth( | ||||
| count = (int)(bstrength * max_iterations); | count = (int)(bstrength * max_iterations); | ||||
| last = max_iterations * (bstrength - count * fract); | last = max_iterations * (bstrength - count * fract); | ||||
| if (type == PBVH_FACES && !ss->pmap) { | if (type == PBVH_FACES && !ss->pmap) { | ||||
| BLI_assert(!"sculpt smooth: pmap missing"); | BLI_assert(!"sculpt smooth: pmap missing"); | ||||
| return; | return; | ||||
| } | } | ||||
| Mesh *me = BKE_object_get_original_mesh(ob); | |||||
| if (!ss->mvert) { | |||||
| ss->mvert = me->mvert; | |||||
| } | |||||
| if (!ss->mpoly) { | |||||
| ss->mpoly = me->mpoly; | |||||
| } | |||||
| if (!ss->mloop) { | |||||
| ss->mloop = me->mloop; | |||||
| } | |||||
| for (iteration = 0; iteration <= count; ++iteration) { | for (iteration = 0; iteration <= count; ++iteration) { | ||||
| const float strength = (iteration != count) ? 1.0f : last; | const float strength = (iteration != count) ? 1.0f : last; | ||||
| SculptThreadedTaskData data = { | SculptThreadedTaskData data = { | ||||
| .sd = sd, .ob = ob, .brush = brush, .nodes = nodes, | .sd = sd, .ob = ob, .brush = brush, .nodes = nodes, | ||||
| .smooth_mask = smooth_mask, .strength = strength, | .smooth_mask = smooth_mask, .strength = strength, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 4,174 Lines • Show Last 20 Lines | |||||