diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
commit | 2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch) | |
tree | 7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/editors | |
parent | 5d9256404159670bec6d65557697accb5b3111b8 (diff) |
code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/editors')
30 files changed, 82 insertions, 72 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 546ab0e4396..4ccdc610cae 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -276,7 +276,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone else { /* if the bone is not selected, but connected to its parent * copy the parents tip selection state */ - if (eBone->parent && (eBone->flag & BONE_CONNECTED)) { + if (eBone->parent && (eBone->flag & BONE_CONNECTED)) { /* selecting with the mouse gives this behavior */ if (eBone->parent->flag & BONE_TIPSEL) { eBone->flag |= BONE_ROOTSEL; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index b975d156868..ab96656406e 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -1393,7 +1393,8 @@ static void meshdeform_bind_floodfill(MeshDeformBind *mdb) if (b != -1) { if (tag[b] == MESHDEFORM_TAG_UNTYPED || - (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i - 1])) { + (tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i - 1])) + { tag[b] = MESHDEFORM_TAG_EXTERIOR; stack[stacksize++] = b; } diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 3f056f9638c..a629312e732 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1860,7 +1860,7 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method) sortArcs(rg); - for (i = 0; i < passes; i++) { + for (i = 0; i < passes; i++) { postprocessGraph(rg, method); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 7afba049232..aa29100ccbe 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -270,7 +270,7 @@ void printknots(Object *obedit) int a, num; for (nu = editnurb->first; nu; nu = nu->next) { - if (isNurbsel(nu) && nu->type == CU_NURBS) { + if (isNurbsel(nu) && nu->type == CU_NURBS) { if (nu->knotsu) { num = KNOTSU(nu); for (a = 0; a < num; a++) printf("knotu %d: %f\n", a, nu->knotsu[a]); diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 2f9e763a7d0..e535990e7e9 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -79,7 +79,7 @@ int uiGetRoundBox(void) void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float rad) { float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; int a; /* mult */ @@ -147,7 +147,7 @@ static void round_box_shade_col(const float col1[3], float const col2[3], const void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown) { float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; const float div = maxy - miny; const float idiv = 1.0f / div; float coltop[3], coldown[3], color[4]; @@ -256,7 +256,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float float rad, float shadeLeft, float shadeRight) { float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; const float div = maxx - minx; const float idiv = 1.0f / div; float colLeft[3], colRight[3], color[4]; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4f0274fbd46..cfd09196970 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5751,7 +5751,8 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar) Panel *pa = but->block->panel; if (ELEM(event->type, UPARROWKEY, DOWNARROWKEY) || - ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) { + ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) + { /* activate up/down the list */ value = RNA_property_int_get(&but->rnapoin, but->rnaprop); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index fe7a4e85418..42c6bfc3870 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -127,8 +127,11 @@ typedef struct uiWidgetType { /* *********************** draw data ************************** */ -static float cornervec[WIDGET_CURVE_RESOLU][2] = {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, - {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}; +static float cornervec[WIDGET_CURVE_RESOLU][2] = { + {0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, + {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, + {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0} +}; #define WIDGET_AA_JITTER 8 static float jit[WIDGET_AA_JITTER][2] = { diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index b74e8797d72..e3963918e99 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -348,7 +348,8 @@ static int edbm_rip_call_edgesplit(BMEditMesh *em, wmOperator *op) BMOperator bmop; if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b", - BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) { + BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) + { return FALSE; } BMO_op_exec(em->bm, &bmop); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index dc0a1a98b2d..58e07b51a25 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -931,23 +931,16 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op) BMIter iter; int totedgesel = 0; - for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - eed; eed = BM_iter_step(&iter)) { - + BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) { totedgesel++; } } - edarray = MEM_mallocN(sizeof(BMEdge *) * totedgesel, "edge array"); edindex = 0; - for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - eed; - eed = BM_iter_step(&iter)) - { - + BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) { edarray[edindex] = eed; edindex++; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1b3e4adff3a..e5a85fed8f4 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3534,8 +3534,7 @@ static int edbm_select_by_number_vertices_exec(bContext *C, wmOperator *op) int numverts = RNA_int_get(op->ptr, "number"); int type = RNA_enum_get(op->ptr, "type"); - for (efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - efa; efa = BM_iter_step(&iter)) { + BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { int select = 0; @@ -3598,17 +3597,13 @@ static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op)) BMEdge *eed; BMIter iter; - for (eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); - eve; eve = BM_iter_step(&iter)) { - + BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (!eve->e) { BM_vert_select_set(em->bm, eve, TRUE); } } - for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - eed; eed = BM_iter_step(&iter)) { - + BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { if (!eed->l) { BM_edge_select_set(em->bm, eed, TRUE); } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 1437081c9d7..47748fbd53b 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -45,6 +45,7 @@ #include "BLI_math.h" #include "BLI_listbase.h" #include "BLI_string.h" +#include "BLI_string_utf8.h" #include "BLI_path_util.h" #include "BLI_utildefines.h" @@ -125,8 +126,9 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc else BLI_addtail(&ob->modifiers, new_md); - if (name) + if (name) { BLI_strncpy_utf8(new_md->name, name, sizeof(new_md->name)); + } /* make sure modifier data has unique name */ @@ -223,7 +225,8 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr } if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) && - ob->particlesystem.first == NULL) { + ob->particlesystem.first == NULL) + { ob->mode &= ~OB_MODE_PARTICLE_EDIT; } diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 3a932b58fd9..fa86f089387 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -506,7 +506,7 @@ static short select_grouped_siblings(bContext *C, Object *ob) CTX_DATA_BEGIN (C, Base *, base, selectable_bases) { - if ((base->object->parent == ob->parent) && !(base->flag & SELECT)) { + if ((base->object->parent == ob->parent) && !(base->flag & SELECT)) { ED_base_object_select(base, BA_SELECT); changed = 1; } diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index ebc255f4e43..b5d44676cf6 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -342,7 +342,8 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc, window[1] = y + vc->ar->winrct.ymin; if (vc->obact->sculpt && vc->obact->sculpt->pbvh && - sculpt_stroke_get_location(C, location, window)) { + sculpt_stroke_get_location(C, location, window)) + { *pixel_radius = project_brush_radius(vc, BKE_brush_unprojected_radius_get(scene, brush), diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d5c7b66f695..e6ef3001eeb 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -2131,7 +2131,9 @@ static void project_bucket_clip_face( /* remove doubles */ /* first/last check */ - if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE && fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) { + if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE && + fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) + { (*tot)--; } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 368729723eb..23d1c0090a0 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -225,7 +225,8 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c brush = brush->id.next ? brush->id.next : bmain->brush.first) { if ((brush->ob_mode & ob_mode) && - (brush_tool(brush, tool_offset) == tool)) { + (brush_tool(brush, tool_offset) == tool)) + { return brush; } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 6773d50d95d..aea29c2d166 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -350,7 +350,8 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, bb_max, ar, rv3d, - ob)) { + ob)) + { return 0; } @@ -2776,7 +2777,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) } if (!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_MASK) && - brush->autosmooth_factor > 0) { + brush->autosmooth_factor > 0) + { if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) { smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), FALSE); } @@ -3196,7 +3198,8 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss) for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Mirror && - (md->mode & eModifierMode_Realtime)) { + (md->mode & eModifierMode_Realtime)) + { MirrorModifierData *mmd = (MirrorModifierData *)md; if (mmd->flag & MOD_MIR_CLIPPING) { @@ -3355,7 +3358,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) if (ELEM5(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK, - SCULPT_TOOL_THUMB)) { + SCULPT_TOOL_THUMB)) + { float grab_location[3], imat[4][4], delta[3], loc[3]; if (cache->first_time) { diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 117e599cbbb..5131b728646 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -381,7 +381,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; default: - if (event->type == vpd->event_type && event->val == KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { view_pan_exit(C, op, 0); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index b17ca5ee319..b0818d40e53 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -300,8 +300,9 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r colmax = (rect->xmax)/(layout->tile_w + 2*layout->tile_border_x); rowmax = (rect->ymax)/(layout->tile_h + 2*layout->tile_border_y); - if ( is_inside(colmin, rowmin, layout->columns, layout->rows) || - is_inside(colmax, rowmax, layout->columns, layout->rows) ) { + if (is_inside(colmin, rowmin, layout->columns, layout->rows) || + is_inside(colmax, rowmax, layout->columns, layout->rows) ) + { CLAMP(colmin, 0, layout->columns-1); CLAMP(rowmin, 0, layout->rows-1); CLAMP(colmax, 0, layout->columns-1); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index e2ab5ea64e4..31389bcb20c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -313,7 +313,7 @@ static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) image_view_pan_exec(C, op); break; default: - if (event->type == vpd->event_type && event->val == KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { image_view_pan_exit(C, op, 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index bf0d940c049..dd21fca93ce 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -842,7 +842,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf } /* 2nd case: select cont when act selected */ - if ((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) { + if ((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) { cont= ob->controllers.first; while (cont) { for (a=0; a<cont->totlinks; a++) { @@ -878,7 +878,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf } /* 4th case: select actuator when controller selected */ - if ( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) { + if ( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) { cont= ob->controllers.first; while (cont) { for (a=0; a<cont->totlinks; a++) { @@ -5070,8 +5070,8 @@ void logic_buttons(bContext *C, ARegion *ar) if (!(slogic->scaflag & BUTS_ACT_STATE) || !(act->flag & ACT_LINKED) || /* always display actuators without links so that is can be edited */ (act->flag & ACT_VISIBLE) || /* this actuator has visible connection, display it */ - (act->flag & ACT_PIN && slogic->scaflag & BUTS_ACT_STATE)) { - + (act->flag & ACT_PIN && slogic->scaflag & BUTS_ACT_STATE)) + { pin = (slogic->scaflag & BUTS_ACT_STATE && (act->flag & SENS_SHOW || act->flag & SENS_PIN)) ? 1 : 0; act->flag |= ACT_VISIBLE; /* mark the actuator as visible to help implementing the up/down action */ diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 49fadf300e2..392e7793a0f 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -367,7 +367,8 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire /* draw! */ if (seq->type < SEQ_EFFECT || - get_sequence_effect_num_inputs(seq->type) == 0) { + get_sequence_effect_num_inputs(seq->type) == 0) + { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 2d1ba69cdd3..2543b49a48d 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1365,8 +1365,8 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) /* see reassigning would create a cycle */ if (seq_is_predecessor(seq1, last_seq) || seq_is_predecessor(seq2, last_seq) || - seq_is_predecessor(seq3, last_seq) - ) { + seq_is_predecessor(seq3, last_seq)) + { BKE_report(op->reports, RPT_ERROR, "Can't reassign inputs: no cycles allowed"); return OPERATOR_CANCELLED; } @@ -2109,8 +2109,8 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) imgwidth = (int)(imgwidth * (scene->r.xasp / scene->r.yasp)); if (((imgwidth >= width) || (imgheight >= height)) && - ((width > 0) && (height > 0))) { - + ((width > 0) && (height > 0))) + { /* Find the zoom value that will fit the image in the image space */ zoomX = ((float)width) / ((float)imgwidth); zoomY = ((float)height) / ((float)imgheight); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index ffb686b6810..463a262c09c 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1174,7 +1174,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) /* push hl start down */ hlstart = barstart + barheight; } - else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) { + else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) { /*fill out start */ hlstart = barstart; } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 111af7fb914..000f81a4f32 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3246,7 +3246,8 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, } if ((G.debug & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) && - !(v3d->flag2 & V3D_RENDER_OVERRIDE)) { + !(v3d->flag2 & V3D_RENDER_OVERRIDE)) + { draw_em_indices(em); } } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index f63116a1f60..33141bb6abb 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1296,7 +1296,8 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) /* do nothing */ } else if (scene->obedit && v3d->drawtype > OB_WIRE && - (v3d->flag & V3D_ZBUF_SELECT)) { + (v3d->flag & V3D_ZBUF_SELECT)) + { /* do nothing */ } else { @@ -2734,8 +2735,8 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) } #endif - /* is this more then half a frame behind? */ - if (fps + 0.5f < (float)(FPS)) { + /* is this more then half a frame behind? */ + if (fps + 0.5f < (float)(FPS)) { UI_ThemeColor(TH_REDALERT); BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps); } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index b0a4f5bbfde..d1aa29d196d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -3096,7 +3096,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* rotation */ if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself /* euler or quaternion? */ - if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) { + if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) { mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL); mat3_to_quat(quat, fmat); // Actual transform diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 4d20346f79d..2b111190b93 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1393,10 +1393,10 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) if (bezt->hide==0) { TransDataCurveHandleFlags *hdata = NULL; - if ( propmode || - ((bezt->f2 & SELECT) && hide_handles) || - ((bezt->f1 & SELECT) && hide_handles == 0) - ) { + if (propmode || + ((bezt->f2 & SELECT) && hide_handles) || + ((bezt->f1 & SELECT) && hide_handles == 0)) + { copy_v3_v3(td->iloc, bezt->vec[0]); td->loc= bezt->vec[0]; copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]); @@ -1455,10 +1455,10 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) count++; tail++; } - if ( propmode || - ((bezt->f2 & SELECT) && hide_handles) || - ((bezt->f3 & SELECT) && hide_handles == 0) - ) { + if (propmode || + ((bezt->f2 & SELECT) && hide_handles) || + ((bezt->f3 & SELECT) && hide_handles == 0)) + { copy_v3_v3(td->iloc, bezt->vec[2]); td->loc= bezt->vec[2]; copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]); @@ -4438,7 +4438,7 @@ static void set_trans_object_base_flags(TransInfo *t) if (parsel) { /* rotation around local centers are allowed to propagate */ - if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL) { + if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL) { base->flag |= BA_TRANSFORM_CHILD; } else { @@ -4487,7 +4487,7 @@ static int count_proportional_objects(TransInfo *t) Base *base; /* rotations around local centers are allowed to propagate, so we take all objects */ - if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)) { + if (!((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL)) { /* mark all parents */ for (base= scene->base.first; base; base= base->next) { if (TESTBASELIB_BGMODE(v3d, scene, base)) { diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 75d5efca21f..137d0838587 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -323,7 +323,7 @@ void applySnapping(TransInfo *t, float *vec) // Time base quirky code to go around findnearest slowness /* !TODO! add exception for object mode, no need to slow it down then */ - if (current - t->tsnap.last >= 0.01) { + if (current - t->tsnap.last >= 0.01) { t->tsnap.calcSnap(t, vec); t->tsnap.targetSnap(t); @@ -1066,7 +1066,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); - if (new_dist <= *dist && new_depth < *depth) { + if (new_dist <= *dist && new_depth < *depth) { *depth = new_depth; retval = 1; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index a4227d92e27..53331dbe079 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2490,7 +2490,8 @@ static int border_select_exec(bContext *C, wmOperator *op) } else if (pinned) { if ((luv->flag & MLOOPUV_PINNED) && - BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) { + BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) + { if (select) uvedit_uv_select_enable(em, scene, l, FALSE); else uvedit_uv_select_disable(em, scene, l); } diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 872f959b8a2..43f3e81ae92 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -319,7 +319,7 @@ static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition int i; UvElement *element; - for (i = 0; i < state->element_map->totalIslands; i++) { + for (i = 0; i < state->element_map->totalIslands; i++) { if (island_stitch_data[i].addedForPreview) { int numOfIslandUVs = 0, j; @@ -649,7 +649,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final) * Setup preview for stitchable islands * *****************************************/ if (state->snap_islands) { - for (i = 0; i < state->element_map->totalIslands; i++) { + for (i = 0; i < state->element_map->totalIslands; i++) { if (island_stitch_data[i].addedForPreview) { int numOfIslandUVs = 0, j; UvElement *element; |