Code Cleanup: style and redundant casts
authorCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jan 2014 08:15:53 +0000 (19:15 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jan 2014 08:15:53 +0000 (19:15 +1100)
37 files changed:
source/blender/blenkernel/intern/suggestions.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/string.c
source/blender/blenlib/intern/winstuff_dir.c
source/blender/bmesh/operators/bmo_smooth_laplacian.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/compositor/intern/COM_Node.cpp
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/interface/view2d.c
source/blender/editors/object/object_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/nodes/composite/node_composite_tree.c
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_operators.c

index 6f9736df6836d41b167b19657e0d95a4bd7006cf..d46fa591885f2481a582c9094f1c8bf1c89188ec 100644 (file)
@@ -52,7 +52,7 @@ static int txttl_cmp(const char *first, const char *second, int len)
 {
        int cmp, i;
        for (cmp = 0, i = 0; i < len; i++) {
 {
        int cmp, i;
        for (cmp = 0, i = 0; i < len; i++) {
-               if ( (cmp = toupper(first[i]) - toupper(second[i])) ) {
+               if ((cmp = toupper(first[i]) - toupper(second[i]))) {
                        break;
                }
        }
                        break;
                }
        }
index c4cefadb815cedd02fb0d11896c88d5513ee471f..d1eb72563a12d966c0afa6a7971a0895370a20aa 100644 (file)
@@ -699,7 +699,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl
 
                                                ed3 = sc1->edge_first;
                                                while (ed3) {
 
                                                ed3 = sc1->edge_first;
                                                while (ed3) {
-                                                       if ( (ed3->v1 == v1 && ed3->v2 == v3) || (ed3->v1 == v3 && ed3->v2 == v1) ) {
+                                                       if ((ed3->v1 == v1 && ed3->v2 == v3) || (ed3->v1 == v3 && ed3->v2 == v1)) {
                                                                if (twoconnected || ed3->f == SF_EDGE_BOUNDARY) {
                                                                        BLI_remlink((ListBase *)&(sc1->edge_first), ed3);
                                                                        BLI_addtail(&sf_ctx->filledgebase, ed3);
                                                                if (twoconnected || ed3->f == SF_EDGE_BOUNDARY) {
                                                                        BLI_remlink((ListBase *)&(sc1->edge_first), ed3);
                                                                        BLI_addtail(&sf_ctx->filledgebase, ed3);
index 6f03529d37c597a6b73b2a82d3feabe77ed3266f..de40cab425decae6ee58bf520a2f69311f6610b0 100644 (file)
@@ -486,7 +486,7 @@ int BLI_exists(const char *name)
        unsigned int old_error_mode;
 
        len = wcslen(tmp_16);
        unsigned int old_error_mode;
 
        len = wcslen(tmp_16);
-       if (len > 3 && (tmp_16[len - 1] == L'\\' || tmp_16[len - 1] == L'/') )
+       if (len > 3 && (tmp_16[len - 1] == L'\\' || tmp_16[len - 1] == L'/'))
                tmp_16[len - 1] = '\0';
 
        /* change error mode so user does not get a "no disk in drive" popup
                tmp_16[len - 1] = '\0';
 
        /* change error mode so user does not get a "no disk in drive" popup
index 0ce40f717d4e08231bcebc94a5eb0ab116c79492..6b738fab45e281a167ec5873918fd33fe755d76c 100644 (file)
@@ -513,17 +513,17 @@ int BLI_natstrcmp(const char *s1, const char *s2)
                c1 = tolower(s1[d1]);
                c2 = tolower(s2[d2]);
                
                c1 = tolower(s1[d1]);
                c2 = tolower(s2[d2]);
                
-               if (isdigit(c1) && isdigit(c2) ) {
+               if (isdigit(c1) && isdigit(c2)) {
                        int numcompare = left_number_strcmp(s1 + d1, s2 + d2, &tiebreaker);
                        
                        if (numcompare != 0)
                                return numcompare;
 
                        d1++;
                        int numcompare = left_number_strcmp(s1 + d1, s2 + d2, &tiebreaker);
                        
                        if (numcompare != 0)
                                return numcompare;
 
                        d1++;
-                       while (isdigit(s1[d1]) )
+                       while (isdigit(s1[d1]))
                                d1++;
                        d2++;
                                d1++;
                        d2++;
-                       while (isdigit(s2[d2]) )
+                       while (isdigit(s2[d2]))
                                d2++;
                        
                        c1 = tolower(s1[d1]);
                                d2++;
                        
                        c1 = tolower(s1[d1]);
index 4082681ee11bc0ab7043558d910db3633825be88..90250de16835b3b1dcb4b317db23c1122dddfdb2 100644 (file)
  * Windows-posix compatibility layer for opendir/readdir/closedir
  */
 
  * Windows-posix compatibility layer for opendir/readdir/closedir
  */
 
-/** \file blender/blenlib/intern/winstuff.c
+/** \file blender/blenlib/intern/winstuff_dir.c
  *  \ingroup bli
  *  \ingroup bli
+ *
+ * Posix compatibility functions for windows dealing with DIR
+ * (opendir, readdir, closedir)
  */
 
 #if defined(WIN32) && !defined(FREE_WINDOWS)
 
  */
 
 #if defined(WIN32) && !defined(FREE_WINDOWS)
 
+/* standalone for inclusion in binaries other then blender */
 #  ifdef USE_STANDALONE
 #    define MEM_mallocN(size, str) ((void)str, malloc(size))
 #    define MEM_callocN(size, str) ((void)str, calloc(size, 1))
 #  ifdef USE_STANDALONE
 #    define MEM_mallocN(size, str) ((void)str, malloc(size))
 #    define MEM_callocN(size, str) ((void)str, calloc(size, 1))
index 16e70e8c1559cfe7e388c5caa2e4f3ea59376e75..c36c7467b89308b750876cce8ea476e6d35ef4d2 100644 (file)
@@ -362,7 +362,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys)
                }
        }
        BM_ITER_MESH (e, &eiter, sys->bm, BM_EDGES_OF_MESH) {
                }
        }
        BM_ITER_MESH (e, &eiter, sys->bm, BM_EDGES_OF_MESH) {
-               if (!BM_elem_flag_test(e, BM_ELEM_SELECT) && BM_edge_is_boundary(e) ) {
+               if (!BM_elem_flag_test(e, BM_ELEM_SELECT) && BM_edge_is_boundary(e)) {
                        v1 = e->v1->co;
                        v2 =  e->v2->co;
                        idv1 = BM_elem_index_get(e->v1);
                        v1 = e->v1->co;
                        v2 =  e->v2->co;
                        idv1 = BM_elem_index_get(e->v1);
index 836588c1c02c0ccf9671a33278486871b97007f3..d07d833eab97c9dc34b3bb05e0239ff8ddeabfe1 100644 (file)
@@ -2522,7 +2522,7 @@ static bool tri_corner_test(BevelParams *bp, BevVert *bv)
                totang += ang;
        }
        angdiff = fabsf(totang - 3.0f * (float)M_PI_2);
                totang += ang;
        }
        angdiff = fabsf(totang - 3.0f * (float)M_PI_2);
-       if ((bp->pro_super_r == PRO_SQUARE_R && angdiff > (float)M_PI/16.0f) ||
+       if ((bp->pro_super_r == PRO_SQUARE_R && angdiff > (float)M_PI / 16.0f) ||
            (angdiff > (float)M_PI_4))
        {
                return false;
            (angdiff > (float)M_PI_4))
        {
                return false;
index f59580acb50065ae8560fe1e69a419f7ad993d5b..b62e2d08d9ae6b9da5ff7dec0c2be0f1ea9c0071 100644 (file)
@@ -39,7 +39,7 @@
 //#include <stdio.h>
 #include "COM_defines.h"
 
 //#include <stdio.h>
 #include "COM_defines.h"
 
-Node::Node(bNode *editorNode, bool create_sockets): NodeBase()
+Node::Node(bNode *editorNode, bool create_sockets) : NodeBase()
 {
        setbNode(editorNode);
        
 {
        setbNode(editorNode);
        
index 656690626670a11eb862193b4c24a904860bfa54..6010a64bd0600eef36ca42dbdaa224efb7c2c098 100644 (file)
@@ -121,7 +121,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
                                }
                                
                                /* Only operate on this BezTriple if it fullfills the criteria of the validation func */
                                }
                                
                                /* Only operate on this BezTriple if it fullfills the criteria of the validation func */
-                               if ( (ok = key_ok(ked, bezt)) ) {
+                               if ((ok = key_ok(ked, bezt))) {
                                        if (ked) ked->curflags = ok;
                                        
                                        /* Exit with return-code '1' if function returns positive
                                        if (ked) ked->curflags = ok;
                                        
                                        /* Exit with return-code '1' if function returns positive
index 1b77c1530bfe80757c28ea9b9f27dd01e31183e1..2fd30ed5ecc96b6dcbce9a1e6d008f21686289a8 100644 (file)
@@ -1984,7 +1984,7 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter)
        }
        
        /* try shapekey keyframes (if available, and allowed by filter) */
        }
        
        /* try shapekey keyframes (if available, and allowed by filter) */
-       if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOSKEY) ) {
+       if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOSKEY)) {
                Key *key = BKE_key_from_object(ob);
                
                /* shapekeys can have keyframes ('Relative Shape Keys') 
                Key *key = BKE_key_from_object(ob);
                
                /* shapekeys can have keyframes ('Relative Shape Keys') 
@@ -2000,7 +2000,7 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter)
        }
 
        /* try materials */
        }
 
        /* try materials */
-       if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT) ) {
+       if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT)) {
                /* if only active, then we can skip a lot of looping */
                if (filter & ANIMFILTER_KEYS_ACTIVE) {
                        Material *ma = give_current_material(ob, (ob->actcol + 1));
                /* if only active, then we can skip a lot of looping */
                if (filter & ANIMFILTER_KEYS_ACTIVE) {
                        Material *ma = give_current_material(ob, (ob->actcol + 1));
index a4b40f64859acc54d449339c8ca5f4da31541031..c214dc35fbf51686b2d549d96f554cc862fc670a 100644 (file)
@@ -113,8 +113,9 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *
                        
                        for (ct = targets.first; ct; ct = ct->next) {
                                if (ct->tar == ob) {
                        
                        for (ct = targets.first; ct; ct = ct->next) {
                                if (ct->tar == ob) {
-                                       if (!strcmp(ct->subtarget, oldname) )
+                                       if (STREQ(ct->subtarget, oldname)) {
                                                BLI_strncpy(ct->subtarget, newname, MAXBONENAME);
                                                BLI_strncpy(ct->subtarget, newname, MAXBONENAME);
+                                       }
                                }
                        }
                        
                                }
                        }
                        
index 3a9dd3c9748f3bad86943f935bbec7a3b98daa9f..7a825b3805c6a231879b22206d16d4ffad24176a 100644 (file)
@@ -920,7 +920,7 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData
                pchan = BKE_pose_channel_find_name(pose, agrp->name);
                
                if (pchan) {
                pchan = BKE_pose_channel_find_name(pose, agrp->name);
                
                if (pchan) {
-                       if ( (pld->selcount == 0) || ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) ) {
+                       if ((pld->selcount == 0) || ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED))) {
                                if (autokey) {
                                        /* add datasource override for the PoseChannel, to be used later */
                                        ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); 
                                if (autokey) {
                                        /* add datasource override for the PoseChannel, to be used later */
                                        ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); 
index 06f13c35e0b55e45a3b531f47b97a45413025f1d..544d9a0f575e68078644f04bd2f0679de6136a96 100644 (file)
@@ -823,17 +823,17 @@ void UI_view2d_curRect_reset(View2D *v2d)
        /* handle width - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
                /* width is in negative-x half */
        /* handle width - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
                /* width is in negative-x half */
-               v2d->cur.xmin = (float)-width;
+               v2d->cur.xmin = -width;
                v2d->cur.xmax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
                /* width is in positive-x half */
                v2d->cur.xmin = 0.0f;
                v2d->cur.xmax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
                /* width is in positive-x half */
                v2d->cur.xmin = 0.0f;
-               v2d->cur.xmax = (float)width;
+               v2d->cur.xmax = width;
        }
        else {
                /* width is centered around (x == 0) */
        }
        else {
                /* width is centered around (x == 0) */
-               const float dx = (float)width / 2.0f;
+               const float dx = width / 2.0f;
                
                v2d->cur.xmin = -dx;
                v2d->cur.xmax = dx;
                
                v2d->cur.xmin = -dx;
                v2d->cur.xmax = dx;
@@ -842,17 +842,17 @@ void UI_view2d_curRect_reset(View2D *v2d)
        /* handle height - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
                /* height is in negative-y half */
        /* handle height - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
                /* height is in negative-y half */
-               v2d->cur.ymin = (float)-height;
+               v2d->cur.ymin = -height;
                v2d->cur.ymax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
                /* height is in positive-y half */
                v2d->cur.ymin = 0.0f;
                v2d->cur.ymax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
                /* height is in positive-y half */
                v2d->cur.ymin = 0.0f;
-               v2d->cur.ymax = (float)height;
+               v2d->cur.ymax = height;
        }
        else {
                /* height is centered around (y == 0) */
        }
        else {
                /* height is centered around (y == 0) */
-               const float dy = (float)height / 2.0f;
+               const float dy = height / 2.0f;
                
                v2d->cur.ymin = -dy;
                v2d->cur.ymax = dy;
                
                v2d->cur.ymin = -dy;
                v2d->cur.ymax = dy;
index b80d4dedc65a746aae9e202e5699d5223c328ac2..5488545f2b155005283fd9d3c2ff33f1c96fd766 100644 (file)
@@ -455,7 +455,7 @@ void ED_object_editmode_enter(bContext *C, int flag)
        ob = base->object;
 
        /* this checks actual object->data, for cases when other scenes have it in editmode context */
        ob = base->object;
 
        /* this checks actual object->data, for cases when other scenes have it in editmode context */
-       if ( BKE_object_is_in_editmode(ob) )
+       if (BKE_object_is_in_editmode(ob))
                return;
        
        if (BKE_object_obdata_is_libdata(ob)) {
                return;
        
        if (BKE_object_obdata_is_libdata(ob)) {
index af9eebe9f6dd6fca9e0785d5ec5f8777b4f76b1c..eba8028dffb4b844489d3af70a471cb357ee139f 100644 (file)
@@ -165,7 +165,7 @@ int ED_operator_objectmode(bContext *C)
 
        if (scene == NULL || scene->id.lib)
                return 0;
 
        if (scene == NULL || scene->id.lib)
                return 0;
-       if (CTX_data_edit_object(C) )
+       if (CTX_data_edit_object(C))
                return 0;
        
        /* add a check for ob->mode too? */
                return 0;
        
        /* add a check for ob->mode too? */
index 1809c6cb83562b59a9b2d0532cf8b9711cb2f9c2..77cea89f2f7e060959d4770f97665df56eda834a 100644 (file)
@@ -139,7 +139,7 @@ static void file_panel_system_bookmarks(const bContext *C, Panel *pa)
 {
        SpaceFile *sfile = CTX_wm_space_file(C);
 
 {
        SpaceFile *sfile = CTX_wm_space_file(C);
 
-       if (sfile && !(U.uiflag & USER_HIDE_SYSTEM_BOOKMARKS) ) {
+       if (sfile && !(U.uiflag & USER_HIDE_SYSTEM_BOOKMARKS)) {
                file_panel_category(C, pa, FS_CATEGORY_SYSTEM_BOOKMARKS, &sfile->systemnr, ICON_BOOKMARKS, 0);
        }
 
                file_panel_category(C, pa, FS_CATEGORY_SYSTEM_BOOKMARKS, &sfile->systemnr, ICON_BOOKMARKS, 0);
        }
 
@@ -165,7 +165,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
        uiLayout *row;
 
        if (sfile) {
        uiLayout *row;
 
        if (sfile) {
-               if (!(U.uiflag & USER_HIDE_RECENT) ) {
+               if (!(U.uiflag & USER_HIDE_RECENT)) {
                        row = uiLayoutRow(pa->layout, FALSE);
                        uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");
                        uiItemL(row, NULL, ICON_NONE);
                        row = uiLayoutRow(pa->layout, FALSE);
                        uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");
                        uiItemL(row, NULL, ICON_NONE);
index 872960432d902f0827573577e76f1acf0cc32b58..748a0bd884c743535ab58ce68a7420455312657e 100644 (file)
@@ -304,18 +304,18 @@ static int is_hidden_file(const char *filename, short hide_dot)
                if (filename[0] == '.' && filename[1] != '.' && filename[1] != 0) {
                        is_hidden = 1; /* ignore .file */
                }
                if (filename[0] == '.' && filename[1] != '.' && filename[1] != 0) {
                        is_hidden = 1; /* ignore .file */
                }
-               else if (((filename[0] == '.') && (filename[1] == 0) )) {
+               else if (((filename[0] == '.') && (filename[1] == 0))) {
                        is_hidden = 1; /* ignore . */
                }
                else {
                        int len = strlen(filename);
                        is_hidden = 1; /* ignore . */
                }
                else {
                        int len = strlen(filename);
-                       if ( (len > 0) && (filename[len - 1] == '~') ) {
+                       if ((len > 0) && (filename[len - 1] == '~')) {
                                is_hidden = 1;  /* ignore file~ */
                        }
                }
        }
        else {
                                is_hidden = 1;  /* ignore file~ */
                        }
                }
        }
        else {
-               if (((filename[0] == '.') && (filename[1] == 0) )) {
+               if (((filename[0] == '.') && (filename[1] == 0))) {
                        is_hidden = 1; /* ignore . */
                }
        }
                        is_hidden = 1; /* ignore . */
                }
        }
@@ -370,7 +370,7 @@ void filelist_filter(FileList *filelist)
        /* How many files are left after filter ? */
        for (i = 0; i < filelist->numfiles; ++i) {
                struct direntry *file = &filelist->filelist[i];
        /* How many files are left after filter ? */
        for (i = 0; i < filelist->numfiles; ++i) {
                struct direntry *file = &filelist->filelist[i];
-               if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) {
+               if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot)) {
                        num_filtered++;
                }
        }
                        num_filtered++;
                }
        }
@@ -384,7 +384,7 @@ void filelist_filter(FileList *filelist)
 
        for (i = 0, j = 0; i < filelist->numfiles; ++i) {
                struct direntry *file = &filelist->filelist[i];
 
        for (i = 0, j = 0; i < filelist->numfiles; ++i) {
                struct direntry *file = &filelist->filelist[i];
-               if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) {
+               if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot)) {
                        filelist->fidx[j++] = i;
                }
        }
                        filelist->fidx[j++] = i;
                }
        }
@@ -629,7 +629,7 @@ ImBuf *filelist_getimage(struct FileList *filelist, int index)
 
        BLI_assert(G.background == FALSE);
 
 
        BLI_assert(G.background == FALSE);
 
-       if ( (index < 0) || (index >= filelist->numfiltered) ) {
+       if ((index < 0) || (index >= filelist->numfiltered)) {
                return NULL;
        }
        fidx = filelist->fidx[index];
                return NULL;
        }
        fidx = filelist->fidx[index];
@@ -646,7 +646,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
 
        BLI_assert(G.background == FALSE);
 
 
        BLI_assert(G.background == FALSE);
 
-       if ( (index < 0) || (index >= filelist->numfiltered) ) {
+       if ((index < 0) || (index >= filelist->numfiltered)) {
                return NULL;
        }
        fidx = filelist->fidx[index];
                return NULL;
        }
        fidx = filelist->fidx[index];
@@ -669,7 +669,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
        if (file->flags & BLENDERFILE) {
                ibuf = gSpecialFileImages[SPECIAL_IMG_BLENDFILE];
        }
        if (file->flags & BLENDERFILE) {
                ibuf = gSpecialFileImages[SPECIAL_IMG_BLENDFILE];
        }
-       else if ( (file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON) ) {
+       else if ((file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON)) {
                ibuf = gSpecialFileImages[SPECIAL_IMG_MOVIEFILE];
        }
        else if (file->flags & SOUNDFILE) {
                ibuf = gSpecialFileImages[SPECIAL_IMG_MOVIEFILE];
        }
        else if (file->flags & SOUNDFILE) {
@@ -698,7 +698,7 @@ struct direntry *filelist_file(struct FileList *filelist, int index)
 {
        int fidx = 0;
        
 {
        int fidx = 0;
        
-       if ( (index < 0) || (index >= filelist->numfiltered) ) {
+       if ((index < 0) || (index >= filelist->numfiltered)) {
                return NULL;
        }
        fidx = filelist->fidx[index];
                return NULL;
        }
        fidx = filelist->fidx[index];
@@ -994,7 +994,7 @@ void filelist_select_file(struct FileList *filelist, int index, FileSelType sele
 void filelist_select(struct FileList *filelist, FileSelection *sel, FileSelType select, unsigned int flag, FileCheckType check)
 {
        /* select all valid files between first and last indicated */
 void filelist_select(struct FileList *filelist, FileSelection *sel, FileSelType select, unsigned int flag, FileCheckType check)
 {
        /* select all valid files between first and last indicated */
-       if ( (sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered) ) {
+       if ((sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered)) {
                int current_file;
                for (current_file = sel->first; current_file <= sel->last; current_file++) {
                        filelist_select_file(filelist, current_file, select, flag, check);
                int current_file;
                for (current_file = sel->first; current_file <= sel->last; current_file++) {
                        filelist_select_file(filelist, current_file, select, flag, check);
@@ -1332,7 +1332,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
        tj->stop = stop;
        tj->do_update = do_update;
 
        tj->stop = stop;
        tj->do_update = do_update;
 
-       while ( (*stop == 0) && (limg) ) {
+       while ((*stop == 0) && (limg)) {
                if (limg->flags & IMAGEFILE) {
                        limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_IMAGE);
                }
                if (limg->flags & IMAGEFILE) {
                        limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_IMAGE);
                }
@@ -1393,7 +1393,7 @@ void thumbnails_start(FileList *filelist, const bContext *C)
        tj->filelist = filelist;
        for (idx = 0; idx < filelist->numfiles; idx++) {
                if (!filelist->filelist[idx].image) {
        tj->filelist = filelist;
        for (idx = 0; idx < filelist->numfiles; idx++) {
                if (!filelist->filelist[idx].image) {
-                       if ( (filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE | BLENDERFILE_BACKUP)) ) {
+                       if ((filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE | BLENDERFILE_BACKUP))) {
                                FileImage *limg = MEM_callocN(sizeof(FileImage), "loadimage");
                                BLI_strncpy(limg->path, filelist->filelist[idx].path, FILE_MAX);
                                limg->index = idx;
                                FileImage *limg = MEM_callocN(sizeof(FileImage), "loadimage");
                                BLI_strncpy(limg->path, filelist->filelist[idx].path, FILE_MAX);
                                limg->index = idx;
index e7c98437b9fb82ae26cfda1809a50f2f6b764f29..8b98f7ce5e62e6ceebcd1aa2c6b46feee0dedf31 100644 (file)
@@ -237,7 +237,7 @@ static void draw_fcurve_vertices_handles(FCurve *fcu, SpaceIpo *sipo, View2D *v2
                 * Also, need to take into account whether the keyframe was selected
                 * if a Graph Editor option to only show handles of selected keys is on.
                 */
                 * Also, need to take into account whether the keyframe was selected
                 * if a Graph Editor option to only show handles of selected keys is on.
                 */
-               if (!sel_handle_only || BEZSELECTED(bezt) ) {
+               if (!sel_handle_only || BEZSELECTED(bezt)) {
                        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);
                        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);
index 10f4e011026fb4de708cd42426ff2c9fd119d306..2f877e56f9409642f79737d86488f7da8e16fcf4 100644 (file)
@@ -1292,7 +1292,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
                        }
                }
                else {
                        }
                }
                else {
-                       if (tree_element_type_active(NULL, scene, soops, te, tselem, 0, false) ) active = 2;
+                       if (tree_element_type_active(NULL, scene, soops, te, tselem, 0, false)) active = 2;
                        glColor4ub(220, 220, 255, alpha);
                }
                
                        glColor4ub(220, 220, 255, alpha);
                }
                
index 3f0ad45de56922bbee03c4d1cdac364ac0ab6d31..8afd5607121755ff2e70e4f015625cd7cbb1c0aa 100644 (file)
@@ -307,7 +307,7 @@ void OUTLINER_OT_item_rename(wmOperatorType *ot)
 
 /* Apply Settings ------------------------------- */
 
 
 /* Apply Settings ------------------------------- */
 
-static int outliner_count_levels(SpaceOops *soops, ListBase *lb, int curlevel)
+static int outliner_count_levels(SpaceOops *soops, ListBase *lb, const int curlevel)
 {
        TreeElement *te;
        int level = curlevel, lev;
 {
        TreeElement *te;
        int level = curlevel, lev;
@@ -320,7 +320,7 @@ static int outliner_count_levels(SpaceOops *soops, ListBase *lb, int curlevel)
        return level;
 }
 
        return level;
 }
 
-int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, short flag, short curlevel)
+int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, short flag, const int curlevel)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
 {
        TreeElement *te;
        TreeStoreElem *tselem;
index 5aaf8b5430b9228823a4fff76611725892ec5203..015d8d64627e5c72a70ff159c646227b6562fa0a 100644 (file)
@@ -177,7 +177,7 @@ void outliner_do_object_operation(struct bContext *C, struct Scene *scene, struc
 
 int common_restrict_check(struct bContext *C, struct Object *ob);
 
 
 int common_restrict_check(struct bContext *C, struct Object *ob);
 
-int outliner_has_one_flag(struct SpaceOops *soops, ListBase *lb, short flag, short curlevel);
+bool outliner_has_one_flag(struct SpaceOops *soops, ListBase *lb, short flag, const int curlevel);
 void outliner_set_flag(struct SpaceOops *soops, ListBase *lb, short flag, short set);
 
 void object_toggle_visibility_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem);
 void outliner_set_flag(struct SpaceOops *soops, ListBase *lb, short flag, short set);
 
 void object_toggle_visibility_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem);
index a0af9340fe2c23bf4eb62fc519a5311c2699dd77..cdc7178e767795384e45922391fe0496c5f9bd9c 100644 (file)
@@ -1278,7 +1278,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
                /* select object that's clicked on and popup context menu */
                if (!(tselem->flag & TSE_SELECTED)) {
                        
                /* select object that's clicked on and popup context menu */
                if (!(tselem->flag & TSE_SELECTED)) {
                        
-                       if (outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1) )
+                       if (outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1))
                                outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
                        
                        tselem->flag |= TSE_SELECTED;
                                outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
                        
                        tselem->flag |= TSE_SELECTED;
index 2952bdb042cd881346d7e03bb20f5a2ad68ee899..3253d344ff695dfa50252a1b9ba017a2840cc529 100644 (file)
@@ -293,7 +293,7 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se
        for (seq = ed->seqbasep->first; seq; seq = seq->next) {
                if ((seq != test) &&
                    (test->machine == seq->machine) &&
        for (seq = ed->seqbasep->first; seq; seq = seq->next) {
                if ((seq != test) &&
                    (test->machine == seq->machine) &&
-                   ((sel == -1) || (sel && (seq->flag & SELECT)) || (sel == 0 && (seq->flag & SELECT) == 0)  ))
+                   ((sel == -1) || (sel && (seq->flag & SELECT)) || (sel == 0 && (seq->flag & SELECT) == 0)))
                {
                        switch (lr) {
                                case SEQ_SIDE_LEFT:
                {
                        switch (lr) {
                                case SEQ_SIDE_LEFT:
index 7d51e0eac757802981eeff28bd8af577aa825c42..71a0c86da6a91832048114ac47b6cd8d0df3e3e4 100644 (file)
@@ -1271,7 +1271,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
 
                /* draw clip start, useful for wide cones where its not obvious where the start is */
                glTranslatef(0.0, 0.0, -x);  /* reverse translation above */
 
                /* draw clip start, useful for wide cones where its not obvious where the start is */
                glTranslatef(0.0, 0.0, -x);  /* reverse translation above */
-               if (la->type == LA_SPOT && (la->mode & LA_SHAD_BUF) ) {
+               if (la->type == LA_SPOT && (la->mode & LA_SHAD_BUF)) {
                        float lvec_clip[3];
                        float vvec_clip[3];
                        float clipsta_fac = la->clipsta / -x;
                        float lvec_clip[3];
                        float vvec_clip[3];
                        float clipsta_fac = la->clipsta / -x;
index d43cfa93311842692d0506c0deba50a01fded2d6..23252804b367dd788b86ac1f08b2ed03f1fe3339 100644 (file)
@@ -1295,7 +1295,8 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
                return;
        }
 
                return;
        }
 
-       if (!(v3d->flag & V3D_INVALID_BACKBUF) ) return;
+       if (!(v3d->flag & V3D_INVALID_BACKBUF))
+               return;
 
 #if 0
        if (test) {
 
 #if 0
        if (test) {
@@ -3326,8 +3327,9 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
        /* draw selected and editmode */
        for (base = scene->base.first; base; base = base->next) {
                if (v3d->lay & base->lay) {
        /* draw selected and editmode */
        for (base = scene->base.first; base; base = base->next) {
                if (v3d->lay & base->lay) {
-                       if (base->object == scene->obedit || (base->flag & SELECT) )
+                       if (base->object == scene->obedit || (base->flag & SELECT)) {
                                draw_object(scene, ar, v3d, base, 0);
                                draw_object(scene, ar, v3d, base, 0);
+                       }
                }
        }
 
                }
        }
 
index 842f1f230af1080f6feb1009a377be99bd7ddf9e..f95883f28ec98a45419761c4f187ac5b99b67306 100644 (file)
@@ -295,19 +295,19 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar)
                        if (rv3dtest->viewlock) {
                                rv3dtest->dist = rv3d->dist;
 
                        if (rv3dtest->viewlock) {
                                rv3dtest->dist = rv3d->dist;
 
-                               if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM) ) {
+                               if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) {
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK))
                                                rv3dtest->ofs[0] = rv3d->ofs[0];
                                        else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT))
                                                rv3dtest->ofs[1] = rv3d->ofs[1];
                                }
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK))
                                                rv3dtest->ofs[0] = rv3d->ofs[0];
                                        else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT))
                                                rv3dtest->ofs[1] = rv3d->ofs[1];
                                }
-                               else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK) ) {
+                               else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) {
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM))
                                                rv3dtest->ofs[0] = rv3d->ofs[0];
                                        else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT))
                                                rv3dtest->ofs[2] = rv3d->ofs[2];
                                }
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM))
                                                rv3dtest->ofs[0] = rv3d->ofs[0];
                                        else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT))
                                                rv3dtest->ofs[2] = rv3d->ofs[2];
                                }
-                               else if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT) ) {
+                               else if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) {
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM))
                                                rv3dtest->ofs[1] = rv3d->ofs[1];
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK))
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM))
                                                rv3dtest->ofs[1] = rv3d->ofs[1];
                                        if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK))
