diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-22 20:09:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-22 20:09:31 +0400 |
commit | 3fc3c9f3b4003dd26e1df8282942622cbdb9e954 (patch) | |
tree | 6941e96e46330668879d7a83440675f736942060 /source | |
parent | e1eeb817927a280b91a71d25b5b5166161096a90 (diff) |
style cleanup: relating to skin modifier
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 42 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 6 |
4 files changed, 25 insertions, 27 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 4e3f50b1106..1720ee4f55a 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -612,8 +612,6 @@ void BM_editselection_normal(BMEditSelection *ese, float r_normal[3]) } } -/* ref - editmesh_lib.cL:EM_editselection_plane() */ - /* Calculate a plane that is rightangles to the edge/vert/faces normal * also make the plane run along an axis that is related to the geometry, * because this is used for the manipulators Y axis. */ diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index e13e15e2a69..47557f49b9f 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1350,19 +1350,19 @@ static void modifier_skin_customdata_ensure(Object *ob) BM_data_layer_add(bm, &bm->vdata, CD_MVERT_SKIN); /* Mark an arbitrary vertex as root */ - BM_ITER_MESH(v, &iter, bm, BM_VERTS_OF_MESH) { + BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { vs = CustomData_bmesh_get(&bm->vdata, v->head.data, - CD_MVERT_SKIN); + CD_MVERT_SKIN); vs->flag |= MVERT_SKIN_ROOT; break; } } else if (!CustomData_has_layer(&me->vdata, CD_MVERT_SKIN)) { vs = CustomData_add_layer(&me->vdata, - CD_MVERT_SKIN, - CD_DEFAULT, - NULL, - me->totvert); + CD_MVERT_SKIN, + CD_DEFAULT, + NULL, + me->totvert); /* Mark an arbitrary vertex as root */ vs->flag |= MVERT_SKIN_ROOT; @@ -1372,13 +1372,13 @@ static void modifier_skin_customdata_ensure(Object *ob) static int skin_poll(bContext *C) { return (!CTX_data_edit_object(C) && - edit_modifier_poll_generic(C, &RNA_SkinModifier, (1<<OB_MESH))); + edit_modifier_poll_generic(C, &RNA_SkinModifier, (1<<OB_MESH))); } static int skin_edit_poll(bContext *C) { return (CTX_data_edit_object(C) && - edit_modifier_poll_generic(C, &RNA_SkinModifier, (1<<OB_MESH))); + edit_modifier_poll_generic(C, &RNA_SkinModifier, (1<<OB_MESH))); } static void skin_root_clear(BMesh *bm, BMVert *bm_vert, GHash *visited) @@ -1386,13 +1386,13 @@ static void skin_root_clear(BMesh *bm, BMVert *bm_vert, GHash *visited) BMEdge *bm_edge; BMIter bm_iter; - BM_ITER_ELEM(bm_edge, &bm_iter, bm_vert, BM_EDGES_OF_VERT) { + BM_ITER_ELEM (bm_edge, &bm_iter, bm_vert, BM_EDGES_OF_VERT) { BMVert *v2 = BM_edge_other_vert(bm_edge, bm_vert); if(!BLI_ghash_lookup(visited, v2)) { MVertSkin *vs = CustomData_bmesh_get(&bm->vdata, - v2->head.data, - CD_MVERT_SKIN); + v2->head.data, + CD_MVERT_SKIN); /* clear vertex root flag and add to visited set */ vs->flag &= ~MVERT_SKIN_ROOT; @@ -1416,13 +1416,13 @@ static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op)) modifier_skin_customdata_ensure(ob); - BM_ITER_MESH(bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { + BM_ITER_MESH (bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { if(!BLI_ghash_lookup(visited, bm_vert) && bm_vert->head.hflag & BM_ELEM_SELECT) { MVertSkin *vs = CustomData_bmesh_get(&bm->vdata, - bm_vert->head.data, - CD_MVERT_SKIN); + bm_vert->head.data, + CD_MVERT_SKIN); /* mark vertex as root and add to visited set */ vs->flag |= MVERT_SKIN_ROOT; @@ -1456,7 +1456,7 @@ void OBJECT_OT_skin_root_mark(wmOperatorType *ot) typedef enum { SKIN_LOOSE_MARK, - SKIN_LOOSE_CLEAR, + SKIN_LOOSE_CLEAR } SkinLooseAction; static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op) @@ -1468,11 +1468,11 @@ static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op) BMIter bm_iter; SkinLooseAction action = RNA_enum_get(op->ptr, "action"); - BM_ITER_MESH(bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { + BM_ITER_MESH (bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { if (bm_vert->head.hflag & BM_ELEM_SELECT) { MVertSkin *vs = CustomData_bmesh_get(&bm->vdata, - bm_vert->head.data, - CD_MVERT_SKIN); + bm_vert->head.data, + CD_MVERT_SKIN); switch (action) { @@ -1520,11 +1520,11 @@ static int skin_radii_equalize_exec(bContext *C, wmOperator *UNUSED(op)) BMVert *bm_vert; BMIter bm_iter; - BM_ITER_MESH(bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { + BM_ITER_MESH (bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { if (bm_vert->head.hflag & BM_ELEM_SELECT) { MVertSkin *vs = CustomData_bmesh_get(&bm->vdata, - bm_vert->head.data, - CD_MVERT_SKIN); + bm_vert->head.data, + CD_MVERT_SKIN); float avg = (vs->radius[0] + vs->radius[1]) * 0.5f; vs->radius[0] = vs->radius[1] = avg; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 8d72e5d47ac..6ba506bbc5c 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3007,7 +3007,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS BMLoop *loop; int is_first = TRUE; - BM_ITER_ELEM(loop, &liter, efa, BM_LOOPS_OF_FACE) { + BM_ITER_ELEM (loop, &liter, efa, BM_LOOPS_OF_FACE) { if (is_face_sel || (do_moving && BM_elem_flag_test(loop->v, BM_ELEM_SELECT))) { float angle; diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index be5b4844ae6..6ca4ad15859 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -2065,7 +2065,7 @@ static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self) int index = 0; const char htype = bm_iter_itype_htype_map[self->itype]; - BM_ITER_BPY_BM_SEQ(ele, &iter, self) { + BM_ITER_BPY_BM_SEQ (ele, &iter, self) { BM_elem_index_set(ele, index); /* set_dirty! */ index++; } @@ -2278,7 +2278,7 @@ static Py_ssize_t bpy_bmelemseq_length(BPy_BMElemSeq *self) BMHeader *ele; Py_ssize_t tot = 0; - BM_ITER_BPY_BM_SEQ(ele, &iter, self) { + BM_ITER_BPY_BM_SEQ (ele, &iter, self) { tot++; } return tot; @@ -2409,7 +2409,7 @@ static int bpy_bmelemseq_contains(BPy_BMElemSeq *self, PyObject *value) if (value_bm_ele->bm == self->bm) { BMElem *ele, *ele_test = value_bm_ele->ele; BMIter iter; - BM_ITER_BPY_BM_SEQ(ele, &iter, self) { + BM_ITER_BPY_BM_SEQ (ele, &iter, self) { if (ele == ele_test) { return 1; } |