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/space_graph | |
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/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 12 |
4 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 51b29deab81..4d2fe2cd568 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -108,12 +108,12 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve ** /* try to find 'active' F-Curve */ elem= get_active_fcurve_channel(&ac); - if(elem == NULL) + if (elem == NULL) return 0; - if(fcu) + if (fcu) *fcu= (FCurve*)elem->data; - if(ale) + if (ale) *ale= elem; else MEM_freeN(elem); @@ -452,7 +452,7 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt)) { SpaceIpo *sipo= CTX_wm_space_graph(C); - if(sipo->mode != SIPO_MODE_DRIVERS) + if (sipo->mode != SIPO_MODE_DRIVERS) return 0; return graph_panel_context(C, NULL, NULL); @@ -831,7 +831,7 @@ static int graph_properties(bContext *C, wmOperator *UNUSED(op)) ScrArea *sa= CTX_wm_area(C); ARegion *ar= graph_has_buttons_region(sa); - if(ar) + if (ar) ED_region_toggle_hidden(C, ar); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index fd0fa538d81..279e6ce0400 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -499,7 +499,7 @@ static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2 /* when opening a blend file on a different sized screen or while dragging the toolbar this can happen * best just bail out in this case */ UI_view2d_grid_size(grid, &dx, &dy); - if(dx <= 0.0f) + if (dx <= 0.0f) return; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 8b8cdc32ebb..c0cd2a882c8 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1074,7 +1074,7 @@ static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float eva tSoundBakeInfo *sbi= (tSoundBakeInfo *)data; int position = evaltime - sbi->cfra; - if((position < 0) || (position >= sbi->length)) + if ((position < 0) || (position >= sbi->length)) return 0.0f; return sbi->samples[position]; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 6294e0ecd25..37cdbd4963a 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -70,7 +70,7 @@ ARegion *graph_has_buttons_region(ScrArea *sa) ARegion *ar, *arnew; ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); - if(ar) return ar; + if (ar) return ar; /* add subdiv level; after main */ ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); @@ -400,7 +400,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case ND_MODIFIER: - if(wmn->action == NA_RENAME) + if (wmn->action == NA_RENAME) ED_region_tag_redraw(ar); break; } @@ -414,11 +414,11 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_ID: - if(wmn->action == NA_RENAME) + if (wmn->action == NA_RENAME) ED_region_tag_redraw(ar); break; default: - if(wmn->data==ND_KEYS) + if (wmn->data==ND_KEYS) ED_region_tag_redraw(ar); } @@ -474,13 +474,13 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) } break; case NC_SPACE: - if(wmn->data == ND_SPACE_GRAPH) + if (wmn->data == ND_SPACE_GRAPH) ED_area_tag_redraw(sa); break; // XXX: restore the case below if not enough updates occur... //default: - // if(wmn->data==ND_KEYS) + // if (wmn->data==ND_KEYS) // ED_area_tag_redraw(sa); } } |