index 894145c9e9dd8515f6c5922fef669c2953c1c8bc..24f51635e07dbc86ef47f6b8a90406cfadf32322 100644 (file)
@@ -925,7 +925,7 @@ void postSelectConstraint(TransInfo *t)
 static void setNearestAxis2d(TransInfo *t)
 {
        /* no correction needed... just use whichever one is lower */
 static void setNearestAxis2d(TransInfo *t)
 {
        /* no correction needed... just use whichever one is lower */
-       if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1]) ) {
+       if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1])) {
                t->con.mode |= CON_AXIS1;
                BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text));
        }
                t->con.mode |= CON_AXIS1;
                BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text));
        }
index 0ff94fb4f1c0921c8c069453cbe975d02bcafdc8..85a2da10596bf145feabf94197a86afacbfcd4b4 100644 (file)
@@ -497,7 +497,7 @@ static void recalcData_nla(TransInfo *t)
                        pExceeded = ((strip->prev) && (strip->prev->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h1[0] < strip->prev->end));
                        nExceeded = ((strip->next) && (strip->next->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h2[0] > strip->next->start));
                        
                        pExceeded = ((strip->prev) && (strip->prev->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h1[0] < strip->prev->end));
                        nExceeded = ((strip->next) && (strip->next->type != NLASTRIP_TYPE_TRANSITION) && (tdn->h2[0] > strip->next->start));
                        
