Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_smooth.c
| Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | else { | ||||
| /* Interior vertices use all neighbors. */ | /* Interior vertices use all neighbors. */ | ||||
| add_v3_v3(avg, SCULPT_vertex_co_get(ss, ni.index)); | add_v3_v3(avg, SCULPT_vertex_co_get(ss, ni.index)); | ||||
| total++; | total++; | ||||
| } | } | ||||
| } | } | ||||
| SCULPT_VERTEX_NEIGHBORS_ITER_END(ni); | SCULPT_VERTEX_NEIGHBORS_ITER_END(ni); | ||||
| /* Do not modify corner vertices. */ | /* Do not modify corner vertices. */ | ||||
| if (neighbor_count <= 2) { | if (neighbor_count <= 2 && is_boundary) { | ||||
| copy_v3_v3(result, SCULPT_vertex_co_get(ss, index)); | copy_v3_v3(result, SCULPT_vertex_co_get(ss, index)); | ||||
| return; | return; | ||||
| } | } | ||||
| /* Avoid division by 0 when there are no neighbors. */ | /* Avoid division by 0 when there are no neighbors. */ | ||||
| if (total == 0) { | if (total == 0) { | ||||
| copy_v3_v3(result, SCULPT_vertex_co_get(ss, index)); | copy_v3_v3(result, SCULPT_vertex_co_get(ss, index)); | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 463 Lines • Show Last 20 Lines | |||||