Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_construct.c
| Show First 20 Lines • Show All 709 Lines • ▼ Show 20 Lines | BMesh *BM_mesh_copy(BMesh *bm_old) | ||||
| MEM_freeN(ftable); | MEM_freeN(ftable); | ||||
| /* Copy various settings. */ | /* Copy various settings. */ | ||||
| bm_new->shapenr = bm_old->shapenr; | bm_new->shapenr = bm_old->shapenr; | ||||
| bm_new->selectmode = bm_old->selectmode; | bm_new->selectmode = bm_old->selectmode; | ||||
| return bm_new; | return bm_new; | ||||
| } | } | ||||
| char BM_edge_flag_from_mflag(const short mflag) | |||||
| { | |||||
| return (((mflag & ME_SEAM) ? BM_ELEM_SEAM : 0) | ((mflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0)); | |||||
| } | |||||
| char BM_face_flag_from_mflag(const char mflag) | |||||
| { | |||||
| return ((mflag & ME_SMOOTH) ? BM_ELEM_SMOOTH : 0); | |||||
| } | |||||
| short BM_edge_flag_to_mflag(BMEdge *e) | |||||
| { | |||||
| const char hflag = e->head.hflag; | |||||
| return (((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) | ((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0)); | |||||
| } | |||||
| char BM_face_flag_to_mflag(BMFace *f) | |||||
| { | |||||
| const char hflag = f->head.hflag; | |||||
| return ((hflag & BM_ELEM_SMOOTH) ? ME_SMOOTH : 0); | |||||
| } | |||||