-                       if ((pExceeded && nExceeded) || (iter == 4) ) {
+                       if ((pExceeded && nExceeded) || (iter == 4)) {
                                /* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise)
                                 *      - simply crop strip to fit within the bounds of the strips bounding it
                                 *      - if there were no neighbors, clear the transforms (make it default to the strip's current values)
                                /* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise)
                                 *      - simply crop strip to fit within the bounds of the strips bounding it
                                 *      - if there were no neighbors, clear the transforms (make it default to the strip's current values)
index 529a815b893b11be6aa5595daa8f05d181aed080..b5bcd8158e1a1421e977d897c685e97d38d2425a 100644 (file)
@@ -2856,7 +2856,7 @@ static int uv_border_select_exec(bContext *C, wmOperator *op)
                        BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
 
                        BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
 
-                               if (!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
+                               if (!pinned || (ts->uv_flag & UV_SYNC_SELECTION)) {
 
                                        /* UV_SYNC_SELECTION - can't do pinned selection */
                                        if (BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
 
                                        /* UV_SYNC_SELECTION - can't do pinned selection */
                                        if (BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
index 4c3bdd0398e624e4fb2a3a24da51e1575796da72..d82fe46ea54fa541f69269ce6be5fcb487a4a2aa 100644 (file)
@@ -2469,7 +2469,7 @@ static void rna_def_object(BlenderRNA *brna)
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "iuser");
        RNA_def_property_ui_text(prop, "Image User",
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "iuser");
        RNA_def_property_ui_text(prop, "Image User",
-                                                        "Parameters defining which layer, pass and frame of the image is displayed");
+                                "Parameters defining which layer, pass and frame of the image is displayed");
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
 
        /* render */
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
 
        /* render */
index a73a7f41d7eafb0ef4bfa8523bee0c4334ad7b33..d8fc8799237b9b9e54fc63d2f827937fd511cd37 100644 (file)
@@ -291,7 +291,7 @@ static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
 
        seq->machine = value;
        
 
        seq->machine = value;
        
-       if (BKE_sequence_test_overlap(seqbase, seq) ) {
+       if (BKE_sequence_test_overlap(seqbase, seq)) {
                BKE_sequence_base_shuffle(seqbase, seq, scene);  /* XXX - BROKEN!, uses context seqbasep */
        }
        BKE_sequencer_sort(scene);
                BKE_sequence_base_shuffle(seqbase, seq, scene);  /* XXX - BROKEN!, uses context seqbasep */
        }
        BKE_sequencer_sort(scene);
index 1d5dc29c119dbe47571b144f0472e1ed2e7d461f..50788f4e4a683c474f2fa567a827c0ae52e59760 100644 (file)
@@ -140,7 +140,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
         *      - must have verts and therefore verts assigned to vgroups to do anything useful
         */
        if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) ||
         *      - must have verts and therefore verts assigned to vgroups to do anything useful
         */
        if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) ||
