Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_tools.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 8,749 Lines • ▼ Show 20 Lines | for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | ||||
| BMFace *f; | BMFace *f; | ||||
| BMLoop *l, *l_curr, *l_first; | BMLoop *l, *l_curr, *l_first; | ||||
| BMIter fiter; | BMIter fiter; | ||||
| BKE_editmesh_ensure_autosmooth(em, obedit->data); | BKE_editmesh_ensure_autosmooth(em, obedit->data); | ||||
| bm->spacearr_dirty |= BM_SPACEARR_DIRTY_ALL; | bm->spacearr_dirty |= BM_SPACEARR_DIRTY_ALL; | ||||
| BKE_editmesh_lnorspace_update(em, obedit->data); | BKE_editmesh_lnorspace_update(em, obedit->data); | ||||
| /* [1] most isolated: ensure a CD_CUSTOMLOOPNORMAL in edbm_average_normals_exec */ | |||||
| /* | |||||
| if (!CustomData_has_layer(&bm->ldata, CD_CUSTOMLOOPNORMAL)) { | |||||
| BM_data_layer_add(bm, &bm->ldata, CD_CUSTOMLOOPNORMAL); | |||||
| } | |||||
| */ | |||||
| const int cd_clnors_offset = CustomData_get_offset(&bm->ldata, CD_CUSTOMLOOPNORMAL); | const int cd_clnors_offset = CustomData_get_offset(&bm->ldata, CD_CUSTOMLOOPNORMAL); | ||||
| float weight = absweight / 50.0f; | float weight = absweight / 50.0f; | ||||
| if (absweight == 100.0f) { | if (absweight == 100.0f) { | ||||
| weight = (float)SHRT_MAX; | weight = (float)SHRT_MAX; | ||||
| } | } | ||||
| else if (absweight == 1.0f) { | else if (absweight == 1.0f) { | ||||
| weight = 1 / (float)SHRT_MAX; | weight = 1 / (float)SHRT_MAX; | ||||
| ▲ Show 20 Lines • Show All 740 Lines • Show Last 20 Lines | |||||