diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-06 22:40:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-06 22:40:15 +0400 |
commit | 31d2ee9bf77bb991ea4779c47379b2cee84b27ed (patch) | |
tree | fd6f021356fc78d6dfeff9f18f601ce645dd7ffe /source/blender/editors/gpencil | |
parent | 7b7214c72233f72268f72d31fd8626a0f94e557e (diff) |
style cleanup, brackets in else/if, some indentation.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 10 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 12 |
2 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 5e9acc5b84f..76af016b6c6 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -189,8 +189,7 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl glVertex2fv(co); glEnd(); } - else - { + else { /* draw filled circle as is done in circf (but without the matrix push/pops which screwed things up) */ GLUquadricObj *qobj = gluNewQuadric(); @@ -289,8 +288,7 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s /* tessellation code - draw stroke as series of connected quads with connection * edges rotated to minimise shrinking artifacts, and rounded endcaps */ - else - { + else { bGPDspoint *pt1, *pt2; float pm[2]; int i; @@ -384,8 +382,8 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s mt[1]= mb[1] * pthick; athick= len_v2(mt); dfac= pthick - (athick * 2); - if ( ((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick)==0) ) - { + + if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick)==0)) { mt[0] += (mb[0] * dfac); mt[1] += (mb[1] * dfac); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 84d3162434a..535a0f947f1 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -194,8 +194,7 @@ static void gp_get_3d_reference (tGPsdata *p, float vec[3]) /* the reference point used depends on the owner... */ #if 0 // XXX: disabled for now, since we can't draw relative to the owner yet - if (p->ownerPtr.type == &RNA_Object) - { + if (p->ownerPtr.type == &RNA_Object) { Object *ob= (Object *)p->ownerPtr.data; /* active Object @@ -517,10 +516,8 @@ static void gp_stroke_simplify (tGPsdata *p) pressure += old_points[offs].pressure * sfac; \ } - for (i = 0, j = 0; i < num_points; i++) - { - if (i - j == 3) - { + for (i = 0, j = 0; i < num_points; i++) { + if (i - j == 3) { float co[2], pressure; int mco[2]; @@ -1855,8 +1852,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* handle mode-specific events */ if (p->status == GP_STATUS_PAINTING) { /* handle painting mouse-movements? */ - if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (p->flags & GP_PAINTFLAG_FIRSTRUN)) - { + if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (p->flags & GP_PAINTFLAG_FIRSTRUN)) { /* handle drawing event */ //printf("\t\tGP - add point\n"); gpencil_draw_apply_event(op, event); |