-           (maxVerts == 0) || (ob->defbase.first == NULL) )
+           (maxVerts == 0) || (ob->defbase.first == NULL))
        {
                return dm;
        }
        {
                return dm;
        }
@@ -297,7 +297,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        /* vertices */
        for (hashIter = BLI_ghashIterator_new(vertHash);
             BLI_ghashIterator_done(hashIter) == false;
        /* vertices */
        for (hashIter = BLI_ghashIterator_new(vertHash);
             BLI_ghashIterator_done(hashIter) == false;
-            BLI_ghashIterator_step(hashIter) )
+            BLI_ghashIterator_step(hashIter))
        {
                MVert source;
                MVert *dest;
        {
                MVert source;
                MVert *dest;
@@ -336,7 +336,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        /* faces */
        for (hashIter = BLI_ghashIterator_new(polyHash);
             BLI_ghashIterator_done(hashIter) == false;
        /* faces */
        for (hashIter = BLI_ghashIterator_new(polyHash);
             BLI_ghashIterator_done(hashIter) == false;
-            BLI_ghashIterator_step(hashIter) )
+            BLI_ghashIterator_step(hashIter))
        {
                int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
                int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
        {
                int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
                int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
index 39a9f74dea4cfe5810a2f5d97ccf7ed9f3586ced..31aefe4f02745fdc8bdd37246b78f0eea5302999 100644 (file)
@@ -377,7 +377,7 @@ int ntreeCompositTagAnimated(bNodeTree *ntree)
                }
                /* here was tag render layer, but this is called after a render, so re-composites fail */
                else if (node->type == NODE_GROUP) {
                }
                /* here was tag render layer, but this is called after a render, so re-composites fail */
                else if (node->type == NODE_GROUP) {
-                       if (ntreeCompositTagAnimated((bNodeTree *)node->id) ) {
+                       if (ntreeCompositTagAnimated((bNodeTree *)node->id)) {
                                nodeUpdate(ntree, node);
                        }
                }
                                nodeUpdate(ntree, node);
                        }
                }
index e6fc2cf6bb2c3f41718577a65d02b53e3634f003..09a83834610d9b18d39067860881f2582c49e212 100644 (file)
@@ -146,7 +146,7 @@ void WM_cursor_set(wmWindow *win, int curs)
                if (curs == SYSCURSOR) {  /* System default Cursor */
                        GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
                }
                if (curs == SYSCURSOR) {  /* System default Cursor */
                        GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
                }
-               else if ( (U.curssize == 0) || (BlenderCursor[curs]->big_bm == NULL) ) {
+               else if ((U.curssize == 0) || (BlenderCursor[curs]->big_bm == NULL)) {
                        window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
                }
                else {
                        window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
                }
                else {
index dad8e7bdde0bf5ac614db640bb9f90b46cfbef33..12e23c3d0c708d6fd60114779f1339d34edb0bf9 100644 (file)
@@ -227,7 +227,7 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event)
        drag->opname[0] = 0;
        
        /* check buttons (XXX todo rna and value) */
        drag->opname[0] = 0;
        
        /* check buttons (XXX todo rna and value) */
-       if (UI_but_active_drop_name(C) ) {
+       if (UI_but_active_drop_name(C)) {
                BLI_strncpy(drag->opname, IFACE_("Paste name"), sizeof(drag->opname));
        }
        else {
                BLI_strncpy(drag->opname, IFACE_("Paste name"), sizeof(drag->opname));
        }
        else {
index e4dfae284feaec8eb61ebf8c121ca88abf7a3918..f8488b63c8529678d912f5b701fbfaeb99005cb5 100644 (file)
@@ -3040,7 +3040,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        
                        /* double click test */
                        if (wm_event_is_double_click(&event, evt)) {
                        
                        /* double click test */
                        if (wm_event_is_double_click(&event, evt)) {
-                               if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) )
+                               if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS))
                                        printf("%s Send double click\n", __func__);
                                event.val = KM_DBL_CLICK;
                        }
                                        printf("%s Send double click\n", __func__);
                                event.val = KM_DBL_CLICK;
                        }
@@ -3147,7 +3147,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        /* double click test */
                        /* if previous event was same type, and previous was release, and now it presses... */
                        if (wm_event_is_double_click(&event, evt)) {
                        /* double click test */
                        /* if previous event was same type, and previous was release, and now it presses... */
                        if (wm_event_is_double_click(&event, evt)) {
-                               if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) )
+                               if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS))
                                        printf("%s Send double click\n", __func__);
                                evt->val = event.val = KM_DBL_CLICK;
                        }
                                        printf("%s Send double click\n", __func__);
                                evt->val = event.val = KM_DBL_CLICK;
                        }
