From c8b53d2aaf7ee4d07736cf842ca385e0311f3c53 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Feb 2012 02:23:42 +0000 Subject: code style cleanup, no functional changes. --- source/blender/blenlib/intern/BLI_args.c | 3 +- source/blender/blenlib/intern/BLI_linklist.c | 7 +- source/blender/blenlib/intern/math_geom.c | 8 +- source/blender/blenlib/intern/path_util.c | 16 +-- source/blender/bmesh/tools/BME_bevel.c | 16 +-- source/blender/editors/armature/reeb.c | 2 +- source/blender/editors/interface/interface_icons.c | 4 +- source/blender/editors/mesh/editmesh_add.c | 2 +- source/blender/editors/metaball/mball_edit.c | 12 +- source/blender/editors/object/object_add.c | 2 +- source/blender/editors/object/object_bake.c | 6 +- source/blender/editors/object/object_edit.c | 18 +-- source/blender/editors/object/object_modifier.c | 2 +- source/blender/editors/sculpt_paint/sculpt_uv.c | 150 ++++++++++----------- source/blender/editors/space_node/drawnode.c | 24 ++-- source/blender/editors/transform/transform.c | 8 +- .../editors/transform/transform_conversions.c | 4 +- .../blender/editors/transform/transform_generics.c | 6 +- .../editors/transform/transform_manipulator.c | 4 +- source/blender/imbuf/intern/scaling.c | 8 +- 20 files changed, 152 insertions(+), 150 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 04d5d57c239..bbf005e79ac 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -290,7 +290,8 @@ void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void * ba->passes[i + j] = pass; } i += retval; - } else if (retval == -1){ + } + else if (retval == -1) { if (a) { if (a->key->pass != -1) ba->passes[i] = pass; diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c index 6300817ec03..7529904c1ea 100644 --- a/source/blender/blenlib/intern/BLI_linklist.c +++ b/source/blender/blenlib/intern/BLI_linklist.c @@ -104,10 +104,11 @@ void BLI_linklist_append(LinkNode **listp, void *ptr) nlink->link = ptr; nlink->next = NULL; - if(node == NULL){ + if (node == NULL) { *listp = nlink; - } else { - while(node->next != NULL){ + } + else { + while (node->next != NULL) { node = node->next; } node->next = nlink; diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 500e27064d7..461f53ac434 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -1304,7 +1304,7 @@ float closest_to_line_v3(float cp[3], const float p[3], const float l1[3], const float h[3],u[3],lambda; sub_v3_v3v3(u, l2, l1); sub_v3_v3v3(h, p, l1); - lambda =dot_v3v3(u,h)/dot_v3v3(u,u); + lambda = dot_v3v3(u,h)/dot_v3v3(u,u); cp[0] = l1[0] + u[0] * lambda; cp[1] = l1[1] + u[1] * lambda; cp[2] = l1[2] + u[2] * lambda; @@ -1316,7 +1316,7 @@ float closest_to_line_v2(float cp[2],const float p[2], const float l1[2], const float h[2],u[2],lambda; sub_v2_v2v2(u, l2, l1); sub_v2_v2v2(h, p, l1); - lambda =dot_v2v2(u,h)/dot_v2v2(u,u); + lambda = dot_v2v2(u,h)/dot_v2v2(u,u); cp[0] = l1[0] + u[0] * lambda; cp[1] = l1[1] + u[1] * lambda; return lambda; @@ -2633,8 +2633,8 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo transpose_m3(qi); add_m3_m3m3(q,q,qi); mul_m3_fl(q,0.5f); - odet =ndet; - ndet =_det_m3(q); + odet = ndet; + ndet = _det_m3(q); i++; } diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index bbdb9bc5823..f2d88c0587b 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -118,7 +118,7 @@ int BLI_stringdec(const char *string, char *head, char *tail, unsigned short *nu for (i = len - 1; i >= lenlslash; i--) { if (isdigit(string[i])) { - if (found){ + if (found) { nums = i; } else{ @@ -238,7 +238,7 @@ int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, cons else { char *tempname_buf; tempname[0]= '\0'; - tempname_buf =BLI_strncat_utf8(tempname, left, name_len - numlen); + tempname_buf = BLI_strncat_utf8(tempname, left, name_len - numlen); memcpy(tempname_buf, numstr, numlen + 1); } } while(unique_check(arg, tempname)); @@ -361,12 +361,12 @@ void BLI_cleanup_path(const char *relabase, char *dir) } } - while ( (start = strstr(dir,"\\.\\")) ){ + while ( (start = strstr(dir,"\\.\\")) ) { eind = start + strlen("\\.\\") - 1; memmove( start, eind, strlen(eind)+1 ); } - while ( (start = strstr(dir,"\\\\" )) ){ + while ( (start = strstr(dir,"\\\\" )) ) { eind = start + strlen("\\\\") - 1; memmove( start, eind, strlen(eind)+1 ); } @@ -398,12 +398,12 @@ void BLI_cleanup_path(const char *relabase, char *dir) } } - while ( (start = strstr(dir,"/./")) ){ + while ( (start = strstr(dir,"/./")) ) { eind = start + (3 - 1) /* strlen("/./") - 1 */; memmove( start, eind, strlen(eind)+1 ); } - while ( (start = strstr(dir,"//" )) ){ + while ( (start = strstr(dir,"//" )) ) { eind = start + (2 - 1) /* strlen("//") - 1 */; memmove( start, eind, strlen(eind)+1 ); } @@ -1236,9 +1236,9 @@ void BLI_make_exist(char *dir) a = strlen(dir); - while(BLI_is_dir(dir) == 0){ + while (BLI_is_dir(dir) == 0) { a --; - while(dir[a] != SEP){ + while (dir[a] != SEP) { a--; if (a <= 0) break; } diff --git a/source/blender/bmesh/tools/BME_bevel.c b/source/blender/bmesh/tools/BME_bevel.c index b20b7316eb4..ea1c6b1c422 100644 --- a/source/blender/bmesh/tools/BME_bevel.c +++ b/source/blender/bmesh/tools/BME_bevel.c @@ -473,7 +473,7 @@ static BMVert *BME_bevel_wire(BMesh *bm, BMVert *v, float value, int res, int UN if (res) { /* bmesh_jekv; */ - //void BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac, int calcnorm){ + //void BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac, int calcnorm) { //hrm, why is there a fac here? it just removes a vert BM_vert_collapse_edges(bm, v->e, v); } @@ -596,7 +596,7 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti l = l->radial_next; } - if (l->f != f){ + if (l->f != f) { //printf("Whoops! You got something out of order in BME_bevel_edge()!\n"); } @@ -770,7 +770,7 @@ static void bevel_init_verts(BMesh *bm, int options, BME_TransData_Head *td) weight = 0.0; if (!BMO_elem_flag_test(bm, v, BME_BEVEL_NONMAN)) { /* modifiers should not use selection */ - if(options & BME_BEVEL_SELECT){ + if (options & BME_BEVEL_SELECT) { if(BM_elem_flag_test(v, BM_ELEM_SELECT)) weight = 1.0; } /* bevel weight NYI */ @@ -778,7 +778,7 @@ static void bevel_init_verts(BMesh *bm, int options, BME_TransData_Head *td) weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT); else weight = 1.0; - if(weight > 0.0){ + if(weight > 0.0) { BMO_elem_flag_enable(bm, v, BME_BEVEL_BEVEL); BME_assign_transdata(td, bm, v, v->co, v->co, NULL, NULL, 1.0, weight, -1, NULL); } @@ -795,7 +795,7 @@ static void bevel_init_edges(BMesh *bm, int options, BME_TransData_Head *td) BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { weight = 0.0; if (!BMO_elem_flag_test(bm, e, BME_BEVEL_NONMAN)) { - if(options & BME_BEVEL_SELECT){ + if(options & BME_BEVEL_SELECT) { if(BM_elem_flag_test(e, BM_ELEM_SELECT)) weight = 1.0; } else if(options & BME_BEVEL_WEIGHT) { @@ -804,7 +804,7 @@ static void bevel_init_edges(BMesh *bm, int options, BME_TransData_Head *td) else { weight = 1.0; } - if(weight > 0.0){ + if(weight > 0.0) { BMO_elem_flag_enable(bm, e, BME_BEVEL_BEVEL); BMO_elem_flag_enable(bm, e->v1, BME_BEVEL_BEVEL); BMO_elem_flag_enable(bm, e->v2, BME_BEVEL_BEVEL); @@ -834,7 +834,7 @@ static BMesh *BME_bevel_initialize(BMesh *bm, int options, int UNUSED(defgrp_ind /* tag non-manifold geometr */ BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { BMO_elem_flag_enable(bm, v, BME_BEVEL_ORIG); - if(v->e){ + if(v->e) { BME_assign_transdata(td, bm, v, v->co, v->co, NULL, NULL, 0, -1, -1, NULL); if (!BM_vert_is_manifold(bm, v)) BMO_elem_flag_enable(bm, v, BME_BEVEL_NONMAN); @@ -948,7 +948,7 @@ static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int option /* Debug print, remov */ BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { - if(f->len == 2){ + if(f->len == 2) { printf("warning"); } } diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index cb0857d41e6..bf7cde54ccb 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -3383,7 +3383,7 @@ ReebGraph *BIF_ReebGraphMultiFromEditMesh(bContext *C) #if 0 Scene *scene = CTX_data_scene(C); Object *obedit = CTX_data_edit_object(C); - EditMesh *em =BKE_mesh_get_editmesh(((Mesh*)obedit->data)); + EditMesh *em = BKE_mesh_get_editmesh(((Mesh*)obedit->data)); EdgeIndex indexed_edges; VertexData *data; ReebGraph *rg = NULL; diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 7c2d411e076..3e6d4f31479 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -186,7 +186,7 @@ static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc) di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); di->type= ICON_TYPE_VECTOR; - di->data.vector.func =drawFunc; + di->data.vector.func = drawFunc; new_icon->drawinfo_free = NULL; new_icon->drawinfo = di; @@ -662,7 +662,7 @@ static void init_iconfile_list(struct ListBase *list) /* free temporary direntry structure that's been created by BLI_dir_contents() */ i= totfile-1; - for(; i>=0; i--){ + for (; i>=0; i--) { MEM_freeN(dir[i].relname); MEM_freeN(dir[i].path); if (dir[i].string) { diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index c12d28e4166..12cc21f4807 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -56,7 +56,7 @@ static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4]) { Object *obedit= CTX_data_edit_object(C); - View3D *v3d =CTX_wm_view3d(C); + View3D *v3d = CTX_wm_view3d(C); float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3]; unit_m4(primmat); diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index da8009ecc22..e9c1bd4047e 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -345,7 +345,7 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op) ml= mb->editelems->first; if(ml) { - while(ml){ + while(ml) { if((ml->flag & SELECT) != invert) ml->flag |= MB_HIDE; ml= ml->next; @@ -449,11 +449,11 @@ int mouse_mball(bContext *C, const int mval[2], int extend) while(ml) { for(a=0; aselcol1==buffer[ 4 * a + 3 ]){ + if(ml->selcol1==buffer[ 4 * a + 3 ]) { ml->flag |= MB_SCALE_RAD; act= ml; } - if(ml->selcol2==buffer[ 4 * a + 3 ]){ + if(ml->selcol2==buffer[ 4 * a + 3 ]) { ml->flag &= ~MB_SCALE_RAD; act= ml; } @@ -505,7 +505,7 @@ static void freeMetaElemlist(ListBase *lb) if(lb==NULL) return; ml= lb->first; - while(ml){ + while(ml) { next= ml->next; BLI_remlink(lb, ml); MEM_freeN(ml); @@ -526,7 +526,7 @@ static void undoMball_to_editMball(void *lbu, void *lbe, void *UNUSED(obe)) /* copy 'undo' MetaElems to 'edit' MetaElems */ ml= lb->first; - while(ml){ + while(ml) { newml= MEM_dupallocN(ml); BLI_addtail(editelems, newml); ml= ml->next; @@ -546,7 +546,7 @@ static void *editMball_to_undoMball(void *lbe, void *UNUSED(obe)) /* copy contents of current ListBase to the undo ListBase */ ml= editelems->first; - while(ml){ + while(ml) { newml= MEM_dupallocN(ml); BLI_addtail(lb, newml); ml= ml->next; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 1b289732302..86fa01b44d3 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -154,7 +154,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *r /* returns standard diameter */ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, float *rot, float primmat[][4]) { - View3D *v3d =CTX_wm_view3d(C); + View3D *v3d = CTX_wm_view3d(C); float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3]; unit_m4(primmat); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 6df8ed1155a..5473552eedd 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -424,9 +424,9 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData nr_tris= mface[f].v4!=0 ? 2 : 1; for(t= 0; tuv[data.i0], mtfate->uv[data.i1], mtfate->uv[data.i2]); } diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index b0d99ddd788..6825edb0822 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -140,7 +140,7 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op)) int changed = 0; /* XXX need a context loop to handle such cases */ - for(base = FIRSTBASE; base; base=base->next){ + for(base = FIRSTBASE; base; base=base->next) { if((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) { base->flag |= SELECT; base->object->flag = base->flag; @@ -182,7 +182,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if(!unselected) { - if (base->flag & SELECT){ + if (base->flag & SELECT) { base->flag &= ~SELECT; base->object->flag = base->flag; base->object->restrictflag |= OB_RESTRICT_VIEW; @@ -193,7 +193,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) } } else { - if (!(base->flag & SELECT)){ + if (!(base->flag & SELECT)) { base->object->restrictflag |= OB_RESTRICT_VIEW; changed = 1; } @@ -272,12 +272,12 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if(!unselected) { - if (base->flag & SELECT){ + if (base->flag & SELECT) { base->object->restrictflag |= OB_RESTRICT_RENDER; } } else { - if (!(base->flag & SELECT)){ + if (!(base->flag & SELECT)) { base->object->restrictflag |= OB_RESTRICT_RENDER; } } @@ -447,7 +447,7 @@ void ED_object_enter_editmode(bContext *C, int flag) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MESH, scene); } - else if (ob->type==OB_ARMATURE){ + else if (ob->type==OB_ARMATURE) { bArmature *arm= base->object->data; if (!arm) return; /* @@ -906,7 +906,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) base->object->recalc |= OB_RECALC_DATA; } } - else if(event==21){ + else if(event==21) { if (base->object->type==OB_MESH) { ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf); @@ -1024,7 +1024,7 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v strcat(str, "|Curve Resolution%x25"); } - if(ob->type==OB_MESH){ + if(ob->type==OB_MESH) { strcat(str, "|Subsurf Settings%x21|AutoSmooth%x27"); } @@ -1032,7 +1032,7 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v strcat(str, "|Pass Index%x30"); - if(ob->type==OB_MESH || ob->type==OB_CURVE || ob->type==OB_LATTICE || ob->type==OB_SURF){ + if(ob->type==OB_MESH || ob->type==OB_CURVE || ob->type==OB_LATTICE || ob->type==OB_SURF) { strcat(str, "|Modifiers ...%x24"); } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 547c5b24778..55dbbb50958 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -261,7 +261,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob void ED_object_modifier_clear(Main *bmain, Scene *scene, Object *ob) { - ModifierData *md =ob->modifiers.first; + ModifierData *md = ob->modifiers.first; int sort_depsgraph = 0; if(!md) diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index de1238dabd7..f902c88d5f0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -156,7 +156,7 @@ typedef struct Temp_UvData{ -void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2], float alpha, float radius, float aspectRatio){ +void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2], float alpha, float radius, float aspectRatio) { Temp_UVData *tmp_uvdata; float diff[2]; int i; @@ -166,7 +166,7 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float tmp_uvdata = (Temp_UVData *)MEM_callocN(sculptdata->totalUniqueUvs * sizeof(Temp_UVData), "Temporal data"); /* counting neighbors */ - for (i = 0; i < sculptdata->totalUvEdges; i++){ + for (i = 0; i < sculptdata->totalUvEdges; i++) { UvEdge *tmpedge = sculptdata->uvedges+i; tmp_uvdata[tmpedge->uv1].ncounter++; tmp_uvdata[tmpedge->uv2].ncounter++; @@ -175,7 +175,7 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float add_v2_v2(tmp_uvdata[tmpedge->uv1].sum_co, sculptdata->uv[tmpedge->uv2].uv); } - for (i = 0; i < sculptdata->totalUniqueUvs; i++){ + for (i = 0; i < sculptdata->totalUniqueUvs; i++) { copy_v2_v2(diff,tmp_uvdata[i].sum_co); mul_v2_fl(diff,1.f/tmp_uvdata[i].ncounter); copy_v2_v2(tmp_uvdata[i].p,diff); @@ -184,23 +184,23 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float tmp_uvdata[i].b[1] = diff[1] - sculptdata->uv[i].uv[1]; } - for (i = 0; i < sculptdata->totalUvEdges; i++){ + for (i = 0; i < sculptdata->totalUvEdges; i++) { UvEdge *tmpedge = sculptdata->uvedges+i; add_v2_v2(tmp_uvdata[tmpedge->uv1].sum_b, tmp_uvdata[tmpedge->uv2].b); add_v2_v2(tmp_uvdata[tmpedge->uv2].sum_b, tmp_uvdata[tmpedge->uv1].b); } - for (i = 0; i < sculptdata->totalUniqueUvs; i++){ + for (i = 0; i < sculptdata->totalUniqueUvs; i++) { float dist; /* This is supposed to happen only if "Pin Edges" is on, since we have initialization on stroke start * If ever uv brushes get their own mode we should check for toolsettings option too */ - if((sculptdata->uv[i].flag & MARK_BOUNDARY)){ + if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) { continue; } sub_v2_v2v2(diff, sculptdata->uv[i].uv, mouse_coord); diff[1] /= aspectRatio; - if((dist = dot_v2v2(diff, diff)) <= radius){ + if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); @@ -208,11 +208,11 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float sculptdata->uv[i].uv[0] = (1.0-strength)*sculptdata->uv[i].uv[0] + strength*(tmp_uvdata[i].p[0] - 0.5f*(tmp_uvdata[i].b[0] + tmp_uvdata[i].sum_b[0]/tmp_uvdata[i].ncounter)); sculptdata->uv[i].uv[1] = (1.0-strength)*sculptdata->uv[i].uv[1] + strength*(tmp_uvdata[i].p[1] - 0.5f*(tmp_uvdata[i].b[1] + tmp_uvdata[i].sum_b[1]/tmp_uvdata[i].ncounter)); - for(element = sculptdata->uv[i].element; element; element = element->next){ + for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; BMLoop *l; - if(element->separate && element != sculptdata->uv[i].element) + if (element->separate && element != sculptdata->uv[i].element) break; l = element->l; @@ -238,7 +238,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul tmp_uvdata = (Temp_UVData *)MEM_callocN(sculptdata->totalUniqueUvs * sizeof(Temp_UVData), "Temporal data"); /* counting neighbors */ - for (i = 0; i < sculptdata->totalUvEdges; i++){ + for (i = 0; i < sculptdata->totalUvEdges; i++) { UvEdge *tmpedge = sculptdata->uvedges+i; tmp_uvdata[tmpedge->uv1].ncounter++; tmp_uvdata[tmpedge->uv2].ncounter++; @@ -249,22 +249,22 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul /* Original Lacplacian algorithm included removal of normal component of translation. here it is not * needed since we translate along the UV plane always.*/ - for (i = 0; i < sculptdata->totalUniqueUvs; i++){ + for (i = 0; i < sculptdata->totalUniqueUvs; i++) { copy_v2_v2(tmp_uvdata[i].p, tmp_uvdata[i].sum_co); mul_v2_fl(tmp_uvdata[i].p, 1.f/tmp_uvdata[i].ncounter); } - for (i = 0; i < sculptdata->totalUniqueUvs; i++){ + for (i = 0; i < sculptdata->totalUniqueUvs; i++) { float dist; /* This is supposed to happen only if "Pin Edges" is on, since we have initialization on stroke start * If ever uv brushes get their own mode we should check for toolsettings option too */ - if((sculptdata->uv[i].flag & MARK_BOUNDARY)){ + if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) { continue; } sub_v2_v2v2(diff, sculptdata->uv[i].uv, mouse_coord); diff[1] /= aspectRatio; - if((dist = dot_v2v2(diff, diff)) <= radius){ + if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); @@ -272,11 +272,11 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul sculptdata->uv[i].uv[0] = (1.0-strength)*sculptdata->uv[i].uv[0] + strength*tmp_uvdata[i].p[0]; sculptdata->uv[i].uv[1] = (1.0-strength)*sculptdata->uv[i].uv[1] + strength*tmp_uvdata[i].p[1]; - for(element = sculptdata->uv[i].element; element; element = element->next){ + for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; BMLoop *l; - if(element->separate && element != sculptdata->uv[i].element) + if (element->separate && element != sculptdata->uv[i].element) break; l = element->l; @@ -326,20 +326,20 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, /* * Pinch Tool */ - if(tool == UV_SCULPT_TOOL_PINCH){ + if (tool == UV_SCULPT_TOOL_PINCH) { int i; alpha *= invert; - for (i = 0; i < sculptdata->totalUniqueUvs; i++){ + for (i = 0; i < sculptdata->totalUniqueUvs; i++) { float dist, diff[2]; /* This is supposed to happen only if "Lock Borders" is on, since we have initialization on stroke start * If ever uv brushes get their own mode we should check for toolsettings option too */ - if(sculptdata->uv[i].flag & MARK_BOUNDARY){ + if (sculptdata->uv[i].flag & MARK_BOUNDARY) { continue; } sub_v2_v2v2(diff, sculptdata->uv[i].uv, co); diff[1] /= aspectRatio; - if((dist = dot_v2v2(diff, diff)) <= radius){ + if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); @@ -348,11 +348,11 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, sculptdata->uv[i].uv[0] -= strength*diff[0]*0.001; sculptdata->uv[i].uv[1] -= strength*diff[1]*0.001; - for(element = sculptdata->uv[i].element; element; element = element->next){ + for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; BMLoop *l; - if(element->separate && element != sculptdata->uv[i].element) + if (element->separate && element != sculptdata->uv[i].element) break; l = element->l; @@ -366,9 +366,9 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, /* * Smooth Tool */ - else if(tool == UV_SCULPT_TOOL_RELAX){ + else if (tool == UV_SCULPT_TOOL_RELAX) { unsigned int method = toolsettings->uv_relax_method; - if(method == UV_SCULPT_TOOL_RELAX_HC){ + if (method == UV_SCULPT_TOOL_RELAX_HC) { HC_relaxation_iteration_uv(em, sculptdata, co, alpha, radius, aspectRatio); }else{ laplacian_relaxation_iteration_uv(em, sculptdata, co, alpha, radius, aspectRatio); @@ -378,23 +378,23 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, /* * Grab Tool */ - else if(tool == UV_SCULPT_TOOL_GRAB){ + else if (tool == UV_SCULPT_TOOL_GRAB) { int i; float diff[2]; sub_v2_v2v2(diff, co, sculptdata->initial_stroke->init_coord); - for(i = 0; i < sculptdata->initial_stroke->totalInitialSelected; i++ ){ + for (i = 0; i < sculptdata->initial_stroke->totalInitialSelected; i++ ) { UvElement *element; int uvindex = sculptdata->initial_stroke->initialSelection[i].uv; float strength = sculptdata->initial_stroke->initialSelection[i].strength; sculptdata->uv[uvindex].uv[0] = sculptdata->initial_stroke->initialSelection[i].initial_uv[0] + strength*diff[0]; sculptdata->uv[uvindex].uv[1] = sculptdata->initial_stroke->initialSelection[i].initial_uv[1] + strength*diff[1]; - for(element = sculptdata->uv[uvindex].element; element; element = element->next){ + for (element = sculptdata->uv[uvindex].element; element; element = element->next) { MLoopUV *luv; BMLoop *l; - if(element->separate && element != sculptdata->uv[uvindex].element) + if (element->separate && element != sculptdata->uv[uvindex].element) break; l = element->l; @@ -409,21 +409,21 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op) { UvSculptData *data = op->customdata; - if(data->timer){ + if (data->timer) { WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer); } - if(data->elementMap) + if (data->elementMap) { EDBM_free_uv_element_map(data->elementMap); } - if(data->uv){ + if (data->uv) { MEM_freeN(data->uv); } - if(data->uvedges){ + if (data->uvedges) { MEM_freeN(data->uvedges); } - if(data->initial_stroke){ - if(data->initial_stroke->initialSelection){ + if (data->initial_stroke) { + if (data->initial_stroke->initialSelection) { MEM_freeN(data->initial_stroke->initialSelection); } MEM_freeN(data->initial_stroke); @@ -433,27 +433,27 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op) op->customdata = NULL; } -static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands){ +static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands) { UvElement *element = ED_get_uv_element(map, efa, l); - if(!element || (doIslands && element->island != island_index)){ + if (!element || (doIslands && element->island != island_index)) { return -1; } return element - map->buf; } -static unsigned int uv_edge_hash(const void *key){ +static unsigned int uv_edge_hash(const void *key) { UvEdge *edge = (UvEdge *)key; return BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) + BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1)); } -static int uv_edge_compare(const void *a, const void *b){ +static int uv_edge_compare(const void *a, const void *b) { UvEdge *edge1 = (UvEdge *)a; UvEdge *edge2 = (UvEdge *)b; - if((edge1->uv1 == edge2->uv1) && (edge1->uv2 == edge2->uv2)){ + if ((edge1->uv1 == edge2->uv1) && (edge1->uv2 == edge2->uv2)) { return 0; } return 1; @@ -471,7 +471,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent op->customdata = data; - if(data){ + if (data) { int counter = 0, i; ARegion *ar= CTX_wm_region(C); float co[2]; @@ -493,22 +493,22 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent data->uvsculpt = &ts->uvsculpt->paint; - if(do_island_optimization){ + if (do_island_optimization) { /* We will need island information */ - if(ts->uv_flag & UV_SYNC_SELECTION){ + if (ts->uv_flag & UV_SYNC_SELECTION) { data->elementMap = EDBM_make_uv_element_map(em, 0, 1); }else{ data->elementMap = EDBM_make_uv_element_map(em, 1, 1); } }else { - if(ts->uv_flag & UV_SYNC_SELECTION){ + if (ts->uv_flag & UV_SYNC_SELECTION) { data->elementMap = EDBM_make_uv_element_map(em, 0, 0); }else{ data->elementMap = EDBM_make_uv_element_map(em, 1, 0); } } - if(!data->elementMap){ + if (!data->elementMap) { uv_sculpt_stroke_exit(C, op); return NULL; } @@ -517,7 +517,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); /* we need to find the active island here */ - if(do_island_optimization){ + if (do_island_optimization) { UvElement *element; NearestHit hit; Image *ima= CTX_data_edit_image(C); @@ -529,9 +529,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent /* Count 'unique' uvs */ - for(i = 0; i < data->elementMap->totalUVs; i++){ - if(data->elementMap->buf[i].separate - && (!do_island_optimization || data->elementMap->buf[i].island == island_index)){ + for (i = 0; i < data->elementMap->totalUVs; i++) { + if (data->elementMap->buf[i].separate + && (!do_island_optimization || data->elementMap->buf[i].island == island_index)) { counter++; } } @@ -542,14 +542,14 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent edgeHash = BLI_ghash_new(uv_edge_hash, uv_edge_compare, "uv_brush_edge_hash"); /* we have at most totalUVs edges */ edges = MEM_mallocN(sizeof(*edges)*data->elementMap->totalUVs, "uv_brush_all_edges"); - if(!data->uv || !uniqueUv || !edgeHash || !edges){ - if(edges){ + if (!data->uv || !uniqueUv || !edgeHash || !edges) { + if (edges) { MEM_freeN(edges); } - if(uniqueUv){ + if (uniqueUv) { MEM_freeN(uniqueUv); } - if(edgeHash){ + if (edgeHash) { MEM_freeN(edgeHash); } uv_sculpt_stroke_exit(C, op); @@ -560,13 +560,13 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent /* So that we can use this as index for the UvElements */ counter = -1; /* initialize the unique UVs */ - for(i = 0; i < bm->totvert; i++){ + for (i = 0; i < bm->totvert; i++) { UvElement *element = data->elementMap->vert[i]; - for(; element; element = element->next){ - if(element->separate){ - if(do_island_optimization && (element->island != island_index)){ + for (; element; element = element->next) { + if (element->separate) { + if (do_island_optimization && (element->island != island_index)) { /* skip this uv if not on the active island */ - for(; element->next && !(element->next->separate); element = element->next) + for (; element->next && !(element->next->separate); element = element->next) ; continue; } @@ -593,7 +593,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent int offset2, itmp2 = get_uv_element_offset_from_face(data->elementMap, efa, l->next, island_index, do_island_optimization); /* Skip edge if not found(unlikely) or not on valid island */ - if(itmp1 == -1 || itmp2 == -1) + if (itmp1 == -1 || itmp2 == -1) continue; offset1 = uniqueUv[itmp1]; @@ -602,7 +602,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent edges[counter].flag = 0; /* using an order policy, sort uvs according to address space. This avoids * Having two different UvEdges with the same uvs on different positions */ - if(offset1 < offset2){ + if (offset1 < offset2) { edges[counter].uv1 = offset1; edges[counter].uv2 = offset2; } @@ -611,7 +611,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent edges[counter].uv2 = offset1; } /* Hack! Set the value of the key to its flag. Now we can set the flag when an edge exists twice :) */ - if(BLI_ghash_haskey(edgeHash, &edges[counter])){ + if (BLI_ghash_haskey(edgeHash, &edges[counter])) { char *flag = BLI_ghash_lookup(edgeHash, &edges[counter]); *flag = 1; } @@ -627,21 +627,21 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent /* Allocate connectivity data, we allocate edges once */ data->uvedges = MEM_mallocN(sizeof(*data->uvedges)*BLI_ghash_size(edgeHash), "uv_brush_edge_connectivity_data"); - if(!data->uvedges){ + if (!data->uvedges) { BLI_ghash_free(edgeHash, NULL, NULL); MEM_freeN(edges); uv_sculpt_stroke_exit(C, op); return NULL; } ghi = BLI_ghashIterator_new(edgeHash); - if(!ghi){ + if (!ghi) { BLI_ghash_free(edgeHash, NULL, NULL); MEM_freeN(edges); uv_sculpt_stroke_exit(C, op); return NULL; } /* fill the edges with data */ - for(i = 0; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){ + for (i = 0; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)) { data->uvedges[i++] = *((UvEdge *)BLI_ghashIterator_getKey(ghi)); } data->totalUvEdges = BLI_ghash_size(edgeHash); @@ -652,9 +652,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent MEM_freeN(edges); /* transfer boundary edge property to uvs */ - if(ts->uv_sculpt_settings & UV_SCULPT_LOCK_BORDERS){ - for(i = 0; i < data->totalUvEdges; i++){ - if(!data->uvedges[i].flag){ + if (ts->uv_sculpt_settings & UV_SCULPT_LOCK_BORDERS) { + for (i = 0; i < data->totalUvEdges; i++) { + if (!data->uvedges[i].flag) { data->uv[data->uvedges[i].uv1].flag |= MARK_BOUNDARY; data->uv[data->uvedges[i].uv2].flag |= MARK_BOUNDARY; } @@ -662,7 +662,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent } /* Allocate initial selection for grab tool */ - if(data->tool == UV_SCULPT_TOOL_GRAB){ + if (data->tool == UV_SCULPT_TOOL_GRAB) { float radius, radius_root; UvSculptData *sculptdata = (UvSculptData *)op->customdata; SpaceImage *sima; @@ -685,11 +685,11 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent /* Allocate selection stack */ data->initial_stroke = MEM_mallocN(sizeof(*data->initial_stroke), "uv_sculpt_initial_stroke"); - if(!data->initial_stroke){ + if (!data->initial_stroke) { uv_sculpt_stroke_exit(C, op); } data->initial_stroke->initialSelection = MEM_mallocN(sizeof(*data->initial_stroke->initialSelection)*data->totalUniqueUvs, "uv_sculpt_initial_selection"); - if(!data->initial_stroke->initialSelection){ + if (!data->initial_stroke->initialSelection) { uv_sculpt_stroke_exit(C, op); } @@ -697,15 +697,15 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent counter = 0; - for(i = 0; i < data->totalUniqueUvs; i++){ + for (i = 0; i < data->totalUniqueUvs; i++) { float dist, diff[2]; - if(data->uv[i].flag & MARK_BOUNDARY){ + if (data->uv[i].flag & MARK_BOUNDARY) { continue; } sub_v2_v2v2(diff, data->uv[i].uv, co); diff[1] /= aspectRatio; - if((dist = dot_v2v2(diff, diff)) <= radius){ + if ((dist = dot_v2v2(diff, diff)) <= radius) { float strength; strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); @@ -728,7 +728,7 @@ static int uv_sculpt_stroke_invoke(bContext *C, wmOperator *op, wmEvent *event) UvSculptData *data; Object *obedit = CTX_data_edit_object(C); - if(!(data = uv_sculpt_stroke_init(C, op, event))) { + if (!(data = uv_sculpt_stroke_init(C, op, event))) { return OPERATOR_CANCELLED; } @@ -736,7 +736,7 @@ static int uv_sculpt_stroke_invoke(bContext *C, wmOperator *op, wmEvent *event) data->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.001f); - if(!data->timer){ + if (!data->timer) { uv_sculpt_stroke_exit(C, op); return OPERATOR_CANCELLED; } @@ -763,7 +763,7 @@ static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) uv_sculpt_stroke_apply(C, op, event, obedit); break; case TIMER: - if(event->customdata == data->timer) + if (event->customdata == data->timer) uv_sculpt_stroke_apply(C, op, event, obedit); break; default: diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index b161d16ecf9..a58e03be237 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1533,19 +1533,19 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), { uiLayout *sub, *col; - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "offset", 0, NULL, ICON_NONE); uiItemR(col, ptr, "size", 0, NULL, ICON_NONE); - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "use_min", 0, NULL, ICON_NONE); - sub =uiLayoutColumn(col, 0); + sub = uiLayoutColumn(col, 0); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); uiItemR(sub, ptr, "min", 0, "", ICON_NONE); - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "use_max", 0, NULL, ICON_NONE); - sub =uiLayoutColumn(col, 0); + sub = uiLayoutColumn(col, 0); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); uiItemR(sub, ptr, "max", 0, "", ICON_NONE); } @@ -1554,7 +1554,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "use_premultiply", 0, NULL, ICON_NONE); uiItemR(col, ptr, "premul", 0, NULL, ICON_NONE); } @@ -1563,7 +1563,7 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), P { uiLayout *col; - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE); } @@ -1572,7 +1572,7 @@ static void node_composit_buts_hue_sat(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *col; - col =uiLayoutColumn(layout, 0); + col = uiLayoutColumn(layout, 0); uiItemR(col, ptr, "color_hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1587,7 +1587,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } @@ -1596,7 +1596,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED { uiLayout *col; - col =uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } @@ -1606,7 +1606,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C) uiLayout *row, *col; uiItemL(layout, "Despill Channel:", ICON_NONE); - row =uiLayoutRow(layout,0); + row = uiLayoutRow(layout,0); uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); col= uiLayoutColumn(layout, 0); @@ -1664,7 +1664,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED( row= uiLayoutRow(col, 0); uiItemR(row, ptr, "matte_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - col =uiLayoutColumn(layout, 0); + col = uiLayoutColumn(layout, 0); uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE); if(RNA_enum_get(ptr, "limit_method")==0) { diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index dfdbf852305..8e7537b14e4 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -790,7 +790,7 @@ int transformEvent(TransInfo *t, wmEvent *event) } /* else do non-mapped events */ else if (event->val==KM_PRESS) { - switch (event->type){ + switch (event->type) { case RIGHTMOUSE: t->state = TRANS_CANCEL; break; @@ -1039,7 +1039,7 @@ int transformEvent(TransInfo *t, wmEvent *event) } else if (event->val==KM_RELEASE) { - switch (event->type){ + switch (event->type) { case LEFTSHIFTKEY: case RIGHTSHIFTKEY: t->modifiers &= ~MOD_CONSTRAINT_PLANE; @@ -2671,7 +2671,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) protectedSizeBits(td->protectflag, fsize); if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't resize objects itself - if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){ + if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) { /* scale val and reset size */ *td->val = td->ival * (1 + (fsize[0] - 1) * td->factor); @@ -2955,7 +2955,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL); mat3_to_quat( quat,fmat); // Actual transform - if(td->ext->quat){ + if(td->ext->quat) { mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat); /* is there a reason not to have this here? -jahka */ diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index abbe2db9f19..7737978c4ea 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -409,7 +409,7 @@ static short apply_targetless_ik(Object *ob) parchan= pchan; /* Find the chain's root & count the segments needed */ - for (; parchan; parchan=parchan->parent){ + for (; parchan; parchan=parchan->parent) { chanlist[segcount]= parchan; segcount++; @@ -1343,7 +1343,7 @@ static void createTransMBallVerts(TransInfo *t) td->ext = tx; /* Radius of MetaElem (mass of MetaElem influence) */ - if(ml->flag & MB_SCALE_RAD){ + if(ml->flag & MB_SCALE_RAD) { td->val = &ml->rad; td->ival = ml->rad; } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8013520639e..13f45ff58b9 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -741,11 +741,11 @@ static void recalcData_view3d(TransInfo *t) } /* Ensure all bones are correctly adjusted */ - for (ebo = edbo->first; ebo; ebo = ebo->next){ + for (ebo = edbo->first; ebo; ebo = ebo->next) { - if ((ebo->flag & BONE_CONNECTED) && ebo->parent){ + if ((ebo->flag & BONE_CONNECTED) && ebo->parent) { /* If this bone has a parent tip that has been moved */ - if (ebo->parent->flag & BONE_TIPSEL){ + if (ebo->parent->flag & BONE_TIPSEL) { copy_v3_v3 (ebo->head, ebo->parent->tail); if(t->mode==TFM_BONE_ENVELOPE) ebo->rad_head= ebo->parent->rad_tail; } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 67a0d5dbe04..bd687ddfe40 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -362,10 +362,10 @@ int calc_manipulator_stats(const bContext *C) } } } /* end editmesh */ - else if (obedit->type==OB_ARMATURE){ + else if (obedit->type==OB_ARMATURE) { bArmature *arm= obedit->data; EditBone *ebo; - for (ebo= arm->edbo->first; ebo; ebo=ebo->next){ + for (ebo= arm->edbo->first; ebo; ebo=ebo->next) { if(EBONE_VISIBLE(arm, ebo)) { if (ebo->flag & BONE_TIPSEL) { calc_tw_center(scene, ebo->tail); diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 4ee4aa218da..a7188248d58 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -143,10 +143,10 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1) *dest++ = col; } if (do_float) { - destf[0]= destf[4] =p1f[0]; - destf[1]= destf[5] =p1f[1]; - destf[2]= destf[6] =p1f[2]; - destf[3]= destf[7] =p1f[3]; + destf[0]= destf[4] = p1f[0]; + destf[1]= destf[5] = p1f[1]; + destf[2]= destf[6] = p1f[2]; + destf[3]= destf[7] = p1f[3]; destf+= 8; p1f+= 4; } -- cgit v1.2.3