style cleanup:
authorCampbell Barton <ideasman42@gmail.com>
Sun, 9 Sep 2012 00:00:21 +0000 (00:00 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 9 Sep 2012 00:00:21 +0000 (00:00 +0000)
also remove some redundant conversions int -> short -> int

32 files changed:
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/constraint.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editface.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c

index 6a8ddd8e00aebcdfc3213bc2f5cab94860a927cb..3e5dff74f3b72283b28c5d5c2055e2f41d5cd818 100644 (file)
@@ -810,7 +810,7 @@ void framechange_poses_clear_unkeyed(void)
        /* TODO: proxies may/may not be correctly handled here... (this needs checking) */
        for (ob = G.main->object.first; ob; ob = ob->id.next) {
                /* we only need to do this on objects with a pose */
-               if ( (pose = ob->pose) ) {
+               if ((pose = ob->pose)) {
                        for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
                                if (pchan->bone) 
                                        pchan->bone->flag &= ~BONE_UNKEYED;
index d5c2baea6fbb931edf5dbb9c2d61e3a485d953ff..04b135df798501262ab19979697482745d81d07d 100644 (file)
@@ -513,8 +513,13 @@ void BKE_write_undo(bContext *C, const char *name)
        int nr /*, success */ /* UNUSED */;
        UndoElem *uel;
        
-       if ( (U.uiflag & USER_GLOBALUNDO) == 0) return;
-       if (U.undosteps == 0) return;
+       if ((U.uiflag & USER_GLOBALUNDO) == 0) {
+               return;
+       }
+
+       if (U.undosteps == 0) {
+               return;
+       }
        
        /* remove all undos after (also when curundo == NULL) */
        while (undobase.last != curundo) {
index 391891d3985eae4e557db3156ba44ef7086ea6c5..8d7f4e4117ac51ff1e95c4b603611ebadf3613ce 100644 (file)
@@ -4292,8 +4292,8 @@ bConstraintTypeInfo *get_constraint_typeinfo(int type)
        }
        
        /* only return for valid types */
-       if ( (type >= CONSTRAINT_TYPE_NULL) && 
-            (type < NUM_CONSTRAINT_TYPES) )
+       if ((type >= CONSTRAINT_TYPE_NULL) &&
+           (type < NUM_CONSTRAINT_TYPES))
        {
                /* there shouldn't be any segfaults here... */
                return constraintsTypeInfo[type];
index 7906d632f86c4fb2e78d5f9888f3392f7c0f46b9..5a94d54f329ec247db1a505a39a934e8e5ecb294 100644 (file)
@@ -177,8 +177,8 @@ static void gp_draw_stroke_point(bGPDspoint *points, short thickness, short dfla
                /* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, simple dot looks ok
                 *  - also mandatory in if Image Editor 'image-based' dot
                 */
-               if ( (thickness < GP_DRAWTHICKNESS_SPECIAL) ||
-                    ((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE)) )
+               if ((thickness < GP_DRAWTHICKNESS_SPECIAL) ||
+                   ((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE)))
                {
                        glBegin(GL_POINTS);
                        glVertex2fv(co);
@@ -253,8 +253,8 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s,
        /* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, 'smooth' opengl lines look better
         *  - 'smooth' opengl lines are also required if Image Editor 'image-based' stroke
         */
-       if ( (thickness < GP_DRAWTHICKNESS_SPECIAL) || 
-            ((dflag & GP_DRAWDATA_IEDITHACK) && (dflag & GP_DRAWDATA_ONLYV2D)) )
+       if ((thickness < GP_DRAWTHICKNESS_SPECIAL) ||
+           ((dflag & GP_DRAWDATA_IEDITHACK) && (dflag & GP_DRAWDATA_ONLYV2D)))
        {
                bGPDspoint *pt;
                int i;
index e4bfbea75b0505c265795bb75d9c05b7b5483dfc..dfd2783fad6f311f6026fe45c5bd80c65639049a 100644 (file)
@@ -778,7 +778,8 @@ static short gp_stroke_eraser_splitdel(bGPDframe *gpf, bGPDstroke *gps, int i)
 }
 
 /* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
-static short gp_stroke_eraser_strokeinside(int mval[], int UNUSED(mvalo[]), short rad, short x0, short y0, short x1, short y1)
+static short gp_stroke_eraser_strokeinside(const int mval[], const int UNUSED(mvalo[]),
+                                           int rad, int x0, int y0, int x1, int y1)
 {
        /* simple within-radius check for now */
        if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1))
@@ -790,7 +791,9 @@ static short gp_stroke_eraser_strokeinside(int mval[], int UNUSED(mvalo[]), shor
 
 /* eraser tool - evaluation per stroke */
 // TODO: this could really do with some optimization (KD-Tree/BVH?)
-static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
+static void gp_stroke_eraser_dostroke(tGPsdata *p,
+                                      const int mval[], const int mvalo[],
+                                      short rad, const rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
 {
        bGPDspoint *pt1, *pt2;
        int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
@@ -827,7 +830,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
                /* do boundbox check first */
                if (BLI_rcti_isect_pt(rect, x0, y0)) {
                        /* only check if point is inside */
-                       if ( ((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
+                       if (((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
                                /* free stroke */
                                MEM_freeN(gps->points);
                                BLI_freelinkN(&gpf->strokes, gps);
index f97b9864539f2dc0d884157ac634d44c88effdec..4aece1ad8c846fffa0f56bb58fc5f116bca5d0ba 100644 (file)
@@ -1242,8 +1242,7 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but)
                else {
                        b = 0;
                        for (a = 0; a < (*(link->totlink)); a++) {
-                               
-                               if ( (*(link->ppoin))[a] != line->to->poin) {
+                               if ((*(link->ppoin))[a] != line->to->poin) {
                                        (*(link->ppoin))[b] = (*(link->ppoin))[a];
                                        b++;
                                }
@@ -2468,7 +2467,7 @@ static void ui_block_do_align_but(uiBut *first, short nr)
                                        flag |= UI_BUT_ALIGN_TOP;
                                }
                                
-                               if ( (flag & UI_BUT_ALIGN_TOP) == 0) {    /* stil top row */
+                               if ((flag & UI_BUT_ALIGN_TOP) == 0) {  /* stil top row */
                                        if (prev) {
                                                if (next && buts_are_horiz(but, next))
                                                        flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT;
index dcd652a65908a56e9e95484f6601d5ff7a6ec88e..b0f04792f90f159adc28bd1af4448966062798b8 100644 (file)
@@ -755,7 +755,7 @@ static void ui_delete_active_linkline(uiBlock *block)
                                                        b = 0;
                                                        for (a = 0; a < (*(link->totlink)); a++) {
                                                                
-                                                               if ( (*(link->ppoin))[a] != line->to->poin) {
+                                                               if ((*(link->ppoin))[a] != line->to->poin) {
                                                                        (*(link->ppoin))[b] = (*(link->ppoin))[a];
                                                                        b++;
                                                                }
@@ -866,7 +866,7 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to)
        void **oldppoin;
        int a;
        
-       if ( (line = ui_is_a_link(from, to)) ) {
+       if ((line = ui_is_a_link(from, to))) {
                line->flag |= UI_SELECT;
                ui_delete_active_linkline(from->block);
                return;
index 1871f3c8336a3702905704ff4fdf1deb48829088..e825ff7880dc431b0e70b53793e21d04d5241c18 100644 (file)
@@ -620,7 +620,7 @@ static void init_iconfile_list(struct ListBase *list)
        if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */
 
        for (i = 0; i < totfile; i++) {
-               if ( (dir[i].type & S_IFREG) ) {
+               if ((dir[i].type & S_IFREG)) {
                        char *filename = dir[i].relname;
                        
                        if (BLI_testextensie(filename, ".png")) {
index c3059b8d575852a901321a9df065faea3d0258a7..0f1d1a24dcbc8fed275eac079912bdcfd688a5ff 100644 (file)
@@ -544,7 +544,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                curheight = BLI_RCT_SIZE_Y(cur);
                
                /* width */
-               if ( (curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM)) ) {
+               if ((curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM))) {
                        /* if zoom doesn't have to be maintained, just clamp edges */
                        if (cur->xmin < tot->xmin) cur->xmin = tot->xmin;
                        if (cur->xmax > tot->xmax) cur->xmax = tot->xmax;
@@ -627,7 +627,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                }
                
                /* height */
-               if ( (curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM)) ) {
+               if ((curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM))) {
                        /* if zoom doesn't have to be maintained, just clamp edges */
                        if (cur->ymin < tot->ymin) cur->ymin = tot->ymin;
                        if (cur->ymax > tot->ymax) cur->ymax = tot->ymax;
@@ -1874,7 +1874,7 @@ void UI_view2d_listview_view_to_cell(View2D *v2d, short columnwidth, short rowhe
        const int y = (int)(floorf(fabsf(viewy) + 0.5f) - starty);
        
        /* sizes must not be negative */
-       if ( (v2d == NULL) || ((columnwidth <= 0) && (rowheight <= 0)) ) {
+       if ((v2d == NULL) || ((columnwidth <= 0) && (rowheight <= 0))) {
                if (column) *column = 0;
                if (row) *row = 0;
                
index 5b19bb2d3c90db87aa36a4a48577de87c2f404ed..99313edc289bb6bb58bb2a8a17e48e202bc8bc46 100644 (file)
@@ -1719,8 +1719,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
                 * NOTE: see view2d.c for latest conditions, and keep this in sync with that
                 */
                if (ELEM(vsm->zone, SCROLLHANDLE_MIN, SCROLLHANDLE_MAX)) {
-                       if ( ((vsm->scroller == 'h') && (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) == 0) ||
-                            ((vsm->scroller == 'v') && (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) == 0) )
+                       if (((vsm->scroller == 'h') && (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) == 0) ||
+                           ((vsm->scroller == 'v') && (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) == 0))
                        {
                                /* switch to bar (i.e. no scaling gets handled) */
                                vsm->zone = SCROLLHANDLE_BAR;
@@ -1729,8 +1729,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
                
                /* check if zone is inappropriate (i.e. 'bar' but panning is banned), so cannot continue */
                if (vsm->zone == SCROLLHANDLE_BAR) {
-                       if ( ((vsm->scroller == 'h') && (v2d->keepofs & V2D_LOCKOFS_X)) ||
-                            ((vsm->scroller == 'v') && (v2d->keepofs & V2D_LOCKOFS_Y)) )
+                       if (((vsm->scroller == 'h') && (v2d->keepofs & V2D_LOCKOFS_X)) ||
+                           ((vsm->scroller == 'v') && (v2d->keepofs & V2D_LOCKOFS_Y)))
                        {
                                /* free customdata initialized */
                                scroller_activate_exit(C, op);
@@ -1741,8 +1741,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
                }
                
                /* zone is also inappropriate if scroller is not visible... */
-               if ( ((vsm->scroller == 'h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_HORIZONTAL_FULLR))) ||
-                    ((vsm->scroller == 'v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE | V2D_SCROLL_VERTICAL_FULLR))) )
+               if (((vsm->scroller == 'h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_HORIZONTAL_FULLR))) ||
+                   ((vsm->scroller == 'v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE | V2D_SCROLL_VERTICAL_FULLR))) )
                {
                        /* free customdata initialized */
                        scroller_activate_exit(C, op);
index 4e30cff5fde453897b03015d040278f0d16975f1..94e10b53b29918d89c420c017bce318073fe3a6a 100644 (file)
@@ -137,10 +137,10 @@ void paintface_hide(Object *ob, const int unselected)
        while (a--) {
                if ((mpoly->flag & ME_HIDE) == 0) {
                        if (unselected) {
-                               if ( (mpoly->flag & ME_FACE_SEL) == 0) mpoly->flag |= ME_HIDE;
+                               if ((mpoly->flag & ME_FACE_SEL) == 0) mpoly->flag |= ME_HIDE;
                        }
                        else {
-                               if ( (mpoly->flag & ME_FACE_SEL)) mpoly->flag |= ME_HIDE;
+                               if ((mpoly->flag & ME_FACE_SEL)) mpoly->flag |= ME_HIDE;
                        }
                }
                if (mpoly->flag & ME_HIDE) mpoly->flag &= ~ME_FACE_SEL;
index 08ba6a1e682c5ad2c6323cae42ed9399417d5e88..1ef7c12b4095fa999274ff783ea8a5004d988be6 100644 (file)
@@ -1392,9 +1392,9 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
                        /* just use the first object we encounter (that isn't the active object) 
                         * and which fulfills the criteria for the object-target that we've got 
                         */
-                       if ( (ob != obact) &&
-                            ((!only_curve) || (ob->type == OB_CURVE)) &&
-                            ((!only_mesh) || (ob->type == OB_MESH)) )
+                       if ((ob != obact) &&
+                           ((!only_curve) || (ob->type == OB_CURVE)) &&
+                           ((!only_mesh) || (ob->type == OB_MESH)))
                        {
                                /* set target */
                                *tar_ob = ob;
@@ -1478,15 +1478,15 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
        if (type == CONSTRAINT_TYPE_NULL) {
                return OPERATOR_CANCELLED;
        }
-       if ( (type == CONSTRAINT_TYPE_RIGIDBODYJOINT) && (list != &ob->constraints) ) {
+       if ((type == CONSTRAINT_TYPE_RIGIDBODYJOINT) && (list != &ob->constraints)) {
                BKE_report(op->reports, RPT_ERROR, "Rigid Body Joint Constraint can only be added to Objects");
                return OPERATOR_CANCELLED;
        }
-       if ( (type == CONSTRAINT_TYPE_KINEMATIC) && ((!pchan) || (list != &pchan->constraints)) ) {
+       if ((type == CONSTRAINT_TYPE_KINEMATIC) && ((!pchan) || (list != &pchan->constraints))) {
                BKE_report(op->reports, RPT_ERROR, "IK Constraint can only be added to Bones");
                return OPERATOR_CANCELLED;
        }
-       if ( (type == CONSTRAINT_TYPE_SPLINEIK) && ((!pchan) || (list != &pchan->constraints)) ) {
+       if ((type == CONSTRAINT_TYPE_SPLINEIK) && ((!pchan) || (list != &pchan->constraints))) {
                BKE_report(op->reports, RPT_ERROR, "Spline IK Constraint can only be added to Bones");
                return OPERATOR_CANCELLED;
        }
index d8c964ff2dfb369fe1f18f2a88367360cef07dfa..cafc7ce930046459bda5a9feb8069c28f56bce81 100644 (file)
@@ -1518,7 +1518,7 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
                 */
                ob->id.newid = NULL;
                
-               if ( (base->flag & flag) == flag) {
+               if ((base->flag & flag) == flag) {
                        if (ob->id.lib == NULL && ob->id.us > 1) {
                                /* base gets copy of object */
                                obn = BKE_object_copy(ob);
index c8ba9240db37c9a044108ce8be25b69bce7b517e..b31d2b8b0769405d733e1c186d9ad2e25942c921 100644 (file)
@@ -1542,8 +1542,8 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
        int *flip_map, flip_map_len;
        const int def_nr = ob->actdef - 1;
 
-       if ( (mirror_weights == 0 && flip_vgroups == 0) ||
-            (BLI_findlink(&ob->defbase, def_nr) == NULL) )
+       if ((mirror_weights == 0 && flip_vgroups == 0) ||
+           (BLI_findlink(&ob->defbase, def_nr) == NULL))
        {
                return;
        }
index adffb97c16f19de833756b5f5febcdff6e9aac7e..3642cc0d8d4fae4f9a740858ba31b9155bac0acf 100644 (file)
@@ -1471,7 +1471,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
        
        /* are there cameras in the views that are not in the scene? */
        for (sc = CTX_data_main(C)->screen.first; sc; sc = sc->id.next) {
-               if ( (U.flag & USER_SCENEGLOBAL) || sc == screen) {
+               if ((U.flag & USER_SCENEGLOBAL) || sc == screen) {
                        ScrArea *sa = sc->areabase.first;
                        while (sa) {
                                SpaceLink *sl = sa->spacedata.first;
index c52bae215ec83c32f70f709842c382dc1f003ec9..ba440e982905a7651d30b37954662e3880f9aded 100644 (file)
@@ -1639,9 +1639,9 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
        dv_test.totweight = dv->totweight;
        /* do not multi-paint if a locked group is selected or the active group is locked
         * !lock_flags[dw->def_nr] helps if nothing is selected, but active group is locked */
-       if ( (wpi->lock_flags == NULL) ||
-            ((wpi->lock_flags[dw->def_nr] == FALSE) && /* def_nr range has to be checked for by caller */
-             has_locked_group_selected(wpi->defbase_tot, wpi->defbase_sel, wpi->lock_flags) == FALSE))
+       if ((wpi->lock_flags == NULL) ||
+           ((wpi->lock_flags[dw->def_nr] == FALSE) && /* def_nr range has to be checked for by caller */
+            has_locked_group_selected(wpi->defbase_tot, wpi->defbase_sel, wpi->lock_flags) == FALSE))
        {
                if (wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
                        if (change && change != 1) {
@@ -1787,8 +1787,8 @@ static void do_weight_paint_vertex(
 
        /* If there are no locks or multipaint,
         * then there is no need to run the more complicated checks */
-       if ( (do_multipaint_totsel == FALSE) &&
-            (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE))
+       if ((do_multipaint_totsel == FALSE) &&
+           (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE))
        {
                dw->weight = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight,
                                          wpi->brush_alpha_value, wpi->do_flip, FALSE);
index c9f765ac3db1ba46a64eb5a6177f0de43a9be82f..9ab79d73e76053839421ae9f90aa2ecf5cebbf25 100644 (file)
@@ -255,8 +255,8 @@ static void borderselect_action(bAnimContext *ac, rcti rect, short mode, short s
                }
                
                /* perform vertical suitability check (if applicable) */
-               if ( (mode == ACTKEYS_BORDERSEL_FRAMERANGE) || 
-                    !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
+               if ((mode == ACTKEYS_BORDERSEL_FRAMERANGE) ||
+                   !((ymax < rectf.ymin) || (ymin > rectf.ymax)))
                {
                        /* loop over data selecting */
                        if (ale->type == ANIMTYPE_GPLAYER)
@@ -802,8 +802,8 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se
                        TimeMarker *marker;
                        
                        for (marker = markers->first; marker; marker = marker->next) {
-                               if ( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
-                                    ((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)) )
+                               if (((leftright == ACTKEYS_LRSEL_LEFT)  && (marker->frame <  CFRA)) ||
+                                   ((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)))
                                {
                                        marker->flag |= SELECT;
                                }
index ad97b7853c4f8668833e10bb6e2891b8d7183566..e4bda15bc7d99d2f4569ebedc6cd2d535b04e26c 100644 (file)
@@ -235,7 +235,7 @@ static void draw_fcurve_vertices_handles(FCurve *fcu, SpaceIpo *sipo, View2D *v2
                 * if a Graph Editor option to only show handles of selected keys is on.
                 */
                if (!sel_handle_only || BEZSELECTED(bezt) ) {
-                       if ( (!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)) ) {
+                       if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
                                if ((bezt->f1 & SELECT) == sel) /* && v2d->cur.xmin < bezt->vec[0][0] < v2d->cur.xmax)*/
                                        draw_fcurve_handle_control(bezt->vec[0][0], bezt->vec[0][1], xscale, yscale, hsize);
                        }
@@ -378,8 +378,8 @@ static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
                        }
                        else {
                                /* only draw first handle if previous segment was had handles, and selection is ok */
-                               if ( ((bezt->f1 & SELECT) == sel) &&
-                                    ( (!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)) ) )
+                               if (((bezt->f1 & SELECT) == sel) &&
+                                   ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))))
                                {
                                        fp = bezt->vec[0];
                                        UI_GetThemeColor3ubv(basecol + bezt->h1, col);
@@ -390,8 +390,8 @@ static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
                                }
                                
                                /* only draw second handle if this segment is bezier, and selection is ok */
-                               if ( ((bezt->f3 & SELECT) == sel) &&
-                                    (bezt->ipo == BEZT_IPO_BEZ) )
+                               if (((bezt->f3 & SELECT) == sel) &&
+                                   (bezt->ipo == BEZT_IPO_BEZ))
                                {
                                        fp = bezt->vec[1];
                                        UI_GetThemeColor3ubv(basecol + bezt->h2, col);
@@ -846,11 +846,11 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
                /* 1) draw curve line */
                {
                        /* set color/drawing style for curve itself */
-                       if ( ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || (fcu->flag & FCURVE_PROTECTED) ) {
+                       if (((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || (fcu->flag & FCURVE_PROTECTED)) {
                                /* protected curves (non editable) are drawn with dotted lines */
                                setlinestyle(2);
                        }
-                       if ( ((fcu->grp) && (fcu->grp->flag & AGRP_MUTED)) || (fcu->flag & FCURVE_MUTED) ) {
+                       if (((fcu->grp) && (fcu->grp->flag & AGRP_MUTED)) || (fcu->flag & FCURVE_MUTED)) {
                                /* muted curves are drawn in a grayish hue */
                                // XXX should we have some variations?
                                UI_ThemeColorShade(TH_HEADER, 50);
@@ -878,7 +878,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
                                 */
                                draw_fcurve_curve(ac, ale->id, fcu, &ar->v2d, grid);
                        }
-                       else if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { 
+                       else if (((fcu->bezt) || (fcu->fpt)) && (fcu->totvert)) {
                                /* just draw curve based on defined data (i.e. no modifiers) */
                                if (fcu->bezt)
                                        draw_fcurve_curve_bezts(ac, ale->id, fcu, &ar->v2d);
@@ -908,7 +908,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
                                        }
                                }
                        }
-                       else if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { 
+                       else if (((fcu->bezt) || (fcu->fpt)) && (fcu->totvert)) {
                                /* apply unit mapping */
                                ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, fcu, 0);
                                
index 32abad86828fc79e734f2f945b12c62a5ff7dc8a..633f2b72cf627dda8981153525ed03d0bb656354 100644 (file)
@@ -942,7 +942,7 @@ static void nearest_fcurve_vert_store(ListBase *matches, View2D *v2d, FCurve *fc
                        /* if there is already a point for the F-Curve, check if this point is closer than that was */
                        if ((nvi) && (nvi->fcu == fcu)) {
                                /* replace if we are closer, or if equal and that one wasn't selected but we are... */
-                               if ( (nvi->dist > dist) || ((nvi->sel == 0) && BEZSELECTED(bezt)) )
+                               if ((nvi->dist > dist) || ((nvi->sel == 0) && BEZSELECTED(bezt)))
                                        replace = 1;
                        }
                        /* add new if not replacing... */
index 3eeae1f16de1c45d2ee3d2f7ce1999acec385a66..8d9d1be61e5bc0d70634ed69b3b1023471361198 100644 (file)
@@ -1160,7 +1160,7 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
 
                /* check for empty path */
                if (guess_path && simopts->filepath[0] == 0) {
-                       if ( (G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0') ) {
+                       if ((G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0')) {
                                BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX);
                        }
                        else {
index 12823de60d2c6dbc0927cf8e94028e328ed577cc..a042145309db8f4504c8137f363539dc200e38ef 100644 (file)
@@ -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++) {
@@ -921,7 +921,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
        }
 
        while (ob) {
-               if ( (ob->scavisflag) && (ob != obact)) {
+               if ((ob->scavisflag) && (ob != obact)) {
                        idar[nr]= (ID *)ob;
                        nr++;
                }
@@ -4539,7 +4539,9 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
                ob= (Object *)idar[a];
 
                /* only draw the controller common header if "use_visible" */
-               if ( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
+               if ( (ob->scavisflag & OB_VIS_CONT) == 0) {
+                       continue;
+               }
        
                /* Drawing the Controller Header common to all Selected Objects */
 
@@ -4707,7 +4709,9 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
                ob= (Object *)idar[a];
 
                /* only draw the actuator common header if "use_visible" */
-               if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
+               if ((ob->scavisflag & OB_VIS_ACT) == 0) {
+                       continue;
+               }
 
                row = uiLayoutRow(layout, TRUE);
                uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2, (short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
@@ -4834,7 +4838,9 @@ void logic_buttons(bContext *C, ARegion *ar)
                ob= (Object *)idar[a];
 //             uiClearButLock();
 //             uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
-               if ( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
+               if ((ob->scavisflag & OB_VIS_CONT) == 0) {
+                       continue;
+               }
 
                /* presume it is only objects for now */
                uiBlockBeginAlign(block);
@@ -4972,7 +4978,9 @@ void logic_buttons(bContext *C, ARegion *ar)
 //             uiClearButLock();
 //             uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
                
-               if ( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
+               if ((ob->scavisflag & OB_VIS_SENS) == 0) {
+                       continue;
+               }
                
                /* presume it is only objects for now */
                uiBlockBeginAlign(block);
@@ -5052,7 +5060,9 @@ void logic_buttons(bContext *C, ARegion *ar)
                ob= (Object *)idar[a];
 //             uiClearButLock();
 //             uiSetButLock(BKE_object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
-               if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
+               if ((ob->scavisflag & OB_VIS_ACT) == 0) {
+                       continue;
+               }
 
                /* presume it is only objects for now */
                uiBlockBeginAlign(block);
index e76102108815ad17a983362914b29862e0f7e520..222c2414fcbac5c649aeae58f17b44416db7978a 100644 (file)
@@ -245,8 +245,8 @@ static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, sho
                ymin = ymax - NLACHANNEL_STEP(snla);
                
                /* perform vertical suitability check (if applicable) */
-               if ( (mode == NLA_BORDERSEL_FRAMERANGE) ||
-                    !((ymax < rectf.ymin) || (ymin > rectf.ymax)) )
+               if ((mode == NLA_BORDERSEL_FRAMERANGE) ||
+                   !((ymax < rectf.ymin) || (ymin > rectf.ymax)))
                {
                        /* loop over data selecting (only if NLA-Track) */
                        if (ale->type == ANIMTYPE_NLATRACK) {
@@ -255,8 +255,8 @@ static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, sho
                                
                                /* only select strips if they fall within the required ranges (if applicable) */
                                for (strip = nlt->strips.first; strip; strip = strip->next) {
-                                       if ( (mode == NLA_BORDERSEL_CHANNELS) ||
-                                            BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax))
+                                       if ((mode == NLA_BORDERSEL_CHANNELS) ||
+                                           BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax))
                                        {
                                                /* set selection */
                                                ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT);
index 90ad1452356ae455da496a38739d15681dc5dfef..9e04bd36a1f6d28cca36285c808f62d50989dcc2 100644 (file)
@@ -1459,7 +1459,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
                        if (toggle_flag == NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS) == 0)
                                continue;
                        
-                       if ( (tot_eq && tot_neq) || tot_eq == 0)
+                       if ((tot_eq && tot_neq) || tot_eq == 0)
                                node->flag |= toggle_flag;
                        else
                                node->flag &= ~toggle_flag;
index 42fdd5173d417394de897952dc7934ca6c2dcb6a..21e06f00d8eb2784f44634febe8636fadb9c4235 100644 (file)
@@ -1273,8 +1273,8 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
                 *      we don't expand items when searching in the datablocks but we 
                 *      still want to highlight any filter matches. 
                 */
-               if ( (SEARCHING_OUTLINER(soops) || (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0)) &&
-                    (tselem->flag & TSE_SEARCHMATCH))
+               if ((SEARCHING_OUTLINER(soops) || (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0)) &&
+                   (tselem->flag & TSE_SEARCHMATCH))
                {
                        char col[4];
                        UI_GetThemeColorType4ubv(TH_MATCH, SPACE_OUTLINER, col);
index 63907f530eb0dce85a4263cfa7d2ef711a19df93..3e1ce1fea6e62dfc474f5517c9b64f214947f94e 100644 (file)
@@ -1216,8 +1216,8 @@ static int treesort_obtype_alpha(const void *v1, const void *v2)
        else {
                /* 2nd we check ob type */
                if (x1->idcode == ID_OB && x2->idcode == ID_OB) {
-                       if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return 1;
-                       else if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1;
+                       if (((Object *)x1->id)->type > ((Object *)x2->id)->type) return 1;
+                       else if (((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1;
                        else return 0;
                }
                else {
@@ -1243,7 +1243,7 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
        tselem = TREESTORE(te);
        
        /* sorting rules; only object lists or deformgroups */
-       if ( (tselem->type == TSE_DEFGROUP) || (tselem->type == 0 && te->idcode == ID_OB)) {
+       if ((tselem->type == TSE_DEFGROUP) || (tselem->type == 0 && te->idcode == ID_OB)) {
                
                /* count first */
                for (te = lb->first; te; te = te->next) totelem++;
index 5a40c2ce4e7f782b03a71049914301a53e9e643d..06b508cc488c9fef80a03b5c2371bd60ea29d9f0 100644 (file)
@@ -381,8 +381,8 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[
        while (seq) {
                if (seq->machine == (int)y) {
                        /* check for both normal strips, and strips that have been flipped horizontally */
-                       if ( ((seq->startdisp < seq->enddisp) && (seq->startdisp <= x && seq->enddisp >= x)) ||
-                            ((seq->startdisp > seq->enddisp) && (seq->startdisp >= x && seq->enddisp <= x)) )
+                       if (((seq->startdisp < seq->enddisp) && (seq->startdisp <= x && seq->enddisp >= x)) ||
+                           ((seq->startdisp > seq->enddisp) && (seq->startdisp >= x && seq->enddisp <= x)) )
                        {
                                if (BKE_sequence_tx_test(seq)) {
                                        
@@ -2447,7 +2447,7 @@ static Sequence *sequence_find_parent(Scene *scene, Sequence *child)
        if (ed == NULL) return NULL;
 
        for (seq = ed->seqbasep->first; seq; seq = seq->next) {
-               if ( (seq != child) && seq_is_parent(seq, child) ) {
+               if ((seq != child) && seq_is_parent(seq, child)) {
                        parent = seq;
                        break;
                }
@@ -2563,7 +2563,7 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op))
 
        if (se) {
                // prevent setting the render size if sequence values aren't initialized
-               if ( (se->orig_width > 0) && (se->orig_height > 0) ) {
+               if ((se->orig_width > 0) && (se->orig_height > 0)) {
                        scene->r.xsch = se->orig_width;
                        scene->r.ysch = se->orig_height;
                        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
index 4472ff280e9ffc91dfefd85def885092402811e5..ecce12b8cba2e57c3e0a9823ebff7a4f0d727c4e 100644 (file)
@@ -272,7 +272,7 @@ static short set_pchan_glColor(short colCode, int boneflag, short constflag)
                case PCHAN_COLOR_LINEBONE:
                {
                        /* inner part in background color or constraint */
-                       if ( (constflag) && ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) ) {
+                       if ((constflag) && ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS))) {
                                if (constflag & PCHAN_HAS_TARGET) glColor3ub(255, 150, 0);
                                else if (constflag & PCHAN_HAS_IK) glColor3ub(255, 255, 0);
                                else if (constflag & PCHAN_HAS_SPLINEIK) glColor3ub(200, 255, 0);
@@ -1540,7 +1540,7 @@ static void draw_pose_dofs(Object *ob)
        for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                bone = pchan->bone;
                
-               if ( (bone) && !(bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) {
+               if ((bone != NULL) && !(bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) {
                        if (bone->flag & BONE_SELECTED) {
                                if (bone->layer & arm->layer) {
                                        if (pchan->ikflag & (BONE_IK_XLIMIT | BONE_IK_ZLIMIT)) {
@@ -1701,8 +1701,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                                        /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] 
                                         * NOTE: this is the only case with (NO_DEFORM == 0) flag, as this is for envelope influence drawing
                                         */
-                                       if ( (bone->flag & (BONE_HIDDEN_P | BONE_NO_DEFORM | BONE_HIDDEN_PG)) == 0 &&
-                                            ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
+                                       if (((bone->flag & (BONE_HIDDEN_P | BONE_NO_DEFORM | BONE_HIDDEN_PG)) == 0) &&
+                                           ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0))
                                        {
                                                if (bone->flag & (BONE_SELECTED)) {
                                                        if (bone->layer & arm->layer)
@@ -1732,8 +1732,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                        arm->layer_used |= bone->layer;
                        
                        /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */
-                       if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 &&
-                            ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
+                       if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
+                           ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0))
                        {
                                if (bone->layer & arm->layer) {
                                        int use_custom = (pchan->custom) && !(arm->flag & ARM_NO_CUSTOM);
@@ -1748,8 +1748,9 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                                        
                                        /* catch exception for bone with hidden parent */
                                        flag = bone->flag;
-                                       if ( (bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) )
+                                       if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) {
                                                flag &= ~BONE_CONNECTED;
+                                       }
                                        
                                        /* set temporary flag for drawing bone as active, but only if selected */
                                        if (bone == arm->act_bone)
@@ -1819,8 +1820,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                        bone = pchan->bone;
                        
                        /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */
-                       if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 &&
-                            ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
+                       if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
+                           ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
                        {
                                if (bone->layer & arm->layer) {
                                        if (pchan->custom) {
@@ -1895,8 +1896,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                        arm->layer_used |= bone->layer;
                        
                        /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */
-                       if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 &&
-                            ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
+                       if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
+                           ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0))
                        {
                                if (bone->layer & arm->layer) {
                                        const short constflag = pchan->constflag;
@@ -1904,7 +1905,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                                                /* Draw a line from our root to the parent's tip 
                                                 * - only if V3D_HIDE_HELPLINES is enabled...
                                                 */
-                                               if ( (do_dashed & 2) && ((bone->flag & BONE_CONNECTED) == 0) ) {
+                                               if ((do_dashed & 2) && ((bone->flag & BONE_CONNECTED) == 0)) {
                                                        if (arm->flag & ARM_POSEMODE) {
                                                                glLoadName(index & 0xFFFF);  /* object tag, for bordersel optim */
                                                                UI_ThemeColor(TH_WIRE);
@@ -2047,7 +2048,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                                                }       
                                                
                                                /*      Draw additional axes on the bone tail  */
-                                               if ( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ) {
+                                               if ((arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE)) {
                                                        glPushMatrix();
                                                        copy_m4_m4(bmat, pchan->pose_mat);
                                                        bone_matrix_translate_y(bmat, pchan->bone->length);
@@ -2134,8 +2135,9 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
                                        
                                        /* catch exception for bone with hidden parent */
                                        flag = eBone->flag;
-                                       if ( (eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent))
+                                       if ((eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent)) {
                                                flag &= ~BONE_CONNECTED;
+                                       }
                                                
                                        /* set temporary flag for drawing bone as active, but only if selected */
                                        if (eBone == arm->act_edbone)
@@ -2176,8 +2178,9 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
                                
                                /* catch exception for bone with hidden parent */
                                flag = eBone->flag;
-                               if ( (eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent))
+                               if ((eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent)) {
                                        flag &= ~BONE_CONNECTED;
+                               }
                                        
                                /* set temporary flag for drawing bone as active, but only if selected */
                                if (eBone == arm->act_edbone)
index 9ebd23511429afa623749a75387ec7466d64ba9d..90da3824870df8f3fd0f9805b3590a321a83bb96 100644 (file)
@@ -2888,7 +2888,7 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d,
                if (ts->selectmode == SCE_SELECT_FACE) {
                        draw_dm_edges_sel(em, cageDM, wireCol, selCol, actCol, eed_act);
                }
-               else if ( (me->drawflag & ME_DRAWEDGES) || (ts->selectmode & SCE_SELECT_EDGE) ) {
+               else if ((me->drawflag & ME_DRAWEDGES) || (ts->selectmode & SCE_SELECT_EDGE)) {
                        if (cageDM->drawMappedEdgesInterp && (ts->selectmode & SCE_SELECT_VERTEX)) {
                                glShadeModel(GL_SMOOTH);
                                draw_dm_edges_sel_interp(em, cageDM, wireCol, selCol);
@@ -3317,8 +3317,8 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
                        draw_dm_vert_normals(em, scene, ob, cageDM);
                }
 
-               if ( (me->drawflag & (ME_DRAWEXTRA_EDGELEN | ME_DRAWEXTRA_FACEAREA | ME_DRAWEXTRA_FACEANG)) &&
-                    !(v3d->flag2 & V3D_RENDER_OVERRIDE))
+               if ((me->drawflag & (ME_DRAWEXTRA_EDGELEN | ME_DRAWEXTRA_FACEAREA | ME_DRAWEXTRA_FACEANG)) &&
+                   !(v3d->flag2 & V3D_RENDER_OVERRIDE))
                {
                        draw_em_measure_stats(v3d, ob, em, &scene->unit);
                }
@@ -3415,14 +3415,14 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
        else if (dt == OB_WIRE || totface == 0) {
                draw_wire = OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff  */
        }
-       else if ( ((is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
-                 check_object_draw_texture(scene, v3d, dt))
+       else if (((is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
+                check_object_draw_texture(scene, v3d, dt))
        {
-               if ( (v3d->flag & V3D_SELECT_OUTLINE) &&
-                    ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
-                    (base->flag & SELECT) &&
-                    !(G.f & G_PICKSEL || (draw_flags & DRAW_FACE_SELECT)) &&
-                    (draw_wire == OBDRAW_WIRE_OFF))
+               if ((v3d->flag & V3D_SELECT_OUTLINE) &&
+                   ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+                   (base->flag & SELECT) &&
+                   !(G.f & G_PICKSEL || (draw_flags & DRAW_FACE_SELECT)) &&
+                   (draw_wire == OBDRAW_WIRE_OFF))
                {
                        draw_mesh_object_outline(v3d, ob, dm);
                }
@@ -3460,11 +3460,11 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
                                const float spec[4] = {0.47f, 0.47f, 0.47f, 0.47f};
 
                                /* draw outline */
-                               if ( (v3d->flag & V3D_SELECT_OUTLINE) &&
-                                    ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
-                                    (base->flag & SELECT) &&
-                                    (draw_wire == OBDRAW_WIRE_OFF) &&
-                                    (ob->sculpt == NULL))
+                               if ((v3d->flag & V3D_SELECT_OUTLINE) &&
+                                   ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+                                   (base->flag & SELECT) &&
+                                   (draw_wire == OBDRAW_WIRE_OFF) &&
+                                   (ob->sculpt == NULL))
                                {
                                        draw_mesh_object_outline(v3d, ob, dm);
                                }
@@ -3492,11 +3492,11 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
                else {
                        Paint *p;
 
-                       if ( (v3d->flag & V3D_SELECT_OUTLINE) &&
-                            ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
-                            (base->flag & SELECT) &&
-                            (draw_wire == OBDRAW_WIRE_OFF) &&
-                            (ob->sculpt == NULL))
+                       if ((v3d->flag & V3D_SELECT_OUTLINE) &&
+                           ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+                           (base->flag & SELECT) &&
+                           (draw_wire == OBDRAW_WIRE_OFF) &&
+                           (ob->sculpt == NULL))
                        {
                                draw_mesh_object_outline(v3d, ob, dm);
                        }
@@ -4347,7 +4347,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
 
        timestep = psys_get_timestep(&sim);
 
-       if ( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
+       if ((base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP)) {
                float mat[4][4];
                mult_m4_m4m4(mat, ob->obmat, psys->imat);
                glMultMatrixf(mat);
@@ -4893,7 +4893,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
                pdd->ma_col = NULL;
        }
 
-       if ( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
+       if ((base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP)) {
                glLoadMatrixf(rv3d->viewmat);
        }
 }
@@ -5253,7 +5253,7 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
                a = nu->pntsu;
                while (a--) {
                        if (bezt->hide == 0) {
-                               if ( (bezt->f2 & SELECT) == sel) {
+                               if ((bezt->f2 & SELECT) == sel) {
                                        fp = bezt->vec[0];
 
                                        glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT - 1)]);
@@ -5264,14 +5264,14 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
                                        glVertex3fv(fp + 3);
                                        glVertex3fv(fp + 6);
                                }
-                               else if ( (bezt->f1 & SELECT) == sel) {
+                               else if ((bezt->f1 & SELECT) == sel) {
                                        fp = bezt->vec[0];
 
                                        glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT - 1)]);
                                        glVertex3fv(fp);
                                        glVertex3fv(fp + 3);
                                }
-                               else if ( (bezt->f3 & SELECT) == sel) {
+                               else if ((bezt->f3 & SELECT) == sel) {
                                        fp = bezt->vec[1];
 
                                        glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT - 1)]);
@@ -5506,7 +5506,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
                                                for (a = nu->pntsu - 1; a > 0; a--, bp++) {
                                                        if (bp->hide == 0 && bp1->hide == 0) {
                                                                if (sel) {
-                                                                       if ( (bp->f1 & SELECT) && (bp1->f1 & SELECT) ) {
+                                                                       if ((bp->f1 & SELECT) && (bp1->f1 & SELECT)) {
                                                                                UI_ThemeColor(TH_NURB_SEL_ULINE);
 
                                                                                glBegin(GL_LINE_STRIP);
@@ -5541,7 +5541,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
                                                        for (a = nu->pntsv - 1; a > 0; a--, bp += ofs) {
                                                                if (bp->hide == 0 && bp1->hide == 0) {
                                                                        if (sel) {
-                                                                               if ( (bp->f1 & SELECT) && (bp1->f1 & SELECT) ) {
+                                                                               if ((bp->f1 & SELECT) && (bp1->f1 & SELECT)) {
                                                                                        UI_ThemeColor(TH_NURB_SEL_VLINE);
 
                                                                                        glBegin(GL_LINE_STRIP);
@@ -6930,9 +6930,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
        }
 
        /* draw edit particles last so that they can draw over child particles */
-       if ( (warning_recursive == 0) &&
-            (dflag & DRAW_PICKING) == 0 &&
-            (!scene->obedit))
+       if ((warning_recursive == 0) &&
+           (dflag & DRAW_PICKING) == 0 &&
+           (!scene->obedit))
        {
 
                if (ob->mode & OB_MODE_PARTICLE_EDIT && is_obact) {
index 17f1081f5c49dfc339033a5bf5060f56a08beb71..7accdb0c0e49c660e4d099684703353c032d2451 100644 (file)
@@ -2733,12 +2733,12 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
                        return OPERATOR_CANCELLED;
                }
                /* convert border to 3d coordinates */
-               if ( (!gluUnProject(cent[0], cent[1], depth_close,
-                                   mats.modelview, mats.projection, (GLint *)mats.viewport,
-                                   &p[0], &p[1], &p[2])) ||
-                    (!gluUnProject((double)rect.xmin, (double)rect.ymin, depth_close,
-                                   mats.modelview, mats.projection, (GLint *)mats.viewport,
-                                   &p_corner[0], &p_corner[1], &p_corner[2])))
+               if ((!gluUnProject(cent[0], cent[1], depth_close,
+                                  mats.modelview, mats.projection, (GLint *)mats.viewport,
+                                  &p[0], &p[1], &p[2])) ||
+                   (!gluUnProject((double)rect.xmin, (double)rect.ymin, depth_close,
+                                  mats.modelview, mats.projection, (GLint *)mats.viewport,
+                                  &p_corner[0], &p_corner[1], &p_corner[2])))
                {
                        return OPERATOR_CANCELLED;
                }
index 465279ee6edd9f0948f214b5c9188edc8b563ac2..fd43333acfe521ba412a0dc9957467acd2e741f0 100644 (file)
@@ -370,7 +370,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
                case B_SEL_EDGE:
                        if (em) {
                                if (shift == 0 || em->selectmode == 0) {
-                                       if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) {
+                                       if ((em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) {
                                                if (ctrl) EDBM_selectmode_convert(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);
                                        }
                                        em->selectmode = SCE_SELECT_EDGE;
@@ -384,7 +384,9 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
                case B_SEL_FACE:
                        if (em) {
                                if (shift == 0 || em->selectmode == 0) {
-                                       if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) {
+                                       if (((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) ||
+                                           ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE))
+                                       {
                                                if (ctrl) EDBM_selectmode_convert(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE);
                                        }
                                        em->selectmode = SCE_SELECT_FACE;
index fa431e89d8018d1e2b0fe3b1920cbcafbc28a0bd..5712144caf1d7b28334bea31370c22940ae42b98 100644 (file)
@@ -1527,10 +1527,10 @@ int edge_inside_circle(int centx, int centy, int rad, int x1, int y1, int x2, in
        int radsq = rad * rad;
 
        /* check points in circle itself */
-       if ( (x1 - centx) * (x1 - centx) + (y1 - centy) * (y1 - centy) <= radsq) {
+       if ((x1 - centx) * (x1 - centx) + (y1 - centy) * (y1 - centy) <= radsq) {
                return TRUE;
        }
-       else if ( (x2 - centx) * (x2 - centx) + (y2 - centy) * (y2 - centy) <= radsq) {
+       else if ((x2 - centx) * (x2 - centx) + (y2 - centy) * (y2 - centy) <= radsq) {
                return TRUE;
        }
        else {
@@ -2467,7 +2467,7 @@ static void armature_circle_select(ViewContext *vc, int select, const int mval[2
                        
                /* only if the endpoints didn't get selected, deal with the middle of the bone too */
                /* XXX should we just do this always? */
-               if ( (didpoint == 0) && edge_inside_circle(mval[0], mval[1], rad, sco1[0], sco1[1], sco2[0], sco2[1]) ) {
+               if ((didpoint == 0) && edge_inside_circle(mval[0], mval[1], rad, sco1[0], sco1[1], sco2[0], sco2[1])) {
                        if (select) 
                                ebone->flag |= BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED;
                        else 
index 1d40ae280b7c017d9cf361d22e2d91bd45a340df..c25bb80bfde271294ac652a6a5b6243a279eb9f0 100644 (file)
@@ -1653,7 +1653,7 @@ static void game_set_commmandline_options(GameData *gm)
        SYS_SystemHandle syshandle;
        int test;
 
-       if ( (syshandle = SYS_GetSystem()) ) {
+       if ((syshandle = SYS_GetSystem())) {
                /* User defined settings */
                test = (U.gameflags & USER_DISABLE_MIPMAP);
                GPU_set_mipmap(!test);