@@ -3216,7 +3216,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        attach_ndof_data(&event, customdata);
                        wm_event_add(win, &event);
 
                        attach_ndof_data(&event, customdata);
                        wm_event_add(win, &event);
 
-                       if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) )
+                       if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS))
                                printf("%s sending NDOF_MOTION, prev = %d %d\n", __func__, event.x, event.y);
 
                        break;
                                printf("%s sending NDOF_MOTION, prev = %d %d\n", __func__, event.x, event.y);
 
                        break;
index 99437479df1a013840cd4113d8d6ba4d5e48d908..fc36290b0db968a409c38c2b684663636c055024 100644 (file)
@@ -2897,8 +2897,9 @@ static int border_apply(bContext *C, wmOperator *op, int gesture_mode)
                return 0;
        
        /* XXX weak; border should be configured for this without reading event types */
                return 0;
        
        /* XXX weak; border should be configured for this without reading event types */
-       if (RNA_struct_find_property(op->ptr, "gesture_mode") )
+       if (RNA_struct_find_property(op->ptr, "gesture_mode")) {
                RNA_int_set(op->ptr, "gesture_mode", gesture_mode);
                RNA_int_set(op->ptr, "gesture_mode", gesture_mode);
+       }
 
        retval = op->type->exec(C, op);
        OPERATOR_RETVAL_CHECK(retval);
 
        retval = op->type->exec(C, op);
        OPERATOR_RETVAL_CHECK(retval);
