Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/operators/bmo_similar.c
| Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | if (!BMO_elem_flag_test(bm, fm, FACE_MARK) && !BM_elem_flag_test(fm, BM_ELEM_HIDDEN)) { | ||||
| case SIMFACE_PERIMETER: | case SIMFACE_PERIMETER: | ||||
| delta_fl = f_ext[i].perim - f_ext[indices[idx]].perim; | delta_fl = f_ext[i].perim - f_ext[indices[idx]].perim; | ||||
| if (bm_sel_similar_cmp_fl(delta_fl, thresh, compare)) { | if (bm_sel_similar_cmp_fl(delta_fl, thresh, compare)) { | ||||
| BMO_elem_flag_enable(bm, fm, FACE_MARK); | BMO_elem_flag_enable(bm, fm, FACE_MARK); | ||||
| cont = false; | cont = false; | ||||
| } | } | ||||
| break; | break; | ||||
| case SIMFACE_SMOOTH: | |||||
| if(BM_elem_flag_test(fm, BM_ELEM_SMOOTH) == BM_elem_flag_test(fs, BM_ELEM_SMOOTH)) { | |||||
campbellbarton: in this case shading is either on/off, using the delta is meaningless. just check they are… | |||||
| BMO_elem_flag_enable(bm, fm, FACE_MARK); | |||||
Not Done Inline ActionsYou should use fs and fm (defined resp. as f_ext|i].f and f_ext[indices[idx]].f). Also, better to use BM_elem_flag_… familly of funcs to handle flags, see start of intern/bmesh_inline.h file. mont29: You should use `fs` and `fm` (defined resp. as `f_ext|i].f` and `f_ext[indices[idx]].f`).
Also… | |||||
| cont = false; | |||||
| } | |||||
| break; | |||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| case SIMFACE_FREESTYLE: | case SIMFACE_FREESTYLE: | ||||
| if (CustomData_has_layer(&bm->pdata, CD_FREESTYLE_FACE)) { | if (CustomData_has_layer(&bm->pdata, CD_FREESTYLE_FACE)) { | ||||
| FreestyleEdge *ffa1, *ffa2; | FreestyleEdge *ffa1, *ffa2; | ||||
| ffa1 = CustomData_bmesh_get(&bm->pdata, fs->head.data, CD_FREESTYLE_FACE); | ffa1 = CustomData_bmesh_get(&bm->pdata, fs->head.data, CD_FREESTYLE_FACE); | ||||
| ffa2 = CustomData_bmesh_get(&bm->pdata, fm->head.data, CD_FREESTYLE_FACE); | ffa2 = CustomData_bmesh_get(&bm->pdata, fm->head.data, CD_FREESTYLE_FACE); | ||||
| ▲ Show 20 Lines • Show All 389 Lines • Show Last 20 Lines | |||||
in this case shading is either on/off, using the delta is meaningless. just check they are equal.