Revision: 44843
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44843
Author:   campbellbarton
Date:     2012-03-12 23:56:11 +0000 (Mon, 12 Mar 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
    trunk/blender/source/blender/blenlib/intern/bpath.c
    trunk/blender/source/blender/bmesh/operators/bmo_create.c
    trunk/blender/source/blender/bmesh/tools/BME_bevel.c
    trunk/blender/source/blender/editors/mesh/knifetool.c
    trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
    trunk/blender/source/blender/imbuf/intern/targa.c

Modified: trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_mempool.c   2012-03-12 
23:03:43 UTC (rev 44842)
+++ trunk/blender/source/blender/blenlib/intern/BLI_mempool.c   2012-03-12 
23:56:11 UTC (rev 44843)
@@ -355,7 +355,7 @@
 
        do {
                ret = bli_mempool_iternext(iter);
-       }while (ret && ret->freeword == FREEWORD);
+       } while (ret && ret->freeword == FREEWORD);
 
        return ret;
 }

Modified: trunk/blender/source/blender/blenlib/intern/bpath.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/bpath.c 2012-03-12 23:03:43 UTC 
(rev 44842)
+++ trunk/blender/source/blender/blenlib/intern/bpath.c 2012-03-12 23:56:11 UTC 
(rev 44843)
@@ -41,7 +41,7 @@
 #include <string.h>
 #include <assert.h>
 
-/* path/file handeling stuff */
+/* path/file handling stuff */
 #ifndef WIN32
 #  include <dirent.h>
 #  include <unistd.h>

Modified: trunk/blender/source/blender/bmesh/operators/bmo_create.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_create.c   2012-03-12 
23:03:43 UTC (rev 44842)
+++ trunk/blender/source/blender/bmesh/operators/bmo_create.c   2012-03-12 
23:56:11 UTC (rev 44843)
@@ -68,7 +68,7 @@
 
 typedef struct VertData {
        BMEdge *e;
-       float no[3], offco[3], sco[3]; /* offco is vertex coordinate slightly 
offset randoml */
+       float no[3], offco[3], sco[3]; /* offco is vertex coordinate slightly 
offset randomly */
        int tag;
 } VertData;
 
@@ -234,7 +234,7 @@
                        continue;
                }
 
-               /* do two passes, going forward then backwar */
+               /* do two passes, going forward then backward */
                for (i = 0; i < 2; i++) {
                        BLI_smallhash_init(hash);
                        
@@ -401,7 +401,7 @@
                        normalize_v3(no);
                }
                
