style cleanup: relating to skin modifier
authorCampbell Barton <ideasman42@gmail.com>
Tue, 22 May 2012 16:09:31 +0000 (16:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 22 May 2012 16:09:31 +0000 (16:09 +0000)
source/blender/bmesh/intern/bmesh_marking.c
source/blender/editors/object/object_modifier.c
source/blender/editors/space_view3d/drawobject.c
source/blender/python/bmesh/bmesh_py_types.c

index 4e3f50b1106501a3a9ff5c3ed759a4faaa992479..1720ee4f55a9cab86a6c5ba7341035297c5c21ff 100644 (file)
@@ -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. */
index e13e15e2a69dab2b8c726072440eead2644591d1..47557f49b9f97715cbc28c683ad629c1330bcce4 100644 (file)
@@ -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;
index 8d72e5d47ace31d6e51cde9280e88bf91bc8585d..6ba506bbc5cbb576bf6f2e27a76af141bd6d3885 100644 (file)
@@ -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;
 
index be5b4844ae6d0fa327727222e0095c279bdea27d..6ca4ad158596f1810b5c68a331454c17a50ed3ce 100644 (file)
@@ -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;
                                }