diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:38:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:38:07 +0400 |
commit | ab4a2aaf4a4b2b4e416aa1f113b30362cbe0dec3 (patch) | |
tree | 81af4c18519181490074508dbe9a8d515eab634f /source/blender/editors/gpencil | |
parent | 5a90ea77bc1333efe4e1e54984a080550ed3f707 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 22 |
4 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 36f78e151d5..3b0847c2e0f 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -589,7 +589,7 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene) else { /* try to find a marker */ marker= ED_markers_get_first_selected(&scene->markers); - if(marker) { + if (marker) { initialized= 1; } } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 34eaaf2a31b..ced7dab91f4 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -143,7 +143,7 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr) SpaceClip *sc= (SpaceClip *)CTX_wm_space_data(C); MovieClip *clip= ED_space_clip(sc); - if(clip) { + if (clip) { /* for now, as long as there's a clip, default to using that in Clip Editor */ if (ptr) RNA_id_pointer_create(&clip->id, ptr); return &clip->gpd; @@ -402,7 +402,7 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi VECCOPY2D(mvalf, mvali); } else { - if(subrect) { + if (subrect) { mvalf[0]= (((float)pt->x/100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin; mvalf[1]= (((float)pt->y/100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin; } @@ -561,7 +561,7 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short return; /* initialize camera framing */ - if(gp_camera_view_subrect(C, &subrect)) { + if (gp_camera_view_subrect(C, &subrect)) { subrect_ptr= &subrect; } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 4dee4c44694..b21c059fcc1 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -902,7 +902,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho } #endif else { - if(p->subrect == NULL) { /* normal 3D view */ + if (p->subrect == NULL) { /* normal 3D view */ x0= (int)(pt1->x / 100 * p->ar->winx); y0= (int)(pt1->y / 100 * p->ar->winy); x1= (int)(pt2->x / 100 * p->ar->winx); @@ -1204,7 +1204,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode) if (p->gpl == NULL) { p->gpl= gpencil_layer_addnew(p->gpd); - if(p->custom_color[3]) + if (p->custom_color[3]) copy_v3_v3(p->gpl->color, p->custom_color); } if (p->gpl->flag & GP_LAYER_LOCKED) { @@ -1756,7 +1756,7 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op) if (gp_session_initdata(C, p)) gp_paint_initstroke(p, p->paintmode); - if(p->status != GP_STATUS_ERROR) + if (p->status != GP_STATUS_ERROR) p->status= GP_STATUS_PAINTING; return op->customdata; diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 1ab00082043..36624b88a9f 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -69,10 +69,10 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) gpd_ptr= gpencil_data_get_pointers(C, NULL); - if(step==1) { /* undo */ + if (step==1) { /* undo */ //printf("\t\tGP - undo step\n"); - if(cur_node->prev) { - if(!name || strcmp(cur_node->name, name) == 0) { + if (cur_node->prev) { + if (!name || strcmp(cur_node->name, name) == 0) { cur_node= cur_node->prev; new_gpd= cur_node->gpd; } @@ -80,17 +80,17 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) } else if (step==-1) { //printf("\t\tGP - redo step\n"); - if(cur_node->next) { - if(!name || strcmp(cur_node->name, name) == 0) { + if (cur_node->next) { + if (!name || strcmp(cur_node->name, name) == 0) { cur_node= cur_node->next; new_gpd= cur_node->gpd; } } } - if(new_gpd) { - if(gpd_ptr) { - if(*gpd_ptr) { + if (new_gpd) { + if (gpd_ptr) { + if (*gpd_ptr) { bGPdata *gpd= *gpd_ptr; bGPDlayer *gpl, *gpld; @@ -124,11 +124,11 @@ void gpencil_undo_push(bGPdata *gpd) //printf("\t\tGP - undo push\n"); - if(cur_node) { + if (cur_node) { /* remove all un-done nodes from stack */ undo_node= cur_node->next; - while(undo_node) { + while (undo_node) { bGPundonode *next_node= undo_node->next; free_gpencil_data(undo_node->gpd); @@ -153,7 +153,7 @@ void gpencil_undo_finish(void) { bGPundonode *undo_node= undo_nodes.first; - while(undo_node) { + while (undo_node) { free_gpencil_data(undo_node->gpd); MEM_freeN(undo_node->gpd); |