From b8a71efeba70d6c3ebc579f5043daa4162da86e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Mar 2012 07:52:14 +0000 Subject: style cleanup: follow style guide for/with/if spacing --- source/blender/editors/interface/interface.c | 2 +- source/blender/editors/interface/interface_draw.c | 24 +++++++++++----------- .../blender/editors/interface/interface_regions.c | 4 ++-- .../editors/interface/interface_templates.c | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b9002648709..b6821abf243 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -81,7 +81,7 @@ /* avoid unneeded calls to ui_get_but_val */ #define UI_BUT_VALUE_UNSET DBL_MAX -#define UI_GET_BUT_VALUE_INIT(_but, _value) if(_value == DBL_MAX) { (_value)= ui_get_but_val(_but); } +#define UI_GET_BUT_VALUE_INIT(_but, _value) if (_value == DBL_MAX) { (_value)= ui_get_but_val(_but); } /* * a full doc with API notes can be found in bf-blender/trunk/blender/doc/guides/interface_API.txt diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 25c616cc67e..a2f253cecaf 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -161,12 +161,12 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl glGetFloatv(GL_CURRENT_COLOR, color); /* 'shade' defines strength of shading */ - coltop[0]= color[0]+shadetop; if(coltop[0]>1.0f) coltop[0]= 1.0f; - coltop[1]= color[1]+shadetop; if(coltop[1]>1.0f) coltop[1]= 1.0f; - coltop[2]= color[2]+shadetop; if(coltop[2]>1.0f) coltop[2]= 1.0f; - coldown[0]= color[0]+shadedown; if(coldown[0]<0.0f) coldown[0]= 0.0f; - coldown[1]= color[1]+shadedown; if(coldown[1]<0.0f) coldown[1]= 0.0f; - coldown[2]= color[2]+shadedown; if(coldown[2]<0.0f) coldown[2]= 0.0f; + coltop[0]= color[0]+shadetop; if (coltop[0]>1.0f) coltop[0]= 1.0f; + coltop[1]= color[1]+shadetop; if (coltop[1]>1.0f) coltop[1]= 1.0f; + coltop[2]= color[2]+shadetop; if (coltop[2]>1.0f) coltop[2]= 1.0f; + coldown[0]= color[0]+shadedown; if (coldown[0]<0.0f) coldown[0]= 0.0f; + coldown[1]= color[1]+shadedown; if (coldown[1]<0.0f) coldown[1]= 0.0f; + coldown[2]= color[2]+shadedown; if (coldown[2]<0.0f) coldown[2]= 0.0f; glShadeModel(GL_SMOOTH); glBegin(mode); @@ -269,12 +269,12 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float glGetFloatv(GL_CURRENT_COLOR, color); /* 'shade' defines strength of shading */ - colLeft[0]= color[0]+shadeLeft; if(colLeft[0]>1.0f) colLeft[0]= 1.0f; - colLeft[1]= color[1]+shadeLeft; if(colLeft[1]>1.0f) colLeft[1]= 1.0f; - colLeft[2]= color[2]+shadeLeft; if(colLeft[2]>1.0f) colLeft[2]= 1.0f; - colRight[0]= color[0]+shadeRight; if(colRight[0]<0.0f) colRight[0]= 0.0f; - colRight[1]= color[1]+shadeRight; if(colRight[1]<0.0f) colRight[1]= 0.0f; - colRight[2]= color[2]+shadeRight; if(colRight[2]<0.0f) colRight[2]= 0.0f; + colLeft[0]= color[0]+shadeLeft; if (colLeft[0]>1.0f) colLeft[0]= 1.0f; + colLeft[1]= color[1]+shadeLeft; if (colLeft[1]>1.0f) colLeft[1]= 1.0f; + colLeft[2]= color[2]+shadeLeft; if (colLeft[2]>1.0f) colLeft[2]= 1.0f; + colRight[0]= color[0]+shadeRight; if (colRight[0]<0.0f) colRight[0]= 0.0f; + colRight[1]= color[1]+shadeRight; if (colRight[1]<0.0f) colRight[1]= 0.0f; + colRight[2]= color[2]+shadeRight; if (colRight[2]<0.0f) colRight[2]= 0.0f; glShadeModel(GL_SMOOTH); glBegin(mode); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index ff72c13aa34..13962777da3 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1342,8 +1342,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, dir1 &= (UI_TOP|UI_DOWN); } - if (dir2==0) if(dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN; - if (dir2==0) if(dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT; + if (dir2==0) if (dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN; + if (dir2==0) if (dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT; /* no space at all? don't change */ if (left || right) { diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index d47bd44d8f7..91ff4000541 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -953,7 +953,7 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event) // if there are problems because of this, then rna needs changed update functions. // // object_test_constraints(ob); - // if(ob->pose) update_pose_constraint_flags(ob->pose); + // if (ob->pose) update_pose_constraint_flags(ob->pose); if (ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); else DAG_id_tag_update(&ob->id, OB_RECALC_OB); -- cgit v1.2.3