@@ -2915,8 +2916,9 @@ static void wm_gesture_end(bContext *C, wmOperator *op)
 
        ED_area_tag_redraw(CTX_wm_area(C));
        
 
        ED_area_tag_redraw(CTX_wm_area(C));
        
-       if (RNA_struct_find_property(op->ptr, "cursor") )
+       if (RNA_struct_find_property(op->ptr, "cursor")) {
                WM_cursor_modal_restore(CTX_wm_window(C));
                WM_cursor_modal_restore(CTX_wm_window(C));
+       }
 }
 
 int WM_border_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 }
 
 int WM_border_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@@ -3194,8 +3196,9 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action)
        if (win->tweak == NULL) {
                if (CTX_wm_region(C)) {
                        if (event->val == KM_PRESS) {
        if (win->tweak == NULL) {
                if (CTX_wm_region(C)) {
                        if (event->val == KM_PRESS) {
-                               if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) )
+                               if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE)) {
                                        win->tweak = WM_gesture_new(C, event, WM_GESTURE_TWEAK);
                                        win->tweak = WM_gesture_new(C, event, WM_GESTURE_TWEAK);
+                               }
                        }
                }
        }
                        }
                }
        }
@@ -3220,8 +3223,9 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
        
        wm_gesture_tag_redraw(C);
        
        
        wm_gesture_tag_redraw(C);
        
-       if (RNA_struct_find_property(op->ptr, "cursor") )
+       if (RNA_struct_find_property(op->ptr, "cursor")) {
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+       }
        
        return OPERATOR_RUNNING_MODAL;
 }
        
        return OPERATOR_RUNNING_MODAL;
 }
@@ -3235,8 +3239,9 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, const wmEvent *event)
        
        wm_gesture_tag_redraw(C);
        
        
        wm_gesture_tag_redraw(C);
        
-       if (RNA_struct_find_property(op->ptr, "cursor") )
+       if (RNA_struct_find_property(op->ptr, "cursor")) {
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+       }
        
        return OPERATOR_RUNNING_MODAL;
 }
        
        return OPERATOR_RUNNING_MODAL;
 }
@@ -3448,8 +3453,9 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, const wmEvent *e
        
        wm_gesture_tag_redraw(C);
        
        
        wm_gesture_tag_redraw(C);
        
-       if (RNA_struct_find_property(op->ptr, "cursor") )
+       if (RNA_struct_find_property(op->ptr, "cursor")) {
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
                WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+       }
                
        return OPERATOR_RUNNING_MODAL;
 }
                
        return OPERATOR_RUNNING_MODAL;
 }