-               /* generate plane-flattened coordinate */
+               /* generate plane-flattened coordinates */
                for (i = 0; i < totedge; i++) {
                        BMEdge *e1;
                        BMVert *v2;
@@ -749,7 +749,7 @@
                v1 = last->v;
                
                if (v1 == endv) {
-                       /* make sure this path loop doesn't already exist */
+                       /* make sure this path loop doesn't already exists */
                        i = 0;
                        BLI_array_empty(verts);
                        for (i = 0, node = path->nodes.first; node; node = 
node->next, i++) {
@@ -814,7 +814,7 @@
                        continue;
                }
                
-               /* add path back into hea */
+               /* add path back into heap */
                BLI_heap_insert(heap, path->weight, path);
                
                /* put v2 in gh ma */
@@ -1343,7 +1343,7 @@
        /* --- end special case support, continue as normal --- */
 
        /* call edgenet create */
-       /* call edgenet prepare op so additional face creation cases wor */
+       /* call edgenet prepare op so additional face creation cases wore */
        BMO_op_initf(bm, &op2, "edgenet_prepare edges=%fe", ELE_NEW);
        BMO_op_exec(bm, &op2);
        BMO_slot_buffer_flag_enable(bm, &op2, "edgeout", ELE_NEW, BM_EDGE);
@@ -1352,7 +1352,7 @@
        BMO_op_initf(bm, &op2, "edgenet_fill edges=%fe use_fill_check=%b", 
ELE_NEW, TRUE);
        BMO_op_exec(bm, &op2);
 
-       /* return if edge net create did somethin */
+       /* return if edge net create did something */
        if (BMO_slot_buffer_count(bm, &op2, "faceout")) {
                BMO_slot_copy(&op2, op, "faceout", "faceout");
                BMO_op_finish(bm, &op2);
@@ -1374,7 +1374,7 @@
 
        BMO_op_finish(bm, &op2);
 
-       /* now, count how many verts we hav */
+       /* now, count how many verts we have */
        amount = 0;
        BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, ELE_NEW)) {
@@ -1386,12 +1386,12 @@
        }
 
        if (amount == 2) {
-               /* create edg */
+               /* create edge */
                e = BM_edge_create(bm, verts[0], verts[1], NULL, TRUE);
                BMO_elem_flag_enable(bm, e, ELE_OUT);
        }
        else if (amount == 3) {
-               /* create triangl */
+               /* create triangle */
                f = BM_face_create_quad_tri(bm, verts[0], verts[1], verts[2], 
NULL, NULL, TRUE);
 
                if (f) {

Modified: trunk/blender/source/blender/bmesh/tools/BME_bevel.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/BME_bevel.c        2012-03-12 
23:03:43 UTC (rev 44842)
+++ trunk/blender/source/blender/bmesh/tools/BME_bevel.c        2012-03-12 
23:56:11 UTC (rev 44843)
@@ -973,7 +973,7 @@
        BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if(BMO_elem_flag_test(bm, v, BME_BEVEL_ORIG) && 
BMO_elem_flag_test(bm, v, BME_BEVEL_BEVEL)) {
                        curedge = v->e;
-                       do{
+                       do {
                                l = curedge->l;
                                l2 = l->radial_next;
                                if(l->v != v) l = l->next;

Modified: trunk/blender/source/blender/editors/mesh/knifetool.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/knifetool.c       2012-03-12 
23:03:43 UTC (rev 44842)
+++ trunk/blender/source/blender/editors/mesh/knifetool.c       2012-03-12 
23:56:11 UTC (rev 44843)
@@ -26,7 +26,6 @@
 
 #define _USE_MATH_DEFINES
 
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
@@ -44,7 +43,6 @@
 #include "BIF_gl.h"
 #include "BIF_glutil.h" /* for paint cursor */
 
-
 #include "ED_screen.h"
 #include "ED_space_api.h"
 #include "ED_view3d.h"
@@ -83,7 +81,7 @@
        BMFace *basef; /* face to restrict face fill to */
        ListBase faces;
        int draw;
-       
+
        BMEdge *e, *oe; /* non-NULL if this is an original edge */
 } KnifeEdge;
 
@@ -110,7 +108,7 @@
        BMFace *bmface;
        int is_space;
 
-       int mval[2];  /* mouse screen position */
+       int mval[2]; /* mouse screen position */
 } KnifePosData;
 
 /* struct for properties used while drawing */
@@ -119,51 +117,51 @@
        void *draw_handle;      /* for drawing preview loop */
        ViewContext vc;
        bContext *C;
-       
+
        Object *ob;
        BMEditMesh *em;
-       
+
        MemArena *arena;
 
        GHash *origvertmap;
        GHash *origedgemap;
-       
+
        GHash *kedgefacemap;
-       
+
        BMBVHTree *bmbvh;
 
        BLI_mempool *kverts;
        BLI_mempool *kedges;
-       
+
        float vthresh;
        float ethresh;
-       
+
        /* used for drag-cutting */
        BMEdgeHit *linehits;
        int totlinehit;
-       
+
        /* Data for mouse-position-derived data (cur) and previous click (prev) 
*/
        KnifePosData cur, prev;
 
        int totkedge, totkvert;
-       
+
        BLI_mempool *refs;
-       
+
        float projmat[4][4];
        int is_ortho;
        int cut_through;
        float clipsta, clipend;
-       
+
        enum {
                MODE_IDLE,
                MODE_DRAGGING,
                MODE_CONNECT,
                MODE_PANNING
        } mode;
-       
+
        int snap_midpoints, prevmode, extend;
        int ignore_edge_snapping, ignore_vert_snapping;
-       
+
        enum {
                ANGLE_FREE,
                ANGLE_0,
@@ -185,7 +183,8 @@
        ED_view3d_project_float_v3(kcd->ar, co, sco, kcd->projmat);
 }
 
-static void knife_pos_data_clear(KnifePosData *kpd) {
+static void knife_pos_data_clear(KnifePosData *kpd)
+{
        zero_v3(kpd->co);
        zero_v3(kpd->cage);
        kpd->vert = NULL;
@@ -273,19 +272,19 @@
        if (!kfe) {
                BMIter iter;
                BMFace *f;
-       
+
                kfe = new_knife_edge(kcd);
                kfe->e = e;
                kfe->v1 = get_bm_knife_vert(kcd, e->v1);
                kfe->v2 = get_bm_knife_vert(kcd, e->v2);
 
                knife_add_to_vert_edges(kcd, kfe);
-               
+
                BLI_ghash_insert(kcd->origedgemap, e, kfe);
-               
+
                BM_ITER(f, &iter, kcd->em->bm, BM_FACES_OF_EDGE, e) {
                        knife_append_list(kcd, &kfe->faces, f);
-                       
+
                        /* ensures the kedges lst for this f is initialized,
                         * it automatically adds kfe by itself */
                        knife_get_face_kedges(kcd, f);
@@ -328,7 +327,7 @@
                BMEdge *e;
 
                lst = knife_empty_list(kcd);
-               
+
                BM_ITER(e, &iter, kcd->em->bm, BM_EDGES_OF_FACE, f) {
                        knife_append_list(kcd, lst, get_bm_knife_edge(kcd, e));
                }
@@ -348,7 +347,7 @@
                if (kfe->v1->isface || kfe->v2->isface) {
                        if (kfe->v2->isface)
                                kfe->basef = kcd->cur.bmface;
-                       else 
+                       else
                                kfe->basef = kcd->prev.bmface;
                }
                else {
@@ -357,12 +356,12 @@
                                for (r2 = ke1->faces.first; r2 && !kfe->basef; 
r2 = r2->next) {
                                        for (r3 = kfe->v2->edges.first; r3 && 
!kfe->basef; r3 = r3->next) {
                                                KnifeEdge *ke2 = r3->ref;
-                                       
+
                                                for (r4 = ke2->faces.first; r4 
&& !kfe->basef; r4 = r4->next) {
                                                        if (r2->ref == r4->ref) 
{
                                                                kfe->basef = 
r2->ref;
                                                        }
-                                               }       
+                                               }
                                        }
                                }
                        }
@@ -455,7 +454,7 @@
                kfe->v2->draw = !kcd->cur.is_space;
                kfe->v2->isface = 1;
                kfe->v2->inspace = kcd->cur.is_space;
-               
+
                if (kcd->cur.is_space)
                        kfe->draw = 0;
 
@@ -490,13 +489,12 @@
 {
        const BMEdgeHit *lh1 = vlh1, *lh2 = vlh2;
 
-       if (lh1->l < lh2->l) return -1;
-       else if (lh1->l > lh2->l) return 1;
+       if      (lh1->l < lh2->l) return -1;
+       else if (lh1->l > lh2->l) return  1;
        else return 0;
 }
 
-static void knife_add_single_cut_through(knifetool_opdata *kcd,
-       KnifeVert *v1, KnifeVert *v2, BMFace *f)
+static void knife_add_single_cut_through(knifetool_opdata *kcd, KnifeVert *v1, 
KnifeVert *v2, BMFace *f)
 {
        KnifeEdge *kfenew;
 
@@ -551,7 +549,7 @@
        BMFace *f;
        KnifeEdge *kfe, *kfe2, *kfe3;
        KnifeVert *v1, *v2, *firstv = NULL, *lastv = NULL;
-       ListBase firstfaces = {NULL, NULL}, lastfaces = { NULL, NULL};
+       ListBase firstfaces = {NULL, NULL}, lastfaces = {NULL, NULL};
        Ref *r, *r2;
        KnifeEdge **splitkfe;
        int i, j, found;
@@ -590,7 +588,7 @@
        if (firstv) {
                /* For each face incident to firstv,
                 * find the first following linehit (if any) sharing that face 
and connect */
-               for (r = firstfaces.first; r; r = r->next ) {
+               for (r = firstfaces.first; r; r = r->next) {
                        f = r->ref;
                        found = 0;
                        for (j = 0, lh2 = kcd->linehits; j < kcd->totlinehit; 
j++, lh2++) {
@@ -627,8 +625,8 @@
                                kfe2 = lh2->kfe;
                                for (r2 = kfe2->faces.first; r2; r2 = r2->next) 
{
                                        if (r2->ref == f) {
-                                               v1 = splitkfe[i]? kfe->v1 : 
knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
-                                               v2 = splitkfe[j]? kfe2->v1 : 
knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
+                                               v1 = splitkfe[i] ? kfe->v1 : 
knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
+                                               v2 = splitkfe[j] ? kfe2->v1 : 
knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
                                                
knife_add_single_cut_through(kcd, v1, v2, f);
                                                found = 1;
                                                break;
@@ -638,7 +636,7 @@
                        if (!found && lastv) {
                                for (r2 = lastfaces.first; r2; r2 = r2->next) {
                                        if (r2->ref == f) {
-                                               v1 = splitkfe[i]? kfe->v1 : 
knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
+                                               v1 = splitkfe[i] ? kfe->v1 : 
knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
                                                
knife_add_single_cut_through(kcd, v1, lastv, f);
                                                break;
                                        }
@@ -685,7 +683,7 @@
                        else if (lastlh && firstlh) {
                                if (firstlh->v || lastlh->v) {
                                        KnifeVert *kfv = firstlh->v ? 
firstlh->v : lastlh->v;
-                                       
+
                                        kcd->prev.vert = kfv;
                                        copy_v3_v3(kcd->prev.co, firstlh->hit);
                                        copy_v3_v3(kcd->prev.cage, 
firstlh->cagehit);
@@ -709,7 +707,7 @@
                                kcd->prev.edge = lh->kfe;
                                kcd->prev.bmface = lh->f;
                                continue;

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to