code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 19 May 2012 13:28:19 +0000 (13:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 19 May 2012 13:28:19 +0000 (13:28 +0000)
116 files changed:
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/uvproject.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/drivers.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.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/space_view3d/view3d_select.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/scaling.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/composite/nodes/node_composite_defocus.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_exec.c
source/blender/nodes/shader/node_shader_util.c
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c

index 4ddafbbaae9a511c8d5f11b54942d06f0ece27de..f06e0e2f71a659a881f605865886fc6409e8afaf 100644 (file)
@@ -67,8 +67,8 @@ void seq_end(SeqIterator *iter);
 void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
 
 #define SEQP_BEGIN(ed, _seq)                                                  \
-       {                                                                             \
-               SeqIterator iter;                                                         \
+       {                                                                         \
+               SeqIterator iter;                                                     \
                for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {          \
                        _seq = iter.seq;
                        
@@ -79,8 +79,8 @@ void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int us
                        _seq = iter.seq;
 
 #define SEQ_END                                                               \
-       }                                                                     \
-    seq_end(&iter);                                                       \
+               }                                                                     \
+               seq_end(&iter);                                                       \
        }
 
 typedef struct SeqRenderData {
index ed6eceb036bc6bb4b8b8b92c991a993b5e5b26c2..6198a119ac4d0cefa745c055414665d94436fecd 100644 (file)
@@ -751,14 +751,14 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, i
                        dob = new_dupli_object(lb, go->ob, mat, ob->lay, 0, OB_DUPLIGROUP, animated);
 
                        /* check the group instance and object layers match, also that the object visible flags are ok. */
-                       if (    (dob->origlay & group->layer) == 0 ||
-                               (G.rendering == 0 && dob->ob->restrictflag & OB_RESTRICT_VIEW) ||
-                               (G.rendering && dob->ob->restrictflag & OB_RESTRICT_RENDER)
-                               ) {
-                               dob->no_draw = 1;
+                       if ((dob->origlay & group->layer) == 0 ||
+                           (G.rendering == 0 && dob->ob->restrictflag & OB_RESTRICT_VIEW) ||
+                           (G.rendering && dob->ob->restrictflag & OB_RESTRICT_RENDER))
+                       {
+                               dob->no_draw = TRUE;
                        }
                        else {
-                               dob->no_draw = 0;
+                               dob->no_draw = FALSE;
                        }
 
                        if (go->ob->transflag & OB_DUPLI) {
index fe95d15f82e9251afd966ff82ff3b55e68317be2..752036c6b9fcfd722f8b796b2c81d595451674b2 100644 (file)
@@ -437,7 +437,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
        float h1[3], h2[3], scale[3], length, hlength1, hlength2, roll1 = 0.0f, roll2;
        float mat3[3][3], imat[4][4], posemat[4][4], scalemat[4][4], iscalemat[4][4];
        float data[MAX_BBONE_SUBDIV + 1][4], *fp;
-       int a, doscale = 0;
+       int a, do_scale = 0;
 
        length = bone->length;
 
@@ -455,7 +455,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
                        invert_m4_m4(iscalemat, scalemat);
 
                        length *= scale[1];
-                       doscale = 1;
+                       do_scale = 1;
                }
        }
 
@@ -476,7 +476,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
        if (rest) {
                invert_m4_m4(imat, pchan->bone->arm_mat);
        }
-       else if (doscale) {
+       else if (do_scale) {
                copy_m4_m4(posemat, pchan->pose_mat);
                normalize_m4(posemat);
                invert_m4_m4(imat, posemat);
@@ -581,7 +581,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
                copy_m4_m3(result_array[a].mat, mat3);
                copy_v3_v3(result_array[a].mat[3], fp);
 
-               if (doscale) {
+               if (do_scale) {
                        /* correct for scaling when this matrix is used in scaled space */
                        mul_serie_m4(result_array[a].mat, iscalemat, result_array[a].mat, scalemat, NULL, NULL, NULL, NULL, NULL);
                }
@@ -835,7 +835,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
        const short invert_vgroup = deformflag & ARM_DEF_INVERT_VGROUP;
        int defbase_tot = 0;       /* safety for vertexgroup index overflow */
        int i, target_totvert = 0; /* safety for vertexgroup overflow */
-       int use_dverts = 0;
+       int use_dverts = FALSE;
        int armature_def_nr;
        int totchan;
 
@@ -895,11 +895,12 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
        if (deformflag & ARM_DEF_VGROUP) {
                if (ELEM(target->type, OB_MESH, OB_LATTICE)) {
                        /* if we have a DerivedMesh, only use dverts if it has them */
-                       if (dm)
-                               if (dm->getVertData(dm, 0, CD_MDEFORMVERT))
-                                       use_dverts = 1;
-                               else use_dverts = 0;
-                       else if (dverts) use_dverts = 1;
+                       if (dm) {
+                               use_dverts = (dm->getVertData(dm, 0, CD_MDEFORMVERT) != NULL);
+                       }
+                       else if (dverts) {
+                               use_dverts = TRUE;
+                       }
 
                        if (use_dverts) {
                                defnrToPC = MEM_callocN(sizeof(*defnrToPC) * defbase_tot, "defnrToBone");
@@ -2245,13 +2246,13 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
        int do_modif;
 
        for (strip = armob->nlastrips.first; strip; strip = strip->next) {
-               do_modif = 0;
+               do_modif = FALSE;
 
                if (scene_cfra >= strip->start && scene_cfra <= strip->end)
-                       do_modif = 1;
+                       do_modif = TRUE;
 
                if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) {
-                       do_modif = 1;
+                       do_modif = TRUE;
 
                        /* if there are any other strips active, ignore modifiers for this strip -
                         * 'hold' option should only hold action modifiers if there are
@@ -2261,7 +2262,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
 
                                if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) {
                                        if (!(strip2->flag & ACTSTRIP_MUTE))
-                                               do_modif = 0;
+                                               do_modif = FALSE;
                                }
                        }
 
@@ -2270,7 +2271,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha
                        for (strip2 = strip->next; strip2; strip2 = strip2->next) {
                                if (scene_cfra < strip2->start) continue;
                                if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) {
-                                       do_modif = 0;
+                                       do_modif = FALSE;
                                }
                        }
                }
index 3450408a0a0617ff39213219482163acc9a05f20..cc49652d6e502b4a73fe199b07b1de5eb7ff1b95 100644 (file)
@@ -1039,13 +1039,13 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
        MFace *mface = cddm->mface;
        /* MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
        float (*nors)[3] = dm->getTessFaceDataArray(dm, CD_NORMAL);
-       int a, b, dodraw, matnr, new_matnr;
+       int a, b, do_draw, matnr, new_matnr;
        int orig, *index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
 
        cdDM_update_normals_from_pbvh(dm);
 
        matnr = -1;
-       dodraw = 0;
+       do_draw = FALSE;
 
        glShadeModel(GL_SMOOTH);
 
@@ -1062,14 +1062,14 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                        if (new_matnr != matnr) {
                                glEnd();
 
-                               dodraw = setMaterial(matnr = new_matnr, &gattribs);
-                               if (dodraw)
+                               do_draw = setMaterial(matnr = new_matnr, &gattribs);
+                               if (do_draw)
                                        DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
 
                                glBegin(GL_QUADS);
                        }
 
-                       if (!dodraw) {
+                       if (!do_draw) {
                                continue;
                        }
                        else if (setDrawOptions) {
@@ -1139,7 +1139,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                                        numfaces = curface - start;
                                        if (numfaces > 0) {
 
-                                               if (dodraw) {
+                                               if (do_draw) {
 
                                                        if (numdata != 0) {
 
@@ -1161,9 +1161,9 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                                        }
                                        numdata = 0;
                                        start = curface;
-                                       /* prevdraw = dodraw; */ /* UNUSED */
-                                       dodraw = setMaterial(matnr = new_matnr, &gattribs);
-                                       if (dodraw) {
+                                       /* prevdraw = do_draw; */ /* UNUSED */
+                                       do_draw = setMaterial(matnr = new_matnr, &gattribs);
+                                       if (do_draw) {
                                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
 
                                                if (attribs.totorco) {
@@ -1215,7 +1215,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                                        }
                                }
 
-                               if (dodraw && numdata != 0) {
+                               if (do_draw && numdata != 0) {
                                        offset = 0;
                                        if (attribs.totorco) {
                                                copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v1]);
@@ -1257,7 +1257,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                                }
                                curface++;
                                if (mface->v4) {
-                                       if (dodraw && numdata != 0) {
+                                       if (do_draw && numdata != 0) {
                                                offset = 0;
                                                if (attribs.totorco) {
                                                        copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v3]);
@@ -1302,7 +1302,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
                        }
                        numfaces = curface - start;
                        if (numfaces > 0) {
-                               if (dodraw) {
+                               if (do_draw) {
                                        if (numdata != 0) {
                                                GPU_buffer_unlock(buffer);
                                                GPU_interleaved_attrib_setup(buffer, datatypes, numdata);
index d736309f605e40e940e9a0d49a168bf75533549c..4cdb4e1b66e40caa26f86da08f51a2824415855f 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_main.h"
@@ -251,7 +252,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
        bScreen *sc;
        ScrArea *sa;
        ARegion *ar;
-       int done = 0, recursion = C->data.recursion;
+       int done = FALSE, recursion = C->data.recursion;
        int ret = 0;
 
        memset(result, 0, sizeof(bContextDataResult));
@@ -279,7 +280,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
                entry = BLI_rfindstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name));
                if (entry) {
                        result->ptr = entry->ptr;
-                       done = 1;
+                       done = TRUE;
                }
        }
        if (done != 1 && recursion < 2 && (ar = CTX_wm_region(C))) {
index 6a0991cf4e5078a6bc755d575e2533e25a07b7f5..ce62b9c10dcd42f86cd9c4c33490ab7d2fb77257 100644 (file)
@@ -378,7 +378,7 @@ void BKE_curve_texspace_calc(Curve *cu)
        DispList *dl;
        BoundBox *bb;
        float *fp, min[3], max[3];
-       int tot, doit = 0;
+       int tot, do_it = FALSE;
 
        if (cu->bb == NULL)
                cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
@@ -390,7 +390,7 @@ void BKE_curve_texspace_calc(Curve *cu)
        while (dl) {
                tot = ELEM(dl->type, DL_INDEX3, DL_INDEX4) ? dl->nr : dl->nr * dl->parts;
 
-               if (tot) doit = 1;
+               if (tot) do_it = TRUE;
                fp = dl->verts;
                while (tot--) {
                        minmax_v3v3_v3(min, max, fp);
@@ -399,7 +399,7 @@ void BKE_curve_texspace_calc(Curve *cu)
                dl = dl->next;
        }
 
-       if (!doit) {
+       if (do_it == FALSE) {
                min[0] = min[1] = min[2] = -1.0f;
                max[0] = max[1] = max[2] = 1.0f;
        }
@@ -1272,12 +1272,12 @@ float *BKE_curve_surf_make_orco(Object *ob)
                                for (b = 0; b < sizeu; b++) {
                                        int use_b = b;
                                        if (b == sizeu - 1 && (nu->flagu & CU_NURB_CYCLIC))
-                                               use_b = 0;
+                                               use_b = FALSE;
 
                                        for (a = 0; a < sizev; a++) {
                                                int use_a = a;
                                                if (a == sizev - 1 && (nu->flagv & CU_NURB_CYCLIC))
-                                                       use_a = 0;
+                                                       use_a = FALSE;
 
                                                tdata = _tdata + 3 * (use_b * (nu->pntsv * resolv) + use_a);
 
@@ -2216,7 +2216,7 @@ void BKE_curve_bevelList_make(Object *ob)
                /* check if we will calculate tilt data */
                do_tilt = CU_DO_TILT(cu, nu);
                do_radius = CU_DO_RADIUS(cu, nu); /* normal display uses the radius, better just to calculate them */
-               do_weight = 1;
+               do_weight = TRUE;
 
                /* check we are a single point? also check we are not a surface and that the orderu is sane,
                 * enforced in the UI but can go wrong possibly */
index e44264c8d4b1d163ee84d837a794464055961673..2b08c08541708fc06638c46eb42303312cd02145 100644 (file)
@@ -2631,7 +2631,7 @@ void DAG_ids_flush_tagged(Main *bmain)
        ListBase *lbarray[MAX_LIBARRAY];
        Scene *sce;
        unsigned int lay;
-       int a, do_flush = 0;
+       int a, do_flush = FALSE;
 
        dag_current_scene_layers(bmain, &sce, &lay);
 
@@ -2651,7 +2651,7 @@ void DAG_ids_flush_tagged(Main *bmain)
                        for (; id; id = id->next) {
                                if (id->flag & (LIB_ID_RECALC | LIB_ID_RECALC_DATA)) {
                                        dag_id_flush_update(sce, id);
-                                       do_flush = 1;
+                                       do_flush = TRUE;
                                }
                        }
                }
index b3ed3dcaf1d19c78733e5804310629aba77830f7..d526ce7afdc044a7392d767d3793a763ec45ed58 100644 (file)
@@ -276,12 +276,12 @@ DynamicPaintSurface *get_activeSurface(DynamicPaintCanvasSettings *canvas)
 void dynamicPaint_resetPreview(DynamicPaintCanvasSettings *canvas)
 {
        DynamicPaintSurface *surface = canvas->surfaces.first;
-       int done = 0;
+       int done = FALSE;
 
        for (; surface; surface = surface->next) {
                if (!done && dynamicPaint_surfaceHasColorPreview(surface)) {
                        surface->flags |= MOD_DPAINT_PREVIEW;
-                       done = 1;
+                       done = TRUE;
                }
                else
                        surface->flags &= ~MOD_DPAINT_PREVIEW;
index 3e25281dd08004a340a9dfb172307afafbcbd50a..f1000a95e95f46cd5a41a4a51ea5605b4a2f486d 100644 (file)
@@ -980,9 +980,9 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
        DMVertexAttribs attribs;
        GPUVertexAttribs gattribs;
 
-       int i, b, matnr, new_matnr, dodraw;
+       int i, b, matnr, new_matnr, do_draw;
 
-       dodraw = 0;
+       do_draw = FALSE;
        matnr = -1;
 
        memset(&attribs, 0, sizeof(attribs));
@@ -1026,12 +1026,12 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
 
                new_matnr = efa->mat_nr + 1;
                if (new_matnr != matnr) {
-                       dodraw = setMaterial(matnr = new_matnr, &gattribs);
-                       if (dodraw)
+                       do_draw = setMaterial(matnr = new_matnr, &gattribs);
+                       if (do_draw)
                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
                }
 
-               if (dodraw) {
+               if (do_draw) {
                        glBegin(GL_TRIANGLES);
                        if (!drawSmooth) {
                                if (vertexCos) glNormal3fv(bmdm->polyNos[BM_elem_index_get(efa)]);
index 9d878cd185f2f19a3cd6a6de2e443f3fbc7ebe29..2a0f49262bc8dfecc24cf054965389fa71a26aee 100644 (file)
@@ -505,7 +505,7 @@ void calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa
                                BezTriple *bezt;
                                
                                for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) {
-                                       if ((do_sel_only == 0) || BEZSELECTED(bezt)) {
+                                       if ((do_sel_only == FALSE) || BEZSELECTED(bezt)) {
                                                if (bezt->vec[1][1] < yminv)
                                                        yminv = bezt->vec[1][1];
                                                if (bezt->vec[1][1] > ymaxv)
@@ -1241,7 +1241,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
        bPoseChannel *pchan;
        float mat[4][4];
        float oldEul[3] = {0.0f, 0.0f, 0.0f};
-       short useEulers = 0, rotOrder = ROT_MODE_EUL;
+       short use_eulers = FALSE, rot_order = ROT_MODE_EUL;
        
        /* check if this target has valid data */
        if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) {
@@ -1263,8 +1263,8 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
                /* bone */
                if (pchan->rotmode > 0) {
                        copy_v3_v3(oldEul, pchan->eul);
-                       rotOrder = pchan->rotmode;
-                       useEulers = 1;
+                       rot_order = pchan->rotmode;
+                       use_eulers = TRUE;
                }
                
                if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
@@ -1290,8 +1290,8 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
                /* object */
                if (ob->rotmode > 0) {
                        copy_v3_v3(oldEul, ob->rot);
-                       rotOrder = ob->rotmode;
-                       useEulers = 1;
+                       rot_order = ob->rotmode;
+                       use_eulers = TRUE;
                }
                
                if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
@@ -1334,9 +1334,9 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
                 */
                float eul[3];
                
-               mat4_to_eulO(eul, rotOrder, mat);
+               mat4_to_eulO(eul, rot_order, mat);
                
-               if (useEulers) {
+               if (use_eulers) {
                        compatible_eul(eul, oldEul);
                }
                
index 2fc436ab4de583505d701eb8d6b7d7a3135b4f5b..8f077ab107c800b69016b4f027060952b876cc5f 100644 (file)
@@ -300,7 +300,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
 {
        static ListBase nlastrips = {NULL, NULL};
        static bAction *action = NULL;
-       static int done = 0;
+       static int done = FALSE;
        bActionStrip *strip, *nstrip;
        
        if (mode == 's') {
@@ -314,7 +314,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
                                        action = target->action;
                                        target->action = NULL;
                                        target->nlaflag |= OB_NLA_OVERRIDE;
-                                       done = 1;
+                                       done = TRUE;
                                }
                                nstrip = MEM_dupallocN(strip);
                                BLI_addtail(&target->nlastrips, nstrip);
@@ -329,7 +329,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
                        
                        nlastrips.first = nlastrips.last = NULL;  /* not needed, but yah... :) */
                        action = NULL;
-                       done = 0;
+                       done = FALSE;
                }
        }
 }
index 6a69ffb474a1570826170038e4d2806376e821e9..025ea40e82b66b640e5633629666bb458278060b 100644 (file)
@@ -658,13 +658,15 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
         */
        if (target && target->type == OB_MESH) {
                /* if there's derived data without deformverts, don't use vgroups */
-               if (dm && !dm->getVertData(dm, 0, CD_MDEFORMVERT))
-                       use_vgroups = 0;
-               else
-                       use_vgroups = 1;
+               if (dm) {
+                       use_vgroups = (dm->getVertData(dm, 0, CD_MDEFORMVERT) != NULL);
+               }
+               else {
+                       use_vgroups = FALSE;
+               }
        }
        else {
-               use_vgroups = 0;
+               use_vgroups = FALSE;
        }
        
        if (vgroup && vgroup[0] && use_vgroups) {
@@ -801,13 +803,15 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
         */
        if (target && target->type == OB_MESH) {
                /* if there's derived data without deformverts, don't use vgroups */
-               if (dm && !dm->getVertData(dm, 0, CD_MDEFORMVERT))
-                       use_vgroups = 0;
-               else
-                       use_vgroups = 1;
+               if (dm) {
+                       use_vgroups = (dm->getVertData(dm, 0, CD_MDEFORMVERT) != NULL);
+               }
+               else {
+                       use_vgroups = FALSE;
+               }
        }
        else {
-               use_vgroups = 0;
+               use_vgroups = FALSE;
        }
        
        if (vgroup && vgroup[0] && use_vgroups) {
index 7da0661fef62496d224be2d9532c6548195c97b6..bef5f2e18a369253bbdf5136a0b0f3ae2e806ca7 100644 (file)
@@ -351,7 +351,7 @@ void BKE_mball_texspace_calc(Object *ob)
        DispList *dl;
        BoundBox *bb;
        float *data, min[3], max[3] /*, loc[3], size[3] */;
-       int tot, doit = 0;
+       int tot, do_it = FALSE;
 
        if (ob->bb == NULL) ob->bb = MEM_callocN(sizeof(BoundBox), "mb boundbox");
        bb = ob->bb;
@@ -364,7 +364,7 @@ void BKE_mball_texspace_calc(Object *ob)
        dl = ob->disp.first;
        while (dl) {
                tot = dl->nr;
-               if (tot) doit = 1;
+               if (tot) do_it = TRUE;
                data = dl->verts;
                while (tot--) {
                        /* Also weird... but longer. From utildefines. */
@@ -374,7 +374,7 @@ void BKE_mball_texspace_calc(Object *ob)
                dl = dl->next;
        }
 
-       if (!doit) {
+       if (!do_it) {
                min[0] = min[1] = min[2] = -1.0f;
                max[0] = max[1] = max[2] = 1.0f;
        }
@@ -1135,11 +1135,11 @@ static int otherface(int edge, int face)
 
 static void makecubetable(void)
 {
-       static int isdone = 0;
+       static int is_done = FALSE;
        int i, e, c, done[12], pos[8];
 
-       if (isdone) return;
-       isdone = 1;
+       if (is_done) return;
+       is_done = TRUE;
 
        for (i = 0; i < 256; i++) {
                for (e = 0; e < 12; e++) done[e] = 0;
index f07de7f0127ef2e93033e90bca497df5b30df98e..5dcec603b916a052c862804807e3500af4c5a30e 100644 (file)
@@ -195,7 +195,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
 {
        struct ImBuf *ibuf;
        char name[FILE_MAX];
-       int loadflag, use_proxy = 0;
+       int loadflag, use_proxy = FALSE;
 
        use_proxy = (flag & MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL;
        if (use_proxy) {
index c6424580a31f91ff8229293ffa472bfef27723c2..8771e8de67e1efe1a26ed9fe0647cf8ec02da99d 100644 (file)
@@ -1392,7 +1392,7 @@ static int node_get_deplist_recurs(bNode *node, bNode ***nsort)
        bNodeSocket *sock;
        int level = 0xFFF;
        
-       node->done= 1;
+       node->done = TRUE;
        
        /* check linked nodes */
        for (sock= node->inputs.first; sock; sock= sock->next) {
@@ -1431,7 +1431,7 @@ void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, in
        
        /* first clear data */
        for (node= ntree->nodes.first; node; node= node->next) {
-               node->done= 0;
+               node->done = FALSE;
                (*totnodes)++;
        }
        if (*totnodes==0) {
@@ -1456,7 +1456,7 @@ static void ntree_update_node_level(bNodeTree *ntree)
        
        /* first clear tag */
        for (node= ntree->nodes.first; node; node= node->next) {
-               node->done= 0;
+               node->done = FALSE;
        }
        
        /* recursive check */
index 8676a3e75a025fd3c18926fc1c2536689e390290..4ca9f9c281b28874f5944d391f051c5bfe3d87ac 100644 (file)
@@ -614,7 +614,7 @@ typedef struct ParticleRenderData {
        float viewmat[4][4], winmat[4][4];
        int winx, winy;
 
-       int dosimplify;
+       int do_simplify;
        int timeoffset;
        ParticleRenderElem *elems;
        int *origindex;
@@ -821,7 +821,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
        if (data->elems)
                MEM_freeN(data->elems);
 
-       data->dosimplify = 1;
+       data->do_simplify = TRUE;
        data->elems = elems;
        data->origindex = origindex;
 
@@ -960,7 +960,7 @@ int psys_render_simplify_params(ParticleSystem *psys, ChildParticle *cpa, float
                return 0;
        
        data = psys->renderdata;
-       if (!data->dosimplify)
+       if (!data->do_simplify)
                return 0;
        
        b = (data->origindex) ? data->origindex[cpa->num] : cpa->num;
index 69808db52b64372795561c88e7a632cdedd3b951..f483fd7dc8accb0ec52250b133d449a608c477ad 100644 (file)
@@ -2732,7 +2732,7 @@ static void ptcache_dt_to_str(char *str, double dtime)
 
 static void *ptcache_bake_thread(void *ptr)
 {
-       int usetimer = 0, sfra, efra;
+       int use_timer = FALSE, sfra, efra;
        double stime, ptime, ctime, fetd;
        char run[32], cur[32], etd[32];
 
@@ -2752,8 +2752,8 @@ static void *ptcache_bake_thread(void *ptr)
 
                        fetd = (ctime-ptime)*(efra-*data->cfra_ptr)/data->step;
 
-                       if (usetimer || fetd > 60.0) {
-                               usetimer = 1;
+                       if (use_timer || fetd > 60.0) {
+                               use_timer = TRUE;
 
                                ptcache_dt_to_str(cur, ctime-ptime);
                                ptcache_dt_to_str(run, ctime-stime);
@@ -2765,7 +2765,7 @@ static void *ptcache_bake_thread(void *ptr)
                }
        }
 
-       if (usetimer) {
+       if (use_timer) {
                ptcache_dt_to_str(run, PIL_check_seconds_timer()-stime);
                printf("Bake %s %s (%i frames simulated).\n", (data->break_operation ? "canceled after" : "finished in"), run, *data->cfra_ptr-sfra);
        }
index 1f129b1c54745b4120b7fd0f6b33d3f2b7c8dd7d..4dfa9f7e12e082cb6a70d99288d2c086bd0b4bd4 100644 (file)
@@ -44,7 +44,8 @@
 #include "DNA_space_types.h"
 #include "DNA_view3d_types.h"
 
-#include "BLI_blenlib.h"
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_screen.h"
 
@@ -251,7 +252,7 @@ void BKE_spacedata_draw_locks(int set)
                        if (set) 
                                art->do_lock = art->lock;
                        else 
-                               art->do_lock = 0;
+                               art->do_lock = FALSE;
                }
        }
 }
index ca851fd4c8107763cb63504ef05399bd43e08cba..fac74d27e0deb772e7df77725272269fdc68a952 100644 (file)
@@ -291,9 +291,9 @@ static ImBuf *do_plugin_effect(
 {
        char *cp;
        int float_rendering;
-       int use_temp_bufs = 0; /* Are needed since blur.c (and maybe some other
-                               * old plugins) do very bad stuff
-                               * with imbuf-internals */
+       int use_temp_bufs = FALSE; /* Are needed since blur.c (and maybe some other
+                                   * old plugins) do very bad stuff
+                                   * with imbuf-internals */
 
        struct ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
        int x = context.rectx;
@@ -319,7 +319,7 @@ static ImBuf *do_plugin_effect(
                float_rendering = (out->rect_float != NULL);
 
                if (seq->plugin->version <= 3 && float_rendering) {
-                       use_temp_bufs = 1;
+                       use_temp_bufs = TRUE;
 
                        if (ibuf1) {
                                ibuf1 = IMB_dupImBuf(ibuf1);
index 41858eeecb4395ab8c70e74f67cbad93c0c2b9a0..a762af960a56080e40daae1966e32b2611982103 100644 (file)
@@ -1464,7 +1464,7 @@ void seq_proxy_rebuild(SeqIndexBuildContext *context, short *stop, short *do_upd
 
                *progress = (float)cfra / (seq->enddisp - seq->endstill -
                                           seq->startdisp + seq->startstill);
-               *do_update = 1;
+               *do_update = TRUE;
 
                if (*stop || G.afbreek)
                        break;
index 1041fb123052031de4022e5453c6384d54fd56b6..fe7ec83407b3140b27d9db3c7a84d78d0f73e6fa 100644 (file)
@@ -1685,7 +1685,7 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,
                else
                        sb_threads[i].ifirst  = 0;
                sb_threads[i].do_effector = do_effector;
-               sb_threads[i].do_deflector = 0;// not used here
+               sb_threads[i].do_deflector = FALSE;// not used here
                sb_threads[i].fieldfactor = 0.0f;// not used here
                sb_threads[i].windfactor  = 0.0f;// not used here
                sb_threads[i].nr= i;
index aec54ba827a83655c448734b0471400bb59c6e4f..ad5bb24e541f2380fd2a49e8bd6099b79abfc964 100644 (file)
@@ -1788,12 +1788,12 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
        int gridFaces = gridSize - 1;
        int edgeSize = ccgSubSurf_getEdgeSize(ss);
        DMFlagMat *faceFlags = ccgdm->faceFlags;
-       int a, b, i, doDraw, numVerts, matnr, new_matnr, totface;
+       int a, b, i, do_draw, numVerts, matnr, new_matnr, totface;
 
        CCG_key_top_level(&key, ss);
        ccgdm_pbvh_update(ccgdm);
 
-       doDraw = 0;
+       do_draw = 0;
        matnr = -1;
 
 #define PASSATTRIB(dx, dy, vert) {                                            \
@@ -1837,12 +1837,12 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
                }
 
                if (new_matnr != matnr) {
-                       doDraw = setMaterial(matnr = new_matnr, &gattribs);
-                       if (doDraw)
+                       do_draw = setMaterial(matnr = new_matnr, &gattribs);
+                       if (do_draw)
                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
                }
 
-               if (!doDraw || (setDrawOptions && (origIndex != ORIGINDEX_NONE) &&
+               if (!do_draw || (setDrawOptions && (origIndex != ORIGINDEX_NONE) &&
                                (setDrawOptions(userData, origIndex) == DM_DRAW_OPTION_SKIP)))
                {
                        a += gridFaces * gridFaces * numVerts;
index 7634528927adfc0f1ff309d605aef76b184e3fc2..32cf966b7fd26a669d193928ff8d99de25116416 100644 (file)
@@ -912,7 +912,7 @@ void txt_move_left(Text *text, short sel)
 void txt_move_right(Text *text, short sel) 
 {
        TextLine **linep;
-       int *charp, oundoing = undoing, do_tab = 0, i;
+       int *charp, oundoing = undoing, do_tab = FALSE, i;
        
        if (!text) return;
        if (sel) txt_curs_sel(text, &linep, &charp);
@@ -931,10 +931,10 @@ void txt_move_right(Text *text, short sel)
                // do nice right only if there are only spaces
                // spaces hardcoded in DNA_text_types.h
                if (text->flags & TXT_TABSTOSPACES && (*linep)->line[*charp] == ' ') {
-                       do_tab = 1;
+                       do_tab = TRUE;
                        for (i = 0; i < *charp; i++)
                                if ((*linep)->line[i] != ' ') {
-                                       do_tab = 0;
+                                       do_tab = FALSE;
                                        break;
                                }
                }
index 4e194b24c1e7929c753cea421f39af3ab0afa5b6..785c9f9f32b0c4d91da0adc2d140fcf40142279e 100644 (file)
@@ -240,7 +240,7 @@ void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg)
 
                internalDocPrint(d);
 
-               d->done = 1;
+               d->done = TRUE;
        }
 }
 
index 18c69bd2ba8bca1449df03bcbc151af9b403e611..1b59dc6a3f5396a9ce14dc0976ba0e6be45e612e 100644 (file)
@@ -58,7 +58,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo
 
        if (uci->do_pano) {
                float angle = atan2f(pv4[0], -pv4[2]) / ((float)M_PI * 2.0f); /* angle around the camera */
-               if (uci->do_persp == 0) {
+               if (uci->do_persp == FALSE) {
                        target[0] = angle; /* no correct method here, just map to  0-1 */
                        target[1] = pv4[1] / uci->camsize;
                }
@@ -74,7 +74,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo
                if (pv4[2] == 0.0f)
                        pv4[2] = 0.00001f;  /* don't allow div by 0 */
 
-               if (uci->do_persp == 0) {
+               if (uci->do_persp == FALSE) {
                        target[0] = (pv4[0] / uci->camsize);
                        target[1] = (pv4[1] / uci->camsize);
                }
@@ -154,10 +154,10 @@ ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float w
                /* normal projection */
                if (rotmat) {
                        copy_m4_m4(uci.rotmat, rotmat);
-                       uci.do_rotmat = 1;
+                       uci.do_rotmat = TRUE;
                }
                else {
-                       uci.do_rotmat = 0;
+                       uci.do_rotmat = FALSE;
                }
 
                /* also make aspect ratio adjustment factors */
index 01303eeb7352f1366e04bf56584247ec62b5b295..2b5eebb0f73e6c66682382c13001469b608e14bf 100644 (file)
@@ -5023,7 +5023,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                        
                        seq->strip = newdataadr(fd, seq->strip);
                        if (seq->strip && seq->strip->done==0) {
-                               seq->strip->done = 1;
+                               seq->strip->done = TRUE;
                                
                                if (seq->type == SEQ_IMAGE ||
                                   seq->type == SEQ_MOVIE ||
@@ -5732,7 +5732,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
        ar->swinid = 0;
        ar->type = NULL;
        ar->swap = 0;
-       ar->do_draw = 0;
+       ar->do_draw = FALSE;
        memset(&ar->drawrct, 0, sizeof(ar->drawrct));
 }
 
@@ -8537,12 +8537,12 @@ static void expand_main(FileData *fd, Main *mainvar)
 {
        ListBase *lbarray[MAX_LIBARRAY];
        ID *id;
-       int a, doit = 1;
+       int a, do_it = TRUE;
        
        if (fd == NULL) return;
        
-       while (doit) {
-               doit = 0;
+       while (do_it) {
+               do_it = FALSE;
                
                a = set_listbasepointers(mainvar, lbarray);
                while (a--) {
@@ -8618,7 +8618,7 @@ static void expand_main(FileData *fd, Main *mainvar)
                                                break;
                                        }
                                        
-                                       doit = 1;
+                                       do_it = TRUE;
                                        id->flag -= LIB_TEST;
                                        
                                }
@@ -8655,15 +8655,15 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const
                         *
                         * (ob->id.flag & LIB_PRE_EXISTING)==0 means that this is a newly appended object - Campbell */
                        if (is_group_append==0 || (ob->id.flag & LIB_PRE_EXISTING)==0) {
-                               int do_it= 0;
+                               int do_it = FALSE;
                                
                                if (ob->id.us == 0) {
-                                       do_it = 1;
+                                       do_it = TRUE;
                                }
                                else if (idcode==ID_GR) {
                                        if (ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) {
                                                if ((ob->flag & OB_FROMGROUP) && object_in_any_scene(mainvar, ob)==0) {
-                                                       do_it = 1;
+                                                       do_it = TRUE;
                                                }
                                        }
                                }
@@ -8675,7 +8675,7 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const
                                                 *  have a linked object which is not in any scene [#27616] */
                                                if ((ob->id.flag & LIB_PRE_EXISTING)==0) {
                                                        if (object_in_any_scene(mainvar, ob)==0) {
-                                                               do_it = 1;
+                                                               do_it = TRUE;
                                                        }
                                                }
                                        }
@@ -8971,10 +8971,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
        Main *mainl = mainlist->first;
        Main *mainptr;
        ListBase *lbarray[MAX_LIBARRAY];
-       int a, doit= 1;
+       int a, do_it = TRUE;
        
-       while (doit) {
-               doit = 0;
+       while (do_it) {
+               do_it = FALSE;
                
                /* test 1: read libdata */
                mainptr= mainl->next;
@@ -9040,7 +9040,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                        }
                                }
                                if (fd) {
-                                       doit = 1;
+                                       do_it = TRUE;
                                        a = set_listbasepointers(mainptr, lbarray);
                                        while (a--) {
                                                ID *id = lbarray[a]->first;
index 8a8705532cb8b4b44dd8eb1898c86cf8111251c4..4cf17b2c24cfc48ecd022736ea586284d9989e03 100644 (file)
@@ -1084,7 +1084,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                World *wo;
                Tex *tex;
                ParticleSettings *part;
-               int do_gravity = 0;
+               int do_gravity = FALSE;
 
                for (sce = main->scene.first; sce; sce = sce->id.next)
                        if (sce->unit.scale_length == 0.0f)
@@ -1140,7 +1140,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
                                sce->physics_settings.gravity[2] = -9.81f;
                                sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
-                               do_gravity = 1;
+                               do_gravity = TRUE;
                        }
                }
 
index f065ae238a6cb3c0db30bb478eeaaaa1d3ec6ccd..02ebc91f1911628dc9c16c9ba62e2afce8f834bf 100644 (file)
@@ -2141,7 +2141,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
                        
                        SEQ_BEGIN (ed, seq)
                        {
-                               if (seq->strip) seq->strip->done= 0;
+                               if (seq->strip) seq->strip->done = FALSE;
                                writestruct(wd, DATA, "Sequence", 1, seq);
                        }
                        SEQ_END
@@ -2191,7 +2191,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
                                        else if (seq->type==SEQ_MOVIE || seq->type==SEQ_RAM_SOUND || seq->type == SEQ_HD_SOUND)
                                                writestruct(wd, DATA, "StripElem", 1, strip->stripdata);
                                        
-                                       strip->done= 1;
+                                       strip->done = TRUE;
                                }
                        }
                        SEQ_END
@@ -2467,11 +2467,11 @@ static void write_libraries(WriteData *wd, Main *main)
                a=tot= set_listbasepointers(main, lbarray);
 
                /* test: is lib being used */
-               foundone= 0;
+               foundone = FALSE;
                while (tot--) {
                        for (id= lbarray[tot]->first; id; id= id->next) {
                                if (id->us>0 && (id->flag & LIB_EXTERN)) {
-                                       foundone= 1;
+                                       foundone = TRUE;
                                        break;
                                }
                        }
index c4cbb19eef7428d346de45b642eaf29d28af63af..2c7007d19618a6a34708e7f23b4f915c48b8be9d 100644 (file)
@@ -161,10 +161,10 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
        }
 
        if (keepedge) {
-               int done = 0;
+               int done = FALSE;
 
                while (!done) {
-                       done = 1;
+                       done = TRUE;
                        e = v->e;
                        do {
                                f = NULL;
@@ -180,7 +180,7 @@ int BM_disk_dissolve(BMesh *bm, BMVert *v)
                                }
 
                                if (f) {
-                                       done = 0;
+                                       done = FALSE;
                                        break;
                                }
                                e = bmesh_disk_edge_next(e, v);
index 6f6db3ce239d0776d74e377ec597a63ce6069876..72eb4cb89e9b13ebbba7ad261ef95fcedb6b7472 100644 (file)
@@ -776,12 +776,12 @@ void BM_face_triangulate(BMesh *bm, BMFace *f, float (*projectverts)[3],
                projectverts[i][2] = 0.0f;
        }
 
-       done = 0;
+       done = FALSE;
        while (!done && f->len > 3) {
-               done = 1;
+               done = TRUE;
                l_iter = find_ear(f, projectverts, nvert, use_beauty);
                if (l_iter) {
-                       done = 0;
+                       done = FALSE;
                        /* v = l->v; */ /* UNUSED */
                        f = BM_face_split(bm, l_iter->f, l_iter->prev->v,
                                          l_iter->next->v,
index 101614d609c148cdb84b57f98b0661ae8c55670d..07e413985bf8671ee800453ddc91624c0e87d975 100644 (file)
@@ -155,9 +155,9 @@ static void BME_Bevel_Dissolve_Disk(BMesh *bm, BMVert *v)
        int done;
 
        if (v->e) {
-               done = 0;
+               done = FALSE;
                while (!done) {
-                       done = 1;
+                       done = TRUE;
                        e = v->e; /*loop the edge looking for a edge to dissolve*/
                        do {
                                f = NULL;
@@ -165,7 +165,7 @@ static void BME_Bevel_Dissolve_Disk(BMesh *bm, BMVert *v)
                                        f = bmesh_jfke(bm, e->l->f, e->l->radial_next->f, e);
                                }
                                if (f) {
-                                       done = 0;
+                                       done = FALSE;
                                        break;
                                }
                                e = bmesh_disk_edge_next(e, v);
index 2e683d4d57b5f0bd4e67252fa1b94646b7ba24e5..dd9a0600725e3d4839a60184040547c3b7dbc06f 100644 (file)
@@ -2968,7 +2968,7 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
        Scene *scene = CTX_data_scene(C);
        PointerRNA id_ptr, ptr;
        PropertyRNA *prop;
-       short flag = 0, done = 0;
+       short flag = 0, done = FALSE;
        float cfra;
        
        /* get current frame */
@@ -3006,7 +3006,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
        Scene *scene = CTX_data_scene(C);
        PointerRNA id_ptr, ptr;
        PropertyRNA *prop;
-       short flag = 0, done = 0;
+       short flag = 0, done = FALSE;
        float cfra;
        
        /* get current frame */
index df8c1d2907920ca9bef57e2a7ecef58be94677fa..159c4681951bb483a1bf3087e9e0c33351667ae9 100644 (file)
@@ -840,7 +840,7 @@ static short rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp r
 {
        ListBase islands = {NULL, NULL};
        Link *channel, *chanNext = NULL;
-       short done = 0;
+       short done = FALSE;
        
        /* don't waste effort on an empty list */
        if (list->first == NULL)
@@ -866,7 +866,7 @@ static short rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp r
                        /* perform rearranging */
                        if (rearrange_func(&islands, island)) {
                                island->flag |= REORDER_ISLAND_MOVED;
-                               done = 1;
+                               done = TRUE;
                        }
                }
        }
index 0cc92394a401d088cd232890865146b3127784e8..416df6bccba78ba53f34b85e1a83753d9c606551 100644 (file)
@@ -141,7 +141,7 @@ short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int ar
        PropertyRNA *prop;
        FCurve *fcu;
        int array_index_max;
-       int done = 0;
+       int done = FALSE;
        
        /* validate pointer first - exit if failure */
        RNA_id_pointer_create(id, &id_ptr);
index 7ce2988b067b2d55445fa6da42d09fe9d2abc386..ac5af846900deca25330bcc7a2b4d5c9599bbdce 100644 (file)
@@ -3325,9 +3325,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
        for (ebone = arm->edbo->first; ((ebone) && (ebone != first)); ebone = ebone->next) {
                if (EBONE_VISIBLE(arm, ebone)) {
                        /* we extrude per definition the tip */
-                       do_extrude = 0;
+                       do_extrude = FALSE;
                        if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED))
-                               do_extrude = 1;
+                               do_extrude = TRUE;
                        else if (ebone->flag & BONE_ROOTSEL) {
                                /* but, a bone with parent deselected we do the root... */
                                if (ebone->parent && (ebone->parent->flag & BONE_TIPSEL)) ;
@@ -3361,7 +3361,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
                                        totbone++;
                                        newbone = MEM_callocN(sizeof(EditBone), "extrudebone");
                                        
-                                       if (do_extrude == 1) {
+                                       if (do_extrude == TRUE) {
                                                copy_v3_v3(newbone->head, ebone->tail);
                                                copy_v3_v3(newbone->tail, newbone->head);
                                                newbone->parent = ebone;
index e9c960c4080f0a2a3e8dcd1039642e8634a5f44d..f18fa2f8bf800222ccad99b535643218525da053 100644 (file)
@@ -1451,7 +1451,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
        ScrArea *sa = CTX_wm_area(C);
        Object *ob;
        bPose *pose;
-       short done = 0;
+       short done = FALSE;
        
        /* since this call may also be used from the buttons window, we need to check for where to get the object */
        if (sa->spacetype == SPACE_BUTS) 
@@ -1476,7 +1476,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
        CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
        {
                pchan->agrp_index = pose->active_group;
-               done = 1;
+               done = TRUE;
        }
        CTX_DATA_END;
 
@@ -1514,7 +1514,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
 {
        ScrArea *sa = CTX_wm_area(C);
        Object *ob;
-       short done = 0;
+       short done = FALSE;
        
        /* since this call may also be used from the buttons window, we need to check for where to get the object */
        if (sa->spacetype == SPACE_BUTS) 
@@ -1531,7 +1531,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
        {
                if (pchan->agrp_index) {
                        pchan->agrp_index = 0;
-                       done = 1;
+                       done = TRUE;
                }
        }
        CTX_DATA_END;
index 316c4699c0b3abc4d1ba60484491933fe9f58466..3f056f9638cb29e13e3cfc236c98526fadccc760 100644 (file)
@@ -1818,7 +1818,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
 
 static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external)
 {
-       int done = 1;
+       int done = TRUE;
        
        calculateGraphLength(rg);
 
@@ -1833,7 +1833,7 @@ static void filterGraph(ReebGraph *rg, short options, float threshold_internal,
        if (threshold_internal > 0 || threshold_external > 0) {
                /* filter until there's nothing more to do */
                while (done == 1) {
-                       done = 0; /* no work done yet */
+                       done = FALSE; /* no work done yet */
                        
                        done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external);
                }
index 82b6ef641b6a4d298123d9e57f767350ce2aaed7..4f0274fbd4676da362dfcdb90ce7ed30215c4434 100644 (file)
@@ -5222,7 +5222,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
                        but->block->auto_open = FALSE;
 
        if (type == BUTTON_ACTIVATE_OVER) {
-               data->used_mouse = 1;
+               data->used_mouse = TRUE;
        }
        button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
        
@@ -5845,7 +5845,7 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
                else {
                        if (ISKEYBOARD(event->type)) {
                                /* keyboard menu hierarchy navigation, going back to previous level */
-                               but->active->used_mouse = 0;
+                               but->active->used_mouse = FALSE;
                                button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
                        }
                        else {
index 958ee9f5420170969de083b37f882d329de75007..4c2d86de502db2d2547bbeec8079a4636efde58e 100644 (file)
@@ -2679,7 +2679,7 @@ void ui_layout_add_but(uiLayout *layout, uiBut *but)
 
        if (layout->context) {
                but->context = layout->context;
-               but->context->used = 1;
+               but->context->used = TRUE;
        }
 }
 
index f2a43580fd87a7b010b65496e8367fb0c0128520..dfd2d0cc4d0b9c8780b898435fd03c1268061d6a 100644 (file)
@@ -368,7 +368,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot)
 
 static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb, int *use_path)
 {
-       *use_path = 0;
+       *use_path = FALSE;
 
        if (RNA_struct_is_a(ptr->type, &RNA_EditBone))
                *lb = CTX_data_collection_get(C, "selected_editable_bones");
@@ -381,7 +381,7 @@ static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb, int
 
                if (id && GS(id->name) == ID_OB) {
                        *lb = CTX_data_collection_get(C, "selected_editable_objects");
-                       *use_path = 1;
+                       *use_path = TRUE;
                }
                else
                        return 0;
index dc2c3b4eea9cd34c54565de6045ab52f439cfbe9..cbe4450526391d0f8e8711dfc51208ef488d7542 100644 (file)
@@ -754,14 +754,14 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
        }
        
        /* we interpolate */
-       done = 0;
+       done = FALSE;
        ps = panelsort;
        for (a = 0; a < tot; a++, ps++) {
                if ((ps->pa->flag & PNL_SELECT) == 0) {
                        if ((ps->orig->ofsx != ps->pa->ofsx) || (ps->orig->ofsy != ps->pa->ofsy)) {
                                ps->orig->ofsx = floorf(0.5f + fac * (float)ps->pa->ofsx + (1.0f - fac) * (float)ps->orig->ofsx);
                                ps->orig->ofsy = floorf(0.5f + fac * (float)ps->pa->ofsy + (1.0f - fac) * (float)ps->orig->ofsy);
-                               done = 1;
+                               done = TRUE;
                        }
                }
        }
index 1589bbc123f2a4f7a3da4e29ba23d1fb613bfe54..bf57dda44bfd0c8cfeea8c939a30803fe41b5313 100644 (file)
@@ -1746,7 +1746,7 @@ void init_userdef_do_versions(void)
                        rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
                }
                
-               U.use_16bit_textures = 1;
+               U.use_16bit_textures = TRUE;
        }
 
        if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 2)) {
index ed010dc973a1aeb5660ad140710575618577a936..2eea7f50f333ed3293d2a7b6b1f6753531be4a9a 100644 (file)
@@ -419,14 +419,14 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
        
        /* check if we should restore aspect ratio (if view size changed) */
        if (v2d->keepzoom & V2D_KEEPASPECT) {
-               short do_x = 0, do_y = 0, do_cur /* , do_win */ /* UNUSED */;
+               short do_x = FALSE, do_y = FALSE, do_cur /* , do_win */ /* UNUSED */;
                float /* curRatio, */ /* UNUSED */ winRatio;
                
                /* when a window edge changes, the aspect ratio can't be used to
                 * find which is the best new 'cur' rect. thats why it stores 'old' 
                 */
-               if (winx != v2d->oldwinx) do_x = 1;
-               if (winy != v2d->oldwiny) do_y = 1;
+               if (winx != v2d->oldwinx) do_x = TRUE;
+               if (winy != v2d->oldwiny) do_y = TRUE;
                
                /* curRatio= height / width; */ /* UNUSED */
                winRatio = winy / winx;
@@ -435,11 +435,11 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                if (do_x == do_y) {
                        if (do_x && do_y) {
                                /* here is 1,1 case, so all others must be 0,0 */
-                               if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = 0;
-                               else do_x = 0;
+                               if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = FALSE;
+                               else do_x = FALSE;
                        }
-                       else if (winRatio > 1.0f) do_x = 0;
-                       else do_x = 1;
+                       else if (winRatio > 1.0f) do_x = FALSE;
+                       else do_x = TRUE;
                }
                do_cur = do_x;
                /* do_win= do_y; */ /* UNUSED */
index 63704f5b8e67b62d0592dde25428e7d5dd06eb24..c223c146b4b85c70c46b20438054c06efda1925c 100644 (file)
@@ -231,7 +231,7 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
        MLoop *ml;
        MEdge *med;
        char *linkflag;
-       int a, b, doit = 1, mark = 0;
+       int a, b, do_it = TRUE, mark = 0;
 
        ehash = BLI_edgehash_new();
        seamhash = BLI_edgehash_new();
@@ -259,8 +259,8 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
                }
        }
 
-       while (doit) {
-               doit = 0;
+       while (do_it) {
+               do_it = FALSE;
 
                /* expand selection */
                mp = me->mpoly;
@@ -283,7 +283,7 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
                                if (mark) {
                                        linkflag[a] = 1;
                                        hash_add_face(ehash, mp, me->mloop + mp->loopstart);
-                                       doit = 1;
+                                       do_it = TRUE;
                                }
                        }
                }
index 57f663aa571e2a554ae4fbb8932da17d9a1b2e93..1b3e4adff3a2547c932aaef9635f2e832ca0a250 100644 (file)
@@ -722,7 +722,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
        BMVert *v1;
        BMIter iter;
        float min[3], max[3];
-       int done = 0;
+       int done = FALSE;
        short use_proj;
        
        em_setup_viewcontext(C, &vc);
@@ -735,7 +735,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
        BM_ITER_MESH (v1, &iter, vc.em->bm, BM_VERTS_OF_MESH) {
                if (BM_elem_flag_test(v1, BM_ELEM_SELECT)) {
                        minmax_v3v3_v3(min, max, v1->co);
-                       done = 1;
+                       done = TRUE;
                }
        }
 
@@ -753,7 +753,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                mval_f[1] = (float)event->mval[1];
 
                /* check for edges that are half selected, use for rotation */
-               done = 0;
+               done = FALSE;
                BM_ITER_MESH (eed, &iter, vc.em->bm, BM_EDGES_OF_MESH) {
                        if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                                float co1[3], co2[3];
@@ -776,7 +776,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                                        nor[1] += -(co2[0] - co1[0]);
                                }
                        }
-                       done = 1;
+                       done = TRUE;
                }
 
                if (done) {
index 69aae5c4f060abee7d2e31ab558410dd3df2ad3d..fe5fafb0ca027ae85694c06cd55b6f8bbec70a05 100644 (file)
@@ -735,7 +735,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
 
        if (BKE_scene_use_new_shading_nodes(scene)) {
                ED_node_shader_default(scene, &la->id);
-               la->use_nodes = 1;
+               la->use_nodes = TRUE;
        }
        
        return OPERATOR_FINISHED;
@@ -901,7 +901,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
        const short use_global = RNA_boolean_get(op->ptr, "use_global");
-       /* int islamp= 0; */ /* UNUSED */
+       /* int is_lamp = FALSE; */ /* UNUSED */
        
        if (CTX_data_edit_object(C)) 
                return OPERATOR_CANCELLED;
@@ -909,7 +909,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
        CTX_DATA_BEGIN (C, Base *, base, selected_bases)
        {
 
-               /* if (base->object->type==OB_LAMP) islamp= 1; */
+               /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */
 
                /* deselect object -- it could be used in other scenes */
                base->object->flag &= ~SELECT;
index cea9a0aae6b60ce3a34cbc940bf394096316ab41..b89562e772b98abd98f4e4f2693f889432328701 100644 (file)
@@ -434,7 +434,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, MPassKnownData
                        bkr->baked_faces++;
 
                        if (bkr->do_update)
-                               *bkr->do_update = 1;
+                               *bkr->do_update = TRUE;
 
                        if (bkr->progress)
                                *bkr->progress = ((float)bkr->baked_objects + (float)bkr->baked_faces / tot_face) / bkr->tot_obj;
index c97ad9c62f9779d1115db22e8a17075a2718b6b9..107b19b0ed70e4a9e6d25c487610a68714d1efde 100644 (file)
@@ -764,7 +764,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
        Base *base;
        Curve *cu, *cu1;
        Nurb *nu;
-       int do_scene_sort = 0;
+       int do_scene_sort = FALSE;
        
        if (scene->id.lib) return;
 
@@ -949,7 +949,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
                                        /* Copy the constraint channels over */
                                        copy_constraints(&base->object->constraints, &ob->constraints, TRUE);
                                        
-                                       do_scene_sort = 1;
+                                       do_scene_sort = TRUE;
                                }
                                else if (event == 23) {
                                        base->object->softflag = ob->softflag;
@@ -1284,7 +1284,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
        Curve *cu;
        Nurb *nu;
        int clear = (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0);
-       int done = 0;
+       int done = FALSE;
 
        CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
        {
@@ -1295,7 +1295,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
-                       done = 1;
+                       done = TRUE;
                }
                else if (ELEM(ob->type, OB_SURF, OB_CURVE)) {
                        cu = ob->data;
@@ -1308,7 +1308,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
-                       done = 1;
+                       done = TRUE;
                }
        }
        CTX_DATA_END;
@@ -1369,7 +1369,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d)
        for (base = FIRSTBASE; base; base = base->next) {
                if (TESTBASELIB(v3d, base)) {
                        ob = base->object;
-                       done = 0;
+                       done = FALSE;
                        
                        for (a = 1; a <= ob->totcol; a++) {
                                ma = give_current_material(ob, a);
@@ -1398,7 +1398,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d)
                                                                if (x > y) ob->size[0] = ob->size[1] * x / y;
                                                                else ob->size[1] = ob->size[0] * y / x;
                                                                
-                                                               done = 1;
+                                                               done = TRUE;
                                                                DAG_id_tag_update(&ob->id, OB_RECALC_OB);                                                               
                                                        }
                                                }
index 191677989b9c6ac073611811e2a2c050be0ebfac..0aa7e1083c3c54a70632b729860f4667fb60ae05 100644 (file)
@@ -1530,7 +1530,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel)
        if (oceanbake_breakjob(oj))
                *cancel = 1;
        
-       *(oj->do_update) = 1;
+       *(oj->do_update) = TRUE;
        *(oj->progress) = progress;
 }
 
@@ -1546,7 +1546,7 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update,
        
        BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj);
        
-       *do_update = 1;
+       *do_update = TRUE;
        *stop = 0;
 }
 
index b7dc3fd7bea4ac2a8cd196b7bc0107d7b9c33419..d618d17f797a5eff7e75cf0c448e31364030dc04 100644 (file)
@@ -429,7 +429,7 @@ void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyM
                RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_edit_falloff");
 
                // Object mode
-               if (do_pet == 1) {
+               if (do_pet == TRUE) {
 
                        kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, 0, 0);
                        RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_proportional_edit_objects");
index b3e16c8d4ebd7a3c86d8c1a46086245e08196398..2b622b21d2c6dc9622d508b92b20e8a75969c9ae 100644 (file)
@@ -1108,7 +1108,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
        View3D *v3d = CTX_wm_view3d(C);
        unsigned int lay, local;
-       /* int islamp= 0; */ /* UNUSED */
+       /* int is_lamp = FALSE; */ /* UNUSED */
        
        lay = move_to_layer_init(C, op);
        lay &= 0xFFFFFF;
@@ -1125,7 +1125,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
                        base->object->lay = lay;
                        base->object->flag &= ~SELECT;
                        base->flag &= ~SELECT;
-                       /* if (base->object->type==OB_LAMP) islamp= 1; */
+                       /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */
                }
                CTX_DATA_END;
        }
@@ -1138,7 +1138,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
                        local = base->lay & 0xFF000000;
                        base->lay = lay + local;
                        base->object->lay = lay;
-                       /* if (base->object->type==OB_LAMP) islamp= 1; */
+                       /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */
                }
                CTX_DATA_END;
        }
index 5a56672f7664c8bbb1ad4e08b9b8befa1f6fe483..d9d5852eb6d0490235601185fd6732f6bc4a9d89 100644 (file)
@@ -750,8 +750,8 @@ static void fluidbake_updatejob(void *customdata, float progress)
 {
        FluidBakeJob *fb= (FluidBakeJob *)customdata;
        
-       *(fb->do_update)= 1;
-       *(fb->progress)= progress;
+       *(fb->do_update) = TRUE;
+       *(fb->progress) = progress;
 }
 
 static void fluidbake_startjob(void *customdata, short *stop, short *do_update, float *progress)
@@ -765,7 +765,7 @@ static void fluidbake_startjob(void *customdata, short *stop, short *do_update,
        G.afbreek= 0;   /* XXX shared with render - replace with job 'stop' switch */
        
        elbeemSimulate();
-       *do_update= 1;
+       *do_update = TRUE;
        *stop = 0;
 }
 
index 595b51d22c4814fe1b7b09cf06298fea75cdffe0..7b4dda1a48fd8cbc8c8a501469596452643f49c4 100644 (file)
@@ -340,7 +340,7 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
        RE_ReleaseResult(rj->re);
 
        /* make jobs timer to send notifier */
-       *(rj->do_update) = 1;
+       *(rj->do_update) = TRUE;
 
 }
 
@@ -352,7 +352,7 @@ static void render_progress_update(void *rjv, float progress)
                *rj->progress = progress;
 
                /* make jobs timer to send notifier */
-               *(rj->do_update) = 1;
+               *(rj->do_update) = TRUE;
        }
 }
 
@@ -372,7 +372,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
                image_buffer_rect_update(rj->scene, rr, ibuf, renrect);
 
                /* make jobs timer to send notifier */
-               *(rj->do_update) = 1;
+               *(rj->do_update) = TRUE;
        }
        BKE_image_release_ibuf(ima, lock);
 }
index f7024444e86844b4ee8c832f8d5cd3e2ea8c845c..6357cb48a3d2c85f4ced49bda3fb67299f5421b9 100644 (file)
@@ -473,7 +473,7 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
        Render *re;
        RenderResult rres;
        char name[32];
-       int do_gamma_correct = 0, do_predivide = 0;
+       int do_gamma_correct = FALSE, do_predivide = FALSE;
        int offx = 0, newx = rect->xmax - rect->xmin, newy = rect->ymax - rect->ymin;
 
        if (id && GS(id->name) != ID_TE) {
@@ -583,7 +583,7 @@ static void shader_preview_draw(void *spv, RenderResult *UNUSED(rr), volatile st
 {
        ShaderPreview *sp = spv;
        
-       *(sp->do_update) = 1;
+       *(sp->do_update) = TRUE;
 }
 
 /* called by renderer, checks job value */
@@ -737,7 +737,7 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd
        else
                shader_preview_render(sp, sp->id, 0, 0);
 
-       *do_update = 1;
+       *do_update = TRUE;
 }
 
 static void shader_preview_free(void *customdata)
@@ -910,7 +910,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
                
                icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect);
 
-               *do_update = 1;
+               *do_update = TRUE;
        }
        else if (idtype == ID_BR) {
                Brush *br = (Brush *)id;
@@ -924,7 +924,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
 
                icon_copy_rect(br->icon_imbuf, sp->sizex, sp->sizey, sp->pr_rect);
 
-               *do_update = 1;
+               *do_update = TRUE;
        }
        else {
                /* re-use shader job */
index 95312c07df1f63c6991f23f17194d924d0a8d521..21cd02c96f2a40878694edde4422f5c79f3c50c6 100644 (file)
@@ -379,7 +379,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
 
                if (BKE_scene_use_new_shading_nodes(scene)) {
                        ED_node_shader_default(scene, &ma->id);
-                       ma->use_nodes = 1;
+                       ma->use_nodes = TRUE;
                }
        }
 
@@ -479,7 +479,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
 
                if (BKE_scene_use_new_shading_nodes(scene)) {
                        ED_node_shader_default(scene, &wo->id);
-                       wo->use_nodes = 1;
+                       wo->use_nodes = TRUE;
                }
        }
 
index 0f286d91613d30da91a42e62e538290d49737a7c..9771fef2d58904c9c2c7a8a866a183849e922b59 100644 (file)
@@ -145,7 +145,7 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa)
        if (sa->type && sa->type->refresh) {
                sa->type->refresh(C, sa);
        }
-       sa->do_refresh = 0;
+       sa->do_refresh = FALSE;
 }
 
 /* based on screen region draw tags, set draw tags in azones, and future region tabs etc */
@@ -162,7 +162,7 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
 
                /* test if inside */
                if (BLI_in_rcti(&ar->winrct, xs, ys)) {
-                       az->do_draw = 1;
+                       az->do_draw = TRUE;
                }
        }
 }
@@ -384,7 +384,7 @@ void ED_area_overdraw(bContext *C)
                                        }
                                }
                                
-                               az->do_draw = 0;
+                               az->do_draw = FALSE;
                        }
                }
        }       
@@ -487,7 +487,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
 
        ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
 
-       ar->do_draw = 0;
+       ar->do_draw = FALSE;
        memset(&ar->drawrct, 0, sizeof(ar->drawrct));
        
        uiFreeInactiveBlocks(C, &ar->uiblocks);
@@ -559,7 +559,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
 void ED_area_tag_refresh(ScrArea *sa)
 {
        if (sa)
-               sa->do_refresh = 1;
+               sa->do_refresh = TRUE;
 }
 
 /* *************************************************************** */
index d714f82b58bc8d6040eac0432b9fe38d2adaf85b..3a2498d3fa233130d0eb5da747580cea48fc15a6 100644 (file)
@@ -421,7 +421,7 @@ bScreen *ED_screen_add(wmWindow *win, Scene *scene, const char *name)
        
        sc = BKE_libblock_alloc(&G.main->screen, ID_SCR, name);
        sc->scene = scene;
-       sc->do_refresh = 1;
+       sc->do_refresh = TRUE;
        sc->redraws_flag = TIME_ALL_3D_WIN | TIME_ALL_ANIM_WIN;
        sc->winid = win->winid;
 
@@ -970,16 +970,16 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note)
        switch (note->category) {
                case NC_WM:
                        if (note->data == ND_FILEREAD)
-                               win->screen->do_draw = 1;
+                               win->screen->do_draw = TRUE;
                        break;
                case NC_WINDOW:
-                       win->screen->do_draw = 1;
+                       win->screen->do_draw = TRUE;
                        break;
                case NC_SCREEN:
                        if (note->data == ND_SUBWINACTIVE)
                                uiFreeActiveButtons(C, win->screen);
                        if (note->action == NA_EDITED)
-                               win->screen->do_draw = win->screen->do_refresh = 1;
+                               win->screen->do_draw = win->screen->do_refresh = TRUE;
                        break;
                case NC_SCENE:
                        if (note->data == ND_MODE)
@@ -1055,7 +1055,7 @@ void ED_screen_draw(wmWindow *win)
                glDisable(GL_BLEND);
        }
        
-       win->screen->do_draw = 0;
+       win->screen->do_draw = FALSE;
 }
 
 /* helper call for below, dpi changes headers */
@@ -1108,7 +1108,7 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
        if (G.debug & G_DEBUG_EVENTS) {
                printf("%s: set screen\n", __func__);
        }
-       win->screen->do_refresh = 0;
+       win->screen->do_refresh = FALSE;
 
        win->screen->context = ed_screen_context;
 }
@@ -1276,11 +1276,11 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
                if (oldswin != scr->subwinactive) {
 
                        for (sa = scr->areabase.first; sa; sa = sa->next) {
-                               int do_draw = 0;
+                               int do_draw = FALSE;
                                
                                for (ar = sa->regionbase.first; ar; ar = ar->next)
                                        if (ar->swinid == oldswin || ar->swinid == scr->subwinactive)
-                                               do_draw = 1;
+                                               do_draw = TRUE;
                                
                                if (do_draw) {
                                        for (ar = sa->regionbase.first; ar; ar = ar->next)
index 9cbe69d29dae3c21bfc2145f3fbd4438933d8053..e2a9bf379160a2ae09ec767922eba1f5d14389cf 100644 (file)
@@ -1468,7 +1468,7 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
                                        }
                                }
                                
-                               CTX_wm_window(C)->screen->do_draw = 1;
+                               CTX_wm_window(C)->screen->do_draw = TRUE;
 
                        }
                        
@@ -1913,7 +1913,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
        ActKeyColumn *ak;
        float cfra;
        short next = RNA_boolean_get(op->ptr, "next");
-       short done = 0;
+       short done = FALSE;
        
        /* sanity checks */
        if (scene == NULL)
@@ -1944,7 +1944,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
                        if (CFRA != (int)ak->cfra) {
                                /* this changes the frame, so set the frame and we're done */
                                CFRA = (int)ak->cfra;
-                               done = 1;
+                               done = TRUE;
                        }
                        else {
                                /* make this the new starting point for the search */
index 256df21b79a4f18330277ef69263e9e98ff68e8a..77289360f9894911be2fb09e5c1d33da3abf393e 100644 (file)
@@ -333,7 +333,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
        sj->stop = stop;
        sj->do_update = do_update;
        
-       *do_update = 1; // wait for opengl rect
+       *do_update = TRUE; /* wait for opengl rect */
        
        while (*stop == 0) {
                
@@ -377,7 +377,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
                        MEM_freeN(sj->dumprect);
                        sj->dumprect = NULL;
                        
-                       *do_update = 1;
+                       *do_update = TRUE;
                        
                        rd.cfra++;
 
index 9effba5b433d974c86568c55c000226ec9657afa..d5c7b66f6955713152dcded539ff6ad338973d3e 100644 (file)
@@ -2433,8 +2433,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
                                        
                                        /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work,
                                         * could check the poly direction but better to do this */
-                                       if ((do_backfacecull          && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
-                                           (do_backfacecull == 0     && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot)))
+                                       if ((do_backfacecull == TRUE  && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
+                                           (do_backfacecull == FALSE && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot)))
                                        {
                                                
                                                has_x_isect = has_isect = 1;
@@ -2453,7 +2453,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
                                                /* Is this UV visible from the view? - raytrace */
                                                /* project_paint_PickFace is less complex, use for testing */
                                                //if (project_paint_PickFace(ps, pixelScreenCo, w, &side) == face_index) {
-                                               if (ps->do_occlude == 0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) {
+                                               if ((ps->do_occlude == FALSE) ||
+                                                   !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo))
+                                               {
                                                        
                                                        mask = project_paint_uvpixel_mask(ps, face_index, side, w);
                                                        
@@ -2629,8 +2631,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
                                                                                        pixelScreenCo[2] = pixelScreenCo[2] / pixelScreenCo[3]; /* Use the depth for bucket point occlusion */
                                                                                }
                                                                                
-                                                                               if (ps->do_occlude == 0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) {
-                                                                                       
+                                                                               if ((ps->do_occlude == FALSE) ||
+                                                                                   !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo))
+                                                                               {
                                                                                        /* Only bother calculating the weights if we intersect */
                                                                                        if (ps->do_mask_normal || ps->dm_mtface_clone) {
 #if 1
@@ -3005,7 +3008,7 @@ static void project_paint_begin(ProjPaintState *ps)
                        ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);
                
                if (ps->dm_mtface_clone == NULL || ps->dm_mtface_clone == ps->dm_mtface) {
-                       ps->do_layer_clone = 0;
+                       ps->do_layer_clone = FALSE;
                        ps->dm_mtface_clone = NULL;
                        printf("ACK!\n");
                }
@@ -3018,7 +3021,7 @@ static void project_paint_begin(ProjPaintState *ps)
                        ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);
                
                if (ps->dm_mtface_stencil == NULL || ps->dm_mtface_stencil == ps->dm_mtface) {
-                       ps->do_layer_stencil = 0;
+                       ps->do_layer_stencil = FALSE;
                        ps->dm_mtface_stencil = NULL;
                }
        }
@@ -3850,7 +3853,7 @@ static void *do_projectpaint_thread(void *ph_v)
        float falloff;
        int bucket_index;
        int is_floatbuf = 0;
-       int use_color_correction = 0;
+       int use_color_correction = FALSE;
        const short tool =  ps->tool;
        rctf bucket_bounds;
        
@@ -4808,7 +4811,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps)
        ps->normal_angle_range = ps->normal_angle - ps->normal_angle_inner;
 
        if (ps->normal_angle_range <= 0.0f)
-               ps->do_mask_normal = 0;  /* no need to do blending */
+               ps->do_mask_normal = FALSE;  /* no need to do blending */
 }
 
 static void paint_brush_init_tex(Brush *brush)
index 5d63a223c08336f18d0566b21e754139cbaae029..5ed384d22afcb01516a664923834864d6320c65b 100644 (file)
@@ -277,7 +277,7 @@ static int console_move_exec(bContext *C, wmOperator *op)
        ConsoleLine *ci = console_history_verify(C);
        
        int type = RNA_enum_get(op->ptr, "type");
-       int done = 0;
+       int done = FALSE;
        int pos;
        
        switch (type) {
@@ -448,7 +448,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
        int stride;
 
        const short type = RNA_enum_get(op->ptr, "type");
-       int done = 0;
+       int done = FALSE;
        
        if (ci->len == 0) {
                return OPERATOR_CANCELLED;
@@ -466,7 +466,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
                                if (stride) {
                                        memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - ci->cursor) + 1);
                                        ci->len -= stride;
-                                       done = 1;
+                                       done = TRUE;
                                }
                        }
                        break;
@@ -482,7 +482,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
                                        ci->cursor -= stride; /* same as above */
                                        memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - ci->cursor) + 1);
                                        ci->len -= stride;
-                                       done = 1;
+                                       done = TRUE;
                                }
                        }
                        break;
index 107acbf49b1434462dcb253046a08a0be94cc16b..d84214413da6916170755979d879dd805897c4b8 100644 (file)
@@ -1299,7 +1299,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
                                        limg->flags |= MOVIEFILE_ICON;
                                }
                }
-               *do_update = 1;
+               *do_update = TRUE;
                PIL_sleep_ms(10);
                limg = limg->next;
        }
@@ -1319,7 +1319,7 @@ static void thumbnails_update(void *tjv)
                                        tj->filelist->filelist[limg->index].flags &= ~MOVIEFILE;
                                        tj->filelist->filelist[limg->index].flags |= MOVIEFILE_ICON;
                                }
-                               limg->done=1;
+                               limg->done = TRUE;
                        }
                        limg = limg->next;
                }
index 97b6c32d81d08db665d221e5a6d6d91237aa7cde..bf0d940c0492dd1bf01b0cc42e6f911b4dd63745 100644 (file)
@@ -775,7 +775,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
        bSensor *sens;
        bController *cont;
        unsigned int lay;
-       int a, nr, doit;
+       int a, nr, do_it;
        
        /* we need a sorted object list */
        /* set scavisflags flags in Objects to indicate these should be evaluated */
@@ -815,9 +815,9 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
        
        /* BUTS_XXX_STATE are similar to BUTS_XXX_LINK for selecting the object */
        if (scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) {
-               doit= 1;
-               while (doit) {
-                       doit= 0;
+               do_it = TRUE;
+               while (do_it) {
+                       do_it = FALSE;
                        
                        ob= bmain->object.first;
                        while (ob) {
@@ -830,13 +830,13 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                                        if (sens->links[a]) {
                                                                obt= (Object *)sens->links[a]->mynew;
                                                                if (obt && (obt->scavisflag & OB_VIS_CONT)) {
-                                                                       doit= 1;
+                                                                       do_it = TRUE;
                                                                        ob->scavisflag |= OB_VIS_SENS;
                                                                        break;
                                                                }
                                                        }
                                                }
-                                               if (doit) break;
+                                               if (do_it) break;
                                                sens= sens->next;
                                        }
                                }
@@ -849,13 +849,13 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                                        if (cont->links[a]) {
                                                                obt= (Object *)cont->links[a]->mynew;
                                                                if (obt && (obt->scavisflag & OB_VIS_ACT)) {
-                                                                       doit= 1;
+                                                                       do_it = TRUE;
                                                                        ob->scavisflag |= OB_VIS_CONT;
                                                                        break;
                                                                }
                                                        }
                                                }
-                                               if (doit) break;
+                                               if (do_it) break;
                                                cont= cont->next;
                                        }
                                }
@@ -868,7 +868,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                                        if (sens->links[a]) {
                                                                obt= (Object *)sens->links[a]->mynew;
                                                                if (obt && (obt->scavisflag & OB_VIS_CONT)==0) {
-                                                                       doit= 1;
+                                                                       do_it = TRUE;
                                                                        obt->scavisflag |= OB_VIS_CONT;
                                                                }
                                                        }
@@ -885,7 +885,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
                                                        if (cont->links[a]) {
                                                                obt= (Object *)cont->links[a]->mynew;
                                                                if (obt && (obt->scavisflag & OB_VIS_ACT)==0) {
-                                                                       doit= 1;
+                                                                       do_it = TRUE;
                                                                        obt->scavisflag |= OB_VIS_ACT;
                                                                }
                                                        }
@@ -3333,7 +3333,7 @@ static void draw_sensor_joystick(uiLayout *layout, PointerRNA *ptr)
                        uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
 
                        col = uiLayoutColumn(layout, 0);
-                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events")==0);
+                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
                        uiItemR(col, ptr, "button_number", 0, NULL, ICON_NONE);
                        break;
                case SENS_JOY_AXIS:
@@ -3343,7 +3343,7 @@ static void draw_sensor_joystick(uiLayout *layout, PointerRNA *ptr)
 
                        uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
                        col = uiLayoutColumn(layout, 0);
-                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events")==0);
+                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
                        uiItemR(col, ptr, "axis_direction", 0, NULL, ICON_NONE);
                        break;
                case SENS_JOY_HAT:
@@ -3351,7 +3351,7 @@ static void draw_sensor_joystick(uiLayout *layout, PointerRNA *ptr)
                        uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
 
                        col = uiLayoutColumn(layout, 0);
-                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events")==0);
+                       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
                        uiItemR(col, ptr, "hat_direction", 0, NULL, ICON_NONE);
                        break;
                case SENS_JOY_AXIS_SINGLE:
@@ -3371,13 +3371,13 @@ static void draw_sensor_keyboard(uiLayout *layout, PointerRNA *ptr)
        row = uiLayoutRow(layout, 0);
        uiItemL(row, "Key:", ICON_NONE);
        col = uiLayoutColumn(row, 0);
-       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys")==0);
+       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE);
        uiItemR(col, ptr, "key", UI_ITEM_R_EVENT, "", ICON_NONE);
        col = uiLayoutColumn(row, 0);
        uiItemR(col, ptr, "use_all_keys", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
        
        col = uiLayoutColumn(layout, 0);
-       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys")==0);
+       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE);
        row = uiLayoutRow(col, 0);
        uiItemL(row, "First Modifier:", ICON_NONE);
        uiItemR(row, ptr, "modifier_key_1", UI_ITEM_R_EVENT, "", ICON_NONE);
@@ -3843,7 +3843,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
                        col = uiLayoutColumn(row, 1);
                        uiItemR(col, ptr, "use_force_distance", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
                        sub = uiLayoutColumn(col, 0);
-                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance")==1);
+                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance") == TRUE);
                        uiItemR(sub, ptr, "distance", 0, "", ICON_NONE);
 
                        uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -3976,7 +3976,7 @@ static void draw_actuator_filter_2d(uiLayout *layout, PointerRNA *ptr)
                case ACT_2DFILTER_MOTIONBLUR:
                        split=uiLayoutSplit(layout, 0.75, 1);
                        row= uiLayoutRow(split, 0);
-                       uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur")==1);
+                       uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur") == TRUE);
                        uiItemR(row, ptr, "motion_blur_factor", 0, NULL, ICON_NONE);
                        uiItemR(split, ptr, "use_motion_blur", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
                        break;
@@ -4080,21 +4080,21 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
                        col = uiLayoutColumn(row, 0);
                        uiItemR(col, ptr, "use_servo_limit_x", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
                        sub = uiLayoutColumn(col, 1);
-                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x")==1);
+                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x") == TRUE);
                        uiItemR(sub, ptr, "force_max_x", 0, NULL, ICON_NONE);
                        uiItemR(sub, ptr, "force_min_x", 0, NULL, ICON_NONE);
 
                        col = uiLayoutColumn(row, 0);
                        uiItemR(col, ptr, "use_servo_limit_y", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
                        sub = uiLayoutColumn(col, 1);
-                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y")==1);
+                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y") == TRUE);
                        uiItemR(sub, ptr, "force_max_y", 0, NULL, ICON_NONE);
                        uiItemR(sub, ptr, "force_min_y", 0, NULL, ICON_NONE);
 
                        col = uiLayoutColumn(row, 0);
                        uiItemR(col, ptr, "use_servo_limit_z", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
                        sub = uiLayoutColumn(col, 1);
-                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z")==1);
+                       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z") == TRUE);
                        uiItemR(sub, ptr, "force_max_z", 0, NULL, ICON_NONE);
                        uiItemR(sub, ptr, "force_min_z", 0, NULL, ICON_NONE);
 
@@ -4122,7 +4122,7 @@ static void draw_actuator_parent(uiLayout *layout, PointerRNA *ptr)
                row = uiLayoutRow(layout, 0);
                uiItemR(row, ptr, "use_compound", 0, NULL, ICON_NONE);
                sub= uiLayoutRow(row, 0);
-               uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound")==1);
+               uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound") == TRUE);
                uiItemR(sub, ptr, "use_ghost", 0, NULL, ICON_NONE);
        }
 }
@@ -4305,7 +4305,7 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C)
        uiItemR(layout, ptr, "use_sound_3d", 0, NULL, ICON_NONE);
        
        col = uiLayoutColumn(layout, 0);
-       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d")==1);
+       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d") == TRUE);
 
        row = uiLayoutRow(col, 0);
        uiItemR(row, ptr, "gain_3d_min", 0, NULL, ICON_NONE);
@@ -4565,7 +4565,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
                        subsplit= uiLayoutSplit(split, 0.85, 0);
                        col= uiLayoutColumn(subsplit, 0);
                        row= uiLayoutRow(col, 0);
-                       uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states")==0);
+                       uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states") == FALSE);
                        uiTemplateLayers(row, &settings_ptr, "states_visible", &settings_ptr, "used_states", 0);
                        row= uiLayoutRow(col, 0);
                        uiTemplateLayers(row, &settings_ptr, "states_initial", &settings_ptr, "used_states", 0);
index 95a5617652320dcdf2af00f6929678099d0321ca..63e518e5aaa5c2f57d534ac7170a178e8879062d 100644 (file)
@@ -335,11 +335,11 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
                 *      - blend in/out can only be set when autoblending is off
                 */
                column = uiLayoutColumn(layout, 1);
-               uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == 0);
+               uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == FALSE);
                uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE);     // XXX as toggle?
 
                sub = uiLayoutColumn(column, 1);
-               uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == 0);
+               uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == FALSE);
                uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE);
                uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE);
                        
@@ -383,7 +383,7 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
                
        /* action usage */
        column = uiLayoutColumn(layout, 1);
-       uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == 0);
+       uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE);
        uiItemL(column, "Playback Settings:", ICON_NONE);
        uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
        uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
index c12cd6f2d3979ef958be2330ca8294b4ebb3a4ba..096c16298e3fff416ec4a3cd7bdc920b1f7f6bcc 100644 (file)
@@ -676,7 +676,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                        short indent = 0, offset = 0, sel = 0, group = 0, nonSolo = 0;
                        int expand = -1, protect = -1, special = -1, mute = -1;
                        char name[128];
-                       short doDraw = 0;
+                       short do_draw = FALSE;
                        
                        /* determine what needs to be drawn */
                        switch (ale->type) {
@@ -716,8 +716,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                        sel = SEL_NLT(nlt);
                                        BLI_strncpy(name, nlt->name, sizeof(name));
                                        
-                                       // draw manually still
-                                       doDraw = 1;
+                                       /* draw manually still */
+                                       do_draw = TRUE;
                                }
                                break;
                                case ANIMTYPE_NLAACTION: /* NLA Action-Line */
@@ -733,8 +733,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                        else
                                                BLI_strncpy(name, "<No Action>", sizeof(name));
                                                
-                                       // draw manually still
-                                       doDraw = 1;
+                                       /* draw manually still */
+                                       do_draw = TRUE;
                                }
                                break;
                                        
@@ -745,7 +745,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                        }       
                        
                        /* if special types, draw manually for now... */
-                       if (doDraw) {
+                       if (do_draw) {
                                if (ale->id) {
                                        /* special exception for textures */
                                        if (GS(ale->id->name) == ID_TE) {
index 8a7e2a8a9040a01ea307260bb47120cf4ea21d12..5c9994e46d354e17206ee027e6ac83f8075ebb41 100644 (file)
@@ -503,7 +503,7 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
        bAnimListElem *ale;
        int filter;
        
-       int done = 0;
+       int done = FALSE;
        
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -822,7 +822,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
        bAnimListElem *ale;
        int filter;
        
-       short done = 0;
+       short done = FALSE;
        
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
index ac12f2ffd31e192c9ad65d8749a639e8de57df81..d42393f3611981d5594ae7db231fae659f4ab776 100644 (file)
@@ -1379,7 +1379,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *UNUSED(C), Po
        uiItemR(layout, ptr, "use_gamma_correction", 0, NULL, ICON_NONE);
 
        col = uiLayoutColumn(layout, 0);
-       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer")==1);
+       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == TRUE);
        uiItemR(col, ptr, "f_stop", 0, NULL, ICON_NONE);
 
        uiItemR(layout, ptr, "blur_max", 0, NULL, ICON_NONE);
@@ -1394,7 +1394,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *UNUSED(C), Po
        col = uiLayoutColumn(layout, 0);
        uiItemR(col, ptr, "use_zbuffer", 0, NULL, ICON_NONE);
        sub = uiLayoutColumn(col, 0);
-       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer")==0);
+       uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == FALSE);
        uiItemR(sub, ptr, "z_scale", 0, NULL, ICON_NONE);
 }
 
@@ -1456,7 +1456,7 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), P
        uiItemR(col, ptr, "use_projector", 0, NULL, ICON_NONE);
 
        col = uiLayoutColumn(col, 0);
-       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector")==0);
+       uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == FALSE);
        uiItemR(col, ptr, "use_jitter", 0, NULL, ICON_NONE);
        uiItemR(col, ptr, "use_fit", 0, NULL, ICON_NONE);
 }
@@ -1627,7 +1627,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
 
        uiItemR(col, ptr, "ratio", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(col, ptr, "use_unspill", 0, NULL, ICON_NONE);
-       if (RNA_boolean_get(ptr, "use_unspill")== 1) {
+       if (RNA_boolean_get(ptr, "use_unspill") == TRUE) {
                uiItemR(col, ptr, "unspill_red", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
                uiItemR(col, ptr, "unspill_green", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
                uiItemR(col, ptr, "unspill_blue", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1818,7 +1818,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
                        uiItemR(col, &active_input_ptr, "use_node_format", 0, NULL, 0);
                        
                        col= uiLayoutColumn(layout, 0);
-                       uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format")==0);
+                       uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == FALSE);
                        uiTemplateImageSettings(col, &imfptr);
                }
        }
@@ -2976,8 +2976,8 @@ void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int
 /* note; this is used for fake links in groups too */
 void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
 {
-       int do_shaded= 0, th_col1= TH_HEADER, th_col2= TH_HEADER;
-       int do_triple= 0, th_col3= TH_WIRE;
+       int do_shaded= FALSE, th_col1= TH_HEADER, th_col2= TH_HEADER;
+       int do_triple= FALSE, th_col3= TH_WIRE;
        
        if (link->fromsock==NULL && link->tosock==NULL)
                return;
@@ -2985,7 +2985,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
        /* new connection */
        if (!link->fromsock || !link->tosock) {
                th_col1 = TH_ACTIVE;
-               do_triple = 1;
+               do_triple = TRUE;
        }
        else {
                /* going to give issues once... */
@@ -2997,7 +2997,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
                /* a bit ugly... but thats how we detect the internal group links */
                if (!link->fromnode || !link->tonode) {
                        UI_ThemeColorBlend(TH_BACK, TH_WIRE, 0.5f);
-                       do_shaded= 0;
+                       do_shaded = FALSE;
                }
                else {
                        /* check cyclic */
@@ -3013,8 +3013,8 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
                                        if (link->tonode->flag & SELECT)
                                                th_col2= TH_EDGE_SELECT;
                                }
-                               do_shaded= 1;
-                               do_triple= 1;
+                               do_shaded = TRUE;
+                               do_triple = TRUE;
                        }                               
                        else {
                                th_col1 = TH_REDALERT;
index f71ce3f960c60550c2aa9c8b68c36dfea0624d66..8847dc3650aca832acf624c956928ab3a38fc14c 100644 (file)
@@ -125,7 +125,7 @@ static void compo_redrawjob(void *cjv, char *UNUSED(str))
 {
        CompoJob *cj= cjv;
        
-       *(cj->do_update)= 1;
+       *(cj->do_update) = TRUE;
 }
 
 static void compo_freejob(void *cjv)
@@ -169,7 +169,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog
        CompoJob *cj= cjv;
        bNodeTree *ntree= cj->localtree;
 
-       if (cj->scene->use_nodes==0)
+       if (cj->scene->use_nodes == FALSE)
                return;
        
        cj->stop= stop;
@@ -2366,7 +2366,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
                                        ntreeUpdateTree(snode->edittree);
                                }
                                else {
-                                       int do_update = 0;
+                                       int do_update = FALSE;
                                        for (linkdata=nldrag->links.first; linkdata; linkdata=linkdata->next) {
                                                link = linkdata->data;
                                                
@@ -2377,11 +2377,12 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
                                                        link->tosock= NULL;
                                                        
                                                        snode->edittree->update |= NTREE_UPDATE_LINKS;
-                                                       do_update = 1;
+                                                       do_update = TRUE;
                                                }
                                        }
-                                       if (do_update)
+                                       if (do_update) {
                                                ntreeUpdateTree(snode->edittree);
+                                       }
                                }
                        }
                        else {
@@ -2408,7 +2409,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
                                        ntreeUpdateTree(snode->edittree);
                                }
                                else {
-                                       int do_update = 0;
+                                       int do_update = FALSE;
                                        for (linkdata=nldrag->links.first; linkdata; linkdata=linkdata->next) {
                                                link = linkdata->data;
                                                
@@ -2419,11 +2420,12 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
                                                        link->fromsock= NULL;
                                                        
                                                        snode->edittree->update |= NTREE_UPDATE_LINKS;
-                                                       do_update = 1;
+                                                       do_update = TRUE;
                                                }
                                        }
-                                       if (do_update)
+                                       if (do_update) {
                                                ntreeUpdateTree(snode->edittree);
+                                       }
                                }
                        }
                        
index 1590d08b4a1e7e07f2f9488826d15295bf47b051..2d1ba69cdd3cb9cdf0434ceb71e84c5d07431325 100644 (file)
@@ -840,7 +840,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
 {
        Sequence *seq;
        Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
-       int done = 0;
+       int done = FALSE;
 
        /* all strips >= cfra are shifted */
        
@@ -851,7 +851,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
                if (seq->startdisp >= cfra) {
                        seq->start += gap;
                        calc_sequence(scene, seq);
-                       done = 1;
+                       done = TRUE;
                }
        }
        SEQ_END
@@ -971,7 +971,7 @@ static void UNUSED_FUNCTION(no_gaps) (Scene * scene)
                        if (evaluate_seq_frame(scene, cfra) ) first = 1;
                }
                else {
-                       done = 1;
+                       done = TRUE;
                        while (evaluate_seq_frame(scene, cfra) == 0) {
                                done = insert_gap(scene, -1, cfra);
                                if (done == 0) break;
index a59570a09e19e3f6244f8e67fade6e0d1f766171..811a89b07a810f413a44deba1ef03c7f755ca550 100644 (file)
@@ -1100,7 +1100,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
 
        actseq->tmp = SET_INT_IN_POINTER(TRUE);
 
-       for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {
+       for (seq_begin(ed, &iter, TRUE); iter.valid; seq_next(&iter)) {
                seq = iter.seq;
 
                /* Ignore all seqs already selected! */
@@ -1129,7 +1129,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
 
                        /* Unfortunately, we must restart checks from the beginning. */
                        seq_end(&iter);
-                       seq_begin(ed, &iter, 1);
+                       seq_begin(ed, &iter, TRUE);
                }
 
                /* Video strips bellow active one, or any strip for audio (order do no matters here!). */
index 04408173928f83040aaa8698845cf365319896ca..3ebc4eb974cd99b2392c31c9a5927631c1226584 100644 (file)
@@ -2888,7 +2888,7 @@ static int text_insert_exec(bContext *C, wmOperator *op)
        SpaceText *st = CTX_wm_space_text(C);
        Text *text = CTX_data_edit_text(C);
        char *str;
-       int done = 0;
+       int done = FALSE;
        size_t i = 0;
        unsigned int code;
 
index 9e44d5207c0f61d87d504e767961700d5ec01107..01d27aaa0b331efc045aeafbf6fabbb4c7a2cf50 100644 (file)
@@ -354,7 +354,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
                time_draw_idblock_keyframes(v2d, (ID *)ob, onlysel);
        }
        else {
-               short active_done = 0;
+               short active_done = FALSE;
                
                /* draw keyframes from all selected objects */
                CTX_DATA_BEGIN (C, Object *, obsel, selected_objects)
@@ -364,7 +364,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
                        
                        /* if this object is the active one, set flag so that we don't draw again */
                        if (obsel == ob)
-                               active_done = 1;
+                               active_done = TRUE;
                }
                CTX_DATA_END;
                
index 2211b1ddb620faab3d2115e93aa98f66a7cf9cdc..6a0700703794ef9f88bfe0eebe97ccdc54474899 100644 (file)
@@ -1667,7 +1667,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
        GLfloat tmp;
        float smat[4][4], imat[4][4], bmat[4][4];
        int index = -1;
-       short do_dashed = 3, draw_wire = 0;
+       short do_dashed = 3, draw_wire = FALSE;
        int flag;
        
        /* being set below */
index b5c44fd1a8cef777a51528231bc0165fd0380208..de1d9f2266754d4aa6820ee728e22e82e4b64294 100644 (file)
@@ -233,7 +233,7 @@ static Material *give_current_material_or_def(Object *ob, int matnr)
 
 static struct TextureDrawState {
        Object *ob;
-       int islit, istex;
+       int is_lit, is_tex;
        int color_profile;
        unsigned char obcol[4];
 } Gtexdraw = {NULL, 0, 0, 0, {0, 0, 0, 0}};
@@ -263,12 +263,12 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
                c_has_texface = -1;
        }
        else {
-               textured = gtexdraw.istex;
+               textured = gtexdraw.is_tex;
                litob = gtexdraw.ob;
        }
 
        /* convert number of lights into boolean */
-       if (gtexdraw.islit) lit = 1;
+       if (gtexdraw.is_lit) lit = 1;
 
        if (ma) {
                alphablend = ma->game.alpha_blend;
@@ -343,7 +343,7 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
 static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
 {
        unsigned char obcol[4];
-       int istex, solidtex;
+       int is_tex, solidtex;
 
        // XXX scene->obedit warning
 
@@ -351,27 +351,27 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
         * with face selection in weight paint is not lit. */
        if ((v3d->drawtype <= OB_WIRE) && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))) {
                solidtex = FALSE;
-               Gtexdraw.islit = 0;
+               Gtexdraw.is_lit = 0;
        }
        else if (v3d->drawtype == OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype != OB_TEXTURE)) {
                /* draw with default lights in solid draw mode and edit mode */
                solidtex = TRUE;
-               Gtexdraw.islit = -1;
+               Gtexdraw.is_lit = -1;
        }
        else {
                /* draw with lights in the scene otherwise */
                solidtex = FALSE;
-               Gtexdraw.islit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
+               Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
        }
        
        rgba_float_to_uchar(obcol, ob->col);
 
        glCullFace(GL_BACK); glEnable(GL_CULL_FACE);
-       if (solidtex || v3d->drawtype == OB_TEXTURE) istex = 1;
-       else istex = 0;
+       if (solidtex || v3d->drawtype == OB_TEXTURE) is_tex = 1;
+       else is_tex = 0;
 
        Gtexdraw.ob = ob;
-       Gtexdraw.istex = istex;
+       Gtexdraw.is_tex = is_tex;
        Gtexdraw.color_profile = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
        memcpy(Gtexdraw.obcol, obcol, sizeof(obcol));
        set_draw_settings_cached(1, NULL, NULL, Gtexdraw);
index 00622f368f091966ed8488133f240202504734be..e69538345bb7c79dc1e5135b76bfdc2dc983c064 100644 (file)
@@ -1967,7 +1967,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
        Lattice *lt = ob->data;
        DispList *dl;
        int u, v, w;
-       int use_wcol = 0, is_edit = (lt->editlatt != NULL);
+       int use_wcol = FALSE, is_edit = (lt->editlatt != NULL);
 
        /* now we default make displist, this will modifiers work for non animated case */
        if (ob->disp.first == NULL)
@@ -3543,7 +3543,7 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
        Object *obedit = scene->obedit;
        Mesh *me = ob->data;
        BMEditMesh *em = me->edit_btmesh;
-       int do_alpha_after = 0, drawlinked = 0, retval = 0, glsl, check_alpha, i;
+       int do_alpha_after = FALSE, drawlinked = 0, retval = 0, glsl, check_alpha, i;
 
        /* If we are drawing shadows and any of the materials don't cast a shadow,
         * then don't draw the object */
index d9126b3809ab1359ecc50430b949e2e2a2acea00..f18ba29b1f4f6d3bd2dc7ee604152d50ff5659c1 100644 (file)
@@ -1848,7 +1848,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
 
                /* generate displist, test for new object */
                if (dob_prev && dob_prev->ob != dob->ob) {
-                       if (use_displist == 1)
+                       if (use_displist == TRUE)
                                glDeleteLists(displist, 1);
 
                        use_displist = -1;
@@ -1870,7 +1870,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
                            !(bb_tmp = BKE_object_boundbox_get(dob->ob)))
                        {
                                // printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name+2);
-                               use_displist = 0;
+                               use_displist = FALSE;
                        }
                        else {
                                // printf("draw_dupli_objects_color: using displist for %s\n", dob->ob->id.name+2);
@@ -1886,7 +1886,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
                                draw_object(scene, ar, v3d, &tbase, DRAW_CONSTCOLOR);
                                glEndList();
 
-                               use_displist = 1;
+                               use_displist = TRUE;
                                BKE_object_boundbox_flag(dob->ob, OB_BB_DISABLED, 0);
                        }
                }
index 4bfb6dd9fd6046fcb9ac8976305da3efa8c7a883..8ba0d75c7869a8755abb998809318e8cb0a32523 100644 (file)
@@ -2051,7 +2051,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
        int center = RNA_boolean_get(op->ptr, "center");
 
        float size, min[3], max[3], afm[3];
-       int ok = 1, onedone = 0;
+       int ok = 1, onedone = FALSE;
 
        if (center) {
                /* in 2.4x this also move the cursor to (0, 0, 0) (with shift+c). */
@@ -2066,7 +2066,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
 
        for (base = scene->base.first; base; base = base->next) {
                if (BASE_VISIBLE(v3d, base)) {
-                       onedone = 1;
+                       onedone = TRUE;
 
                        if (skip_camera && base->object == v3d->camera) {
                                continue;
index 583736716c6dc74ba1873a545cf83ceaa7a4faf3..0bbd03c10bb8b3771f4b0f79c2793aeb25ae9f4f 100644 (file)
@@ -405,7 +405,7 @@ static void do_lasso_select_mesh__doSelectEdge(void *userData, BMEdge *eed, int
                            BLI_lasso_is_point_inside(data->mcords, data->moves, x1, y1, IS_CLIPPED))
                        {
                                BM_edge_select_set(data->vc->em->bm, eed, data->select);
-                               data->done = 1;
+                               data->done = TRUE;
                        }
                }
                else {
@@ -443,7 +443,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
        data.mcords = mcords;
        data.moves = moves;
        data.select = select;
-       data.done = 0;
+       data.done = FALSE;
        data.pass = 0;
 
        if (extend == 0 && select)
@@ -1180,19 +1180,19 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int
        View3D *v3d = vc->v3d;
        Base *base, *basact = NULL;
        static int lastmval[2] = {-100, -100};
-       int a, donearest = 0;
+       int a, do_nearest = FALSE;
        
        /* define if we use solid nearest select or not */
        if (v3d->drawtype > OB_WIRE) {
-               donearest = 1;
+               do_nearest = TRUE;
                if (ABS(mval[0] - lastmval[0]) < 3 && ABS(mval[1] - lastmval[1]) < 3) {
                        if (!has_bones) /* hrms, if theres bones we always do nearest */
-                               donearest = 0;
+                               do_nearest = FALSE;
                }
        }
        lastmval[0] = mval[0]; lastmval[1] = mval[1];
        
-       if (donearest) {
+       if (do_nearest) {
                unsigned int min = 0xFFFFFFFF;
                int selcol = 0, notcol = 0;
                
@@ -1623,7 +1623,7 @@ static void do_mesh_box_select__doSelectEdge(void *userData, BMEdge *eed, int x0
                if (data->pass == 0) {
                        if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1)) {
                                BM_edge_select_set(data->vc->em->bm, eed, data->select);
-                               data->done = 1;
+                               data->done = TRUE;
                        }
                }
                else {
@@ -1651,7 +1651,7 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten
        data.rect = rect;
        data.select = select;
        data.pass = 0;
-       data.done = 0;
+       data.done = FALSE;
 
        if (extend == 0 && select)
                EDBM_flag_disable_all(vc->em, BM_ELEM_SELECT);
index d07ae468f350a6024821d666bc2a08fee8f2af73..4573e66ca390439e149214312e3cceabf9db5536 100644 (file)
@@ -2111,7 +2111,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
                bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT);
                bConstraintOb cob;
                bConstraint *con;
-               int dolimit = 0;
+               int do_limit = FALSE;
                
                /* Evaluate valid constraints */
                for (con= td->con; con; con= con->next) {
@@ -2133,9 +2133,9 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
                                        continue;
 
                                /* only do conversion if necessary, to preserve quats and eulers */
-                               if (!dolimit) {
+                               if (do_limit == FALSE) {
                                        constraintob_from_transdata(&cob, td);
-                                       dolimit= 1;
+                                       do_limit = TRUE;
                                }
                                
                                /* do space conversions */
@@ -2157,7 +2157,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
                        }
                }
                
-               if (dolimit) {
+               if (do_limit) {
                        /* copy results from cob->matrix */
                        if (td->ext->rotOrder == ROT_MODE_QUAT) {
                                /* quats */
@@ -5438,10 +5438,10 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
        /* snap key to nearest frame? */
        if (autosnap == SACTSNAP_FRAME) {
 
-#if 0   /* 'doTime' disabled for now */
+#if 0   /* 'do_time' disabled for now */
 
                const Scene *scene= t->scene;
-               const short doTime= 0; //getAnimEdit_DrawTime(t); // NOTE: this works, but may be confusing behavior given the option's label, hence disabled
+               const short do_time= 0; //getAnimEdit_DrawTime(t); // NOTE: this works, but may be confusing behavior given the option's label, hence disabled
                const double secf= FPS;
 #endif
                double val;
@@ -5452,10 +5452,10 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
                else
                        val= *(td->val);
                
-#if 0  /* 'doTime' disabled for now */
+#if 0  /* 'do_time' disabled for now */
 
                /* do the snapping to nearest frame/second */
-               if (doTime) {
+               if (do_time) {
                        val= (float)(floor((val/secf) + 0.5f) * secf);
                }
                else
@@ -5540,19 +5540,19 @@ static void headerTimeTranslate(TransInfo *t, char *str)
        else {
                const Scene *scene = t->scene;
                const short autosnap= getAnimEdit_SnapMode(t);
-               const short doTime = getAnimEdit_DrawTime(t);
+               const short do_time = getAnimEdit_DrawTime(t);
                const double secf= FPS;
                float val = t->values[0];
                
                /* apply snapping + frame->seconds conversions */
                if (autosnap == SACTSNAP_STEP) {
-                       if (doTime)
+                       if (do_time)
                                val= floorf((double)val/secf + 0.5f);
                        else
                                val= floorf(val + 0.5f);
                }
                else {
-                       if (doTime)
+                       if (do_time)
                                val= (float)((double)val / secf);
                }
                
@@ -5572,7 +5572,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
        Scene *scene = t->scene;
        int i;
 
-       const short doTime= getAnimEdit_DrawTime(t);
+       const short do_time= getAnimEdit_DrawTime(t);
        const double secf= FPS;
 
        const short autosnap= getAnimEdit_SnapMode(t);
@@ -5594,7 +5594,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
                        deltax = t->values[0];
 
                        if (autosnap == SACTSNAP_STEP) {
-                               if (doTime)
+                               if (do_time)
                                        deltax= (float)(floor((deltax/secf) + 0.5f) * secf);
                                else
                                        deltax= (float)(floor(deltax + 0.5f));
@@ -5608,7 +5608,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
                        deltax = val = t->values[0];
 
                        if (autosnap == SACTSNAP_STEP) {
-                               if (doTime)
+                               if (do_time)
                                        val= (float)(floor((deltax/secf) + 0.5f) * secf);
                                else
                                        val= (float)(floor(val + 0.5f));
@@ -5846,7 +5846,7 @@ static void applyTimeScale(TransInfo *t)
        int i;
 
        const short autosnap= getAnimEdit_SnapMode(t);
-       const short doTime= getAnimEdit_DrawTime(t);
+       const short do_time= getAnimEdit_DrawTime(t);
        const double secf= FPS;
 
 
@@ -5860,7 +5860,7 @@ static void applyTimeScale(TransInfo *t)
                float fac= t->values[0];
 
                if (autosnap == SACTSNAP_STEP) {
-                       if (doTime)
+                       if (do_time)
                                fac= (float)(floor(fac/secf + 0.5f) * secf);
                        else
                                fac= (float)(floor(fac + 0.5f));
index c9eb975cb7765ccfd31a9bbd4bae87cbfbd2be0c..dad1c65298a8a69793e03c573ba1004c8fff2860 100644 (file)
@@ -4599,45 +4599,45 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob,
                        }
                }
                else if (IS_AUTOKEY_FLAG(scene, INSERTNEEDED)) {
-                       short doLoc=0, doRot=0, doScale=0;
+                       short do_loc = FALSE, do_rot = FALSE, do_scale = FALSE;
                        
                        /* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
                        if (tmode == TFM_TRANSLATION) {
-                               doLoc = 1;
+                               do_loc = TRUE;
                        }
                        else if (tmode == TFM_ROTATION) {
                                if (v3d->around == V3D_ACTIVE) {
                                        if (ob != OBACT)
-                                               doLoc = 1;
+                                               do_loc = TRUE;
                                }
                                else if (v3d->around == V3D_CURSOR)
-                                       doLoc = 1;
+                                       do_loc = TRUE;
                                
                                if ((v3d->flag & V3D_ALIGN)==0)
-                                       doRot = 1;
+                                       do_rot = TRUE;
                        }
                        else if (tmode == TFM_RESIZE) {
                                if (v3d->around == V3D_ACTIVE) {
                                        if (ob != OBACT)
-                                               doLoc = 1;
+                                               do_loc = TRUE;
                                }
                                else if (v3d->around == V3D_CURSOR)
-                                       doLoc = 1;
+                                       do_loc = TRUE;
                                
                                if ((v3d->flag & V3D_ALIGN)==0)
-                                       doScale = 1;
+                                       do_scale = TRUE;
                        }
                        
                        /* insert keyframes for the affected sets of channels using the builtin KeyingSets found */
-                       if (doLoc) {
+                       if (do_loc) {
                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                        }
-                       if (doRot) {
+                       if (do_rot) {
                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                        }
-                       if (doScale) {
+                       if (do_scale) {
                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                        }
@@ -4720,39 +4720,39 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
                                }
                                /* only insert keyframe if needed? */
                                else if (IS_AUTOKEY_FLAG(scene, INSERTNEEDED)) {
-                                       short doLoc=0, doRot=0, doScale=0;
+                                       short do_loc = FALSE, do_rot = FALSE, do_scale = FALSE;
                                        
                                        /* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
                                        if (tmode == TFM_TRANSLATION) {
                                                if (targetless_ik)
-                                                       doRot= 1;
+                                                       do_rot = TRUE;
                                                else
-                                                       doLoc = 1;
+                                                       do_loc = TRUE;
                                        }
                                        else if (tmode == TFM_ROTATION) {
                                                if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
-                                                       doLoc = 1;
+                                                       do_loc = TRUE;
                                                        
                                                if ((v3d->flag & V3D_ALIGN)==0)
-                                                       doRot = 1;
+                                                       do_rot = TRUE;
                                        }
                                        else if (tmode == TFM_RESIZE) {
                                                if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
-                                                       doLoc = 1;
+                                                       do_loc = TRUE;
                                                        
                                                if ((v3d->flag & V3D_ALIGN)==0)
-                                                       doScale = 1;
+                                                       do_scale = TRUE;
                                        }
                                        
-                                       if (doLoc) {
+                                       if (do_loc) {
                                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
                                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                                        }
-                                       if (doRot) {
+                                       if (do_rot) {
                                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
                                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                                        }
-                                       if (doScale) {
+                                       if (do_scale) {
                                                KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
                                                ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
                                        }
index a869af56537d842449a8dcb0e5f2710c122e5488..7d0e9dd60059bdbf629f8f05972de2f085f923dd 100644 (file)
@@ -662,9 +662,9 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
        float cos_theta, sin_theta;
        float cos_theta1, sin_theta1;
        float ring_delta, side_delta;
-       int i, j, docaps= 1;
+       int i, j, do_caps = TRUE;
 
-       if (start==0 && end==nrings) docaps= 0;
+       if (start == 0 && end == nrings) do_caps = FALSE;
 
        ring_delta= 2.0f*(float)M_PI/(float)nrings;
        side_delta= 2.0f*(float)M_PI/(float)nsides;
@@ -678,7 +678,7 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
                cos_theta1= (float)cos(theta1);
                sin_theta1= (float)sin(theta1);
 
-               if (docaps && i==start) {       // cap
+               if (do_caps && i==start) {      // cap
                        glBegin(GL_POLYGON);
                        phi= 0.0;
                        for (j= nsides; j >= 0; j--) {
@@ -710,7 +710,7 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
                        glEnd();
                }
 
-               if (docaps && i==end) { // cap
+               if (do_caps && i==end) {        // cap
                        glBegin(GL_POLYGON);
                        phi= 0.0;
                        for (j= nsides; j >= 0; j--) {
index 04207643aa4b421fbdca4d4bec83b620a72e83cf..91f622914507e0640501f270ed2ad47b68211b8d 100644 (file)
@@ -476,7 +476,7 @@ static int count_bone_select(bArmature *arm, ListBase *lb, int do_it)
                                if (bone->flag & BONE_SELECTED) {
                                        bone->flag |= BONE_TRANSFORM;
                                        total++;
-                                       do_next= 0;     // no transform on children if one parent bone is selected
+                                       do_next = FALSE;        // no transform on children if one parent bone is selected
                                }
                        }
                }
index ac0f8306259a4e22bf24bb130bee4ed60e1ee867..9aaccb57fe2a72c8fd2e4b94e0b27f48a4e42c1b 100644 (file)
@@ -209,19 +209,19 @@ static void undo_clean_stack(bContext *C)
        uel = undobase.first;
        while (uel) {
                void *editdata = uel->getdata(C);
-               int isvalid = 0;
+               int is_valid = FALSE;
                next = uel->next;
                
                /* for when objects are converted, renamed, or global undo changes pointers... */
                if (uel->type == obedit->type) {
                        if (strcmp(uel->id.name, obedit->id.name) == 0) {
                                if (uel->validate_undo == NULL)
-                                       isvalid = 1;
+                                       is_valid = TRUE;
                                else if (uel->validate_undo(uel->undodata, editdata))
-                                       isvalid = 1;
+                                       is_valid = TRUE;
                        }
                }
-               if (isvalid) 
+               if (is_valid)
                        uel->ob = obedit;
                else {
                        if (uel == curundo)
index cd88614f8fece1f33993476dad417c74570fe6da..e7a9ab9ca7352b932ae3b60303899be88d9f78f3 100644 (file)
@@ -165,15 +165,15 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                }
        }
        else {
-               int do_glob_undo = 0;
+               int do_glob_undo = FALSE;
                
                if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
                        if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname))
-                               do_glob_undo = 1;
+                               do_glob_undo = TRUE;
                }
                else if (obact && obact->mode & OB_MODE_SCULPT) {
                        if (!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname))
-                               do_glob_undo = 1;
+                               do_glob_undo = TRUE;
                }
                else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
                        if (step == 1)
@@ -182,7 +182,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                                PE_redo(CTX_data_scene(C));
                }
                else {
-                       do_glob_undo = 1;
+                       do_glob_undo = TRUE;
                }
                
                if (do_glob_undo) {
index b30821dc56a0abb683cc5e7f7c13b81cf38d1a3b..872f959b8a265810c5adb0ad7d2c12880df86313 100644 (file)
@@ -827,7 +827,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
                        UvEdge *edge = state->edges + i;
                        if ((state->uvs[edge->uv1]->flag & STITCH_STITCHABLE) && (state->uvs[edge->uv2]->flag & STITCH_STITCHABLE)) {
                                stitch_island_calculate_edge_rotation(edge, state, final_position, uvfinal_map, island_stitch_data);
-                               island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = 1;
+                               island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = TRUE;
                        }
                }
 
index ebfedea3968da20bf4aa5305bc624cede5a63ba3..899f4afb903f04cb327d59d1f9ec4ddd462c7450 100644 (file)
@@ -1099,7 +1099,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
        GMS.use_alpha_pass = (do_alpha_after != NULL);
        GMS.is_alpha_pass = (v3d && v3d->transp);
        if (GMS.use_alpha_pass)
-               *do_alpha_after = 0;
+               *do_alpha_after = FALSE;
        
        if (GMS.totmat > FIXEDMAT) {
                GMS.matbuf= MEM_callocN(sizeof(GPUMaterialFixed)*GMS.totmat, "GMS.matbuf");
@@ -1156,11 +1156,11 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
                        }
                }
 
-               /* setting do_alpha_after = 1 indicates this object needs to be
+               /* setting 'do_alpha_after = TRUE' indicates this object needs to be
                 * drawn in a second alpha pass for improved blending */
                if (do_alpha_after && !GMS.is_alpha_pass)
                        if (ELEM3(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ADD, GPU_BLEND_ALPHA_SORT))
-                               *do_alpha_after= 1;
+                               *do_alpha_after = TRUE;
 
                GMS.alphablend[a]= alphablend;
        }
index f75c1576fb9a5f9e846dc815eacceb652c889b65..5918cf99d1211d73774e1b0dd266c98f7a7ef68e 100644 (file)
@@ -952,7 +952,7 @@ static void do_material_tex(GPUShadeInput *shi)
        /*char *lastuvname = NULL;*/ /*UNUSED*/
        float one = 1.0f, norfac, ofs[3];
        int tex_nr, rgbnor, talpha;
-       int init_done = 0, iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */
+       int init_done = FALSE, iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */
        GPUNodeLink *vNorg, *vNacc, *fPrevMagnitude;
        int iFirstTimeNMap=1;
        int found_deriv_map = 0;
@@ -1184,7 +1184,7 @@ static void do_material_tex(GPUShadeInput *shi)
                                                        // copy shi->vn to vNorg and vNacc, set magnitude to 1
                                                        GPU_link(mat, "mtex_bump_normals_init", shi->vn, &vNorg, &vNacc, &fPrevMagnitude);
                                                        iBumpSpacePrev = 0;
-                                                       init_done = 1;
+                                                       init_done = TRUE;
                                                }
                                                
                                                // find current bump space
index 74fa7c5987e48813e289864e86a847c2b6c8b492..11da2f4af91dc02fb5565c50e47f6390453d1823 100644 (file)
@@ -867,7 +867,7 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
 
                if (*progress != next_progress) {
                        *progress = next_progress;
-                       *do_update = 1;
+                       *do_update = TRUE;
                }
 
                if (*stop) {
@@ -1075,7 +1075,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
 
                if (*progress != next_progress) {
                        *progress = next_progress;
-                       *do_update = 1;
+                       *do_update = TRUE;
                }
                
                if (*stop) {
index 4f71f296caadeb8c6611ec66ce4fde68d88e9f9d..3af853ba15039b8d2e307ecbaa82235b92f59106 100644 (file)
@@ -97,7 +97,7 @@ static void info_callback(const char *msg, void *client_data)
 struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
 {
        struct ImBuf *ibuf = NULL;
-       int use_float = 0; /* for precision higher then 8 use float */
+       int use_float = FALSE; /* for precision higher then 8 use float */
        
        long signed_offsets[4] = {0, 0, 0, 0};
        int float_divs[4] = {1, 1, 1, 1};
@@ -183,7 +183,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
                i--;
                
                if (image->comps[i].prec > 8)
-                       use_float = 1;
+                       use_float = TRUE;
                
                if (image->comps[i].sgnd)
                        signed_offsets[i] =  1 << (image->comps[i].prec - 1);
index ef057784a285f133bc0804e37e5fb00e32352d74..27034317396ad1c2389fc84b54da0ae575a0f7e1 100644 (file)
@@ -1085,7 +1085,7 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
        float val_bf, nval_bf, diff_bf;
        float val_gf, nval_gf, diff_gf;
        float val_rf, nval_rf, diff_rf;
-       int x, y, do_rect = 0, do_float = 0;
+       int x, y, do_rect = FALSE, do_float = FALSE;
 
        val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
        val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1095,12 +1095,12 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
        if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf);
 
        if (ibuf->rect) {
-               do_rect = 1;
+               do_rect = TRUE;
                _newrect = MEM_mallocN(newx * ibuf->y * sizeof(int), "scaleupx");
                if (_newrect == NULL) return(ibuf);
        }
        if (ibuf->rect_float) {
-               do_float = 1;
+               do_float = TRUE;
                _newrectf = MEM_mallocN(newx * ibuf->y * sizeof(float) * 4, "scaleupxf");
                if (_newrectf == NULL) {
                        if (_newrect) MEM_freeN(_newrect);
@@ -1252,7 +1252,7 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
        float val_bf, nval_bf, diff_bf;
        float val_gf, nval_gf, diff_gf;
        float val_rf, nval_rf, diff_rf;
-       int x, y, do_rect = 0, do_float = 0, skipx;
+       int x, y, do_rect = FALSE, do_float = FALSE, skipx;
 
        val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
        val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1262,12 +1262,12 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
        if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf);
 
        if (ibuf->rect) {
-               do_rect = 1;
+               do_rect = TRUE;
                _newrect = MEM_mallocN(ibuf->x * newy * sizeof(int), "scaleupy");
                if (_newrect == NULL) return(ibuf);
        }
        if (ibuf->rect_float) {
-               do_float = 1;
+               do_float = TRUE;
                _newrectf = MEM_mallocN(ibuf->x * newy * sizeof(float) * 4, "scaleupyf");
                if (_newrectf == NULL) {
                        if (_newrect) MEM_freeN(_newrect);
@@ -1481,16 +1481,16 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned
 {
        unsigned int *rect, *_newrect, *newrect;
        struct imbufRGBA *rectf, *_newrectf, *newrectf;
-       int x, y, do_float = 0, do_rect = 0;
+       int x, y, do_float = FALSE, do_rect = FALSE;
        int ofsx, ofsy, stepx, stepy;
 
        rect = NULL; _newrect = NULL; newrect = NULL;
        rectf = NULL; _newrectf = NULL; newrectf = NULL;
 
        if (ibuf == NULL) return(NULL);
-       if (ibuf->rect) do_rect = 1;
-       if (ibuf->rect_float) do_float = 1;
-       if (do_rect == 0 && do_float == 0) return(ibuf);
+       if (ibuf->rect) do_rect = TRUE;
+       if (ibuf->rect_float) do_float = TRUE;
+       if (do_rect == FALSE && do_float == FALSE) return(ibuf);
        
        if (newx == ibuf->x && newy == ibuf->y) return(ibuf);
        
index 9dcdce61cea2408e35e023f23fa7e35d05854578..4c16239f13707a4df21e6110fa6b5d7f0ed89a64 100644 (file)
@@ -3123,7 +3123,7 @@ static void def_cmp_bokehimage(StructRNA *srna)
        RNA_def_property_float_sdna(prop, NULL, "lensshift");
        RNA_def_property_float_default(prop, 0.0f);
        RNA_def_property_range(prop, -1.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Lens shift", "Shift of the lens.");
+       RNA_def_property_ui_text(prop, "Lens shift", "Shift of the lens");
        RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
 
 }
index f26b5f44f99ce14793c42b4d23e77f7ecaa0ec71..0d1840a7a7dd45dd655a0fe34b2df3c0f1fbf150 100644 (file)
@@ -986,7 +986,7 @@ void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2)
        fRGB wt, *colp;
        int x, y, ch;
        int xbl, ybl, nxb, nyb, xbsz, ybsz;
-       int in2done = 0;
+       int in2done = FALSE;
 
        CompBuf* rdst = alloc_compbuf(in1->x, in1->y, in1->type, 1);
 
@@ -1086,7 +1086,7 @@ void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2)
                                }
 
                        }
-                       in2done = 1;
+                       in2done = TRUE;
                }
        }
 
index 72dec01066e693b90aecaaec6988f52f73998cbd..84b203d005a4be7456c54bb7372ded634f4ef15b 100644 (file)
@@ -249,7 +249,7 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
        float bkh_b[4] = {0};   // shape 2D bound
        float cam_fdist=1, cam_invfdist=1, cam_lens=35;
        float dof_sp, maxfgc, bk_hn_theta=0, inradsq=0;
-       int y, len_bkh=0, ydone=0;
+       int y, len_bkh=0, ydone = FALSE;
        float aspect, aperture;
        int minsz;
        //float bcrad, nmaxc, scf;
index a571b140a1f536e2764f108d492567a0814f0b80..fcc8ed4a128b6d71decb0684fdba8d44bf5d063a 100644 (file)
@@ -124,7 +124,7 @@ bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree, bNode *node, con
                }
        }
        /* use node data format by default */
-       sockdata->use_node_format = 1;
+       sockdata->use_node_format = TRUE;
        
        nimf->active_input = BLI_findindex(&node->inputs, sock);
        
index 49a3d6c07b4d23151b63e0cf2da51b35ed788463..300954a3c195a4333e698df4c864a0e07d94a750 100644 (file)
@@ -133,7 +133,7 @@ bNode *node_group_make_from_selected(bNodeTree *ntree)
                        DO_MINMAX2((&node->locx), min, max);
                        totnode++;
                }
-               node->done= 0;
+               node->done = FALSE;
        }
        if (totnode==0) return NULL;
        
index 3b757e753a45cca91e9f3d44bca5c02666332cdd..3f77638e25aa752e3b6e31a2b9eee50873a78789 100644 (file)
@@ -242,7 +242,7 @@ bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread)
        
        for (nts=lb->first; nts; nts=nts->next) {
                if (!nts->used) {
-                       nts->used= 1;
+                       nts->used = TRUE;
                        break;
                }
        }
@@ -250,7 +250,7 @@ bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread)
        if (!nts) {
                nts= MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack");
                nts->stack= MEM_dupallocN(exec->stack);
-               nts->used= 1;
+               nts->used = TRUE;
                BLI_addtail(lb, nts);
        }
 
index 9a9a27603dcb62bf152f2cd2642ddd6f6df228ae..5961c2b330b1c3eecf96577ffff6db9b117a8a97 100644 (file)
@@ -277,23 +277,23 @@ void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs)
        bNodeStack *nsin[MAX_SOCKET];   /* arbitrary... watch this */
        bNodeStack *nsout[MAX_SOCKET];  /* arbitrary... watch this */
        GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1];
-       int doit;
+       int do_it;
 
        stack= exec->stack;
 
        for (n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
                node = nodeexec->node;
                
-               doit = 0;
+               do_it = FALSE;
                /* for groups, only execute outputs for edited group */
                if (node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
                        if (do_outputs && (node->flag & NODE_DO_OUTPUT))
-                               doit = 1;
+                               do_it = TRUE;
                }
                else
-                       doit = 1;
+                       do_it = TRUE;
 
-               if (doit) {
+               if (do_it) {
                        if (node->typeinfo->gpufunc) {
                                node_get_stack(node, stack, nsin, nsout);
                                gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
index e2acef7bb737c79835b93a6b39a40253adc5b5a7..de23b3bf109cc614badc22ca21ca9dc0e3d077fc 100644 (file)
@@ -122,7 +122,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
 void BPY_driver_reset(void)
 {
        PyGILState_STATE gilstate;
-       int use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
+       int use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
 
        if (use_gil)
                gilstate = PyGILState_Ensure();
@@ -193,7 +193,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
                return 0.0f;
        }
 
-       use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
+       use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
 
        if (use_gil)
                gilstate = PyGILState_Ensure();
index b9d4c1ae94f8e9465e7dcd0e2971e8d234de680c..9fa02046e498ed7aa30e2257ef4fe94378125bd9 100644 (file)
@@ -660,7 +660,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
        PyObject *pyctx = (PyObject *)CTX_py_dict_get(C);
        PyObject *item = PyDict_GetItemString(pyctx, member);
        PointerRNA *ptr = NULL;
-       int done = 0;
+       int done = FALSE;
 
        if (item == NULL) {
                /* pass */
@@ -673,7 +673,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
 
                //result->ptr = ((BPy_StructRNA *)item)->ptr;
                CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data);
-               done = 1;
+               done = TRUE;
        }
        else if (PySequence_Check(item)) {
                PyObject *seq_fast = PySequence_Fast(item, "bpy_context_get sequence conversion");
@@ -703,7 +703,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
                        }
                        Py_DECREF(seq_fast);
 
-                       done = 1;
+                       done = TRUE;
                }
        }
 
index c2b0e1e777f8c3dec079536a8931c84e0890475b..a1cc1e23470f63200122f85665d662e3832ba68c 100644 (file)
@@ -168,7 +168,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
        float vec[4], fx, fy, fz;
        float fac, starmindist, clipend;
        float mat[4][4], stargrid, maxrand, maxjit, force, alpha;
-       int x, y, z, sx, sy, sz, ex, ey, ez, done = 0;
+       int x, y, z, sx, sy, sz, ex, ey, ez, done = FALSE;
        unsigned int totstar= 0;
        
        if (initfunc) {
@@ -683,7 +683,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
                }
        }
 
-       if (do_nmap_tangent != 0) {
+       if (do_nmap_tangent != FALSE) {
                SRenderMeshToTangent mesh2tangent;
                SMikkTSpaceContext sContext;
                SMikkTSpaceInterface sInterface;
@@ -1575,7 +1575,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
        float pa_time, pa_birthtime, pa_dietime;
        float random, simplify[2], pa_co[3];
        const float cfra= BKE_scene_frame_get(re->scene);
-       int i, a, k, max_k=0, totpart, dosimplify = 0, dosurfacecache = 0, use_duplimat = 0;
+       int i, a, k, max_k=0, totpart, do_simplify = FALSE, do_surfacecache = FALSE, use_duplimat = FALSE;
        int totchild=0;
        int seed, path_nbr=0, orco1=0, num;
        int totface, *origindex = 0;
@@ -1697,7 +1697,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
        if (psys->flag & PSYS_USE_IMAT) {
                /* psys->imat is the original emitter's inverse matrix, ob->obmat is the duplicated object's matrix */
                mult_m4_m4m4(duplimat, ob->obmat, psys->imat);
-               use_duplimat = 1;
+               use_duplimat = TRUE;
        }
 
 /* 2.6 setup strand rendering */
@@ -1744,10 +1744,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                        svert= strandbuf->vert;
 
                        if (re->r.mode & R_SPEED)
-                               dosurfacecache= 1;
+                               do_surfacecache = TRUE;
                        else if ((re->wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT|WO_INDIRECT_LIGHT)) && (re->wrld.ao_gather_method == WO_AOGATHER_APPROX))
                                if (ma->amb != 0.0f)
-                                       dosurfacecache= 1;
+                                       do_surfacecache = TRUE;
 
                        totface= psmd->dm->getNumTessFaces(psmd->dm);
                        origindex= psmd->dm->getTessFaceDataArray(psmd->dm, CD_ORIGINDEX);
@@ -1860,7 +1860,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                                get_particle_uvco_mcol(part->from, psmd->dm, parent->fuv, num, &sd);
                        }
 
-                       dosimplify = psys_render_simplify_params(psys, cpa, simplify);
+                       do_simplify = psys_render_simplify_params(psys, cpa, simplify);
 
                        if (strandbuf) {
                                int orignum= (origindex)? origindex[cpa->num]: cpa->num;
@@ -1892,7 +1892,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                        strand->vert= svert;
                        copy_v3_v3(strand->orco, sd.orco);
 
-                       if (dosimplify) {
+                       if (do_simplify) {
                                float *ssimplify= RE_strandren_get_simplify(obr, strand, 1);
                                ssimplify[0]= simplify[0];
                                ssimplify[1]= simplify[1];
@@ -1903,7 +1903,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                                copy_v3_v3(snor, sd.surfnor);
                        }
 
-                       if (dosurfacecache && num >= 0) {
+                       if (do_surfacecache && num >= 0) {
                                int *facenum= RE_strandren_get_face(obr, strand, 1);
                                *facenum= num;
                        }
@@ -2084,7 +2084,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
                        break;
        }
 
-       if (dosurfacecache)
+       if (do_surfacecache)
                strandbuf->surface= cache_strand_surface(re, obr, psmd->dm, mat, timeoffset);
 
 /* 4. clean up */
@@ -3263,8 +3263,8 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
        float *orco=0;
        int need_orco=0, need_stress=0, need_nmap_tangent=0, need_tangent=0;
        int a, a1, ok, vertofs;
-       int end, do_autosmooth=0, totvert = 0;
-       int use_original_normals= 0;
+       int end, do_autosmooth = FALSE, totvert = 0;
+       int use_original_normals = FALSE;
        int recalc_normals = 0; // false by default
        int negative_scale;
 
@@ -3339,7 +3339,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
 
        /* attempt to autsmooth on original mesh, only without subsurf */
        if (do_autosmooth && me->totvert==totvert && me->totface==dm->getNumTessFaces(dm))
-               use_original_normals= 1;
+               use_original_normals= TRUE;
        
        ms = (totvert==me->totvert)?me->msticky:NULL;
        
@@ -3354,7 +3354,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
                for (a=0; a<totvert; a++, mvert++) {
                        ver= RE_findOrAddVert(obr, obr->totvert++);
                        copy_v3_v3(ver->co, mvert->co);
-                       if (do_autosmooth==0) { /* autosmooth on original unrotated data to prevent differences between frames */
+                       if (do_autosmooth == FALSE) {   /* autosmooth on original unrotated data to prevent differences between frames */
                                normal_short_to_float_v3(ver->n, mvert->no);
                                mul_m4_v3(mat, ver->co);
                                mul_transposed_m3_v3(imat, ver->n);
@@ -3416,7 +3416,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
                                                
                                                if ( mface->mat_nr==a1 ) {
                                                        float len;
-                                                       int reverse_verts = negative_scale!=0 && do_autosmooth==0;
+                                                       int reverse_verts = (negative_scale != 0 && do_autosmooth == FALSE);
                                                        int rev_tab[] = {reverse_verts==0 ? 0 : 2, 1, reverse_verts==0 ? 2 : 0, 3};
                                                        v1= reverse_verts==0 ? mface->v1 : mface->v3;
                                                        v2= mface->v2;
@@ -4703,7 +4703,7 @@ void RE_Database_Free(Render *re)
        free_strand_surface(re);
        
        re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0;
-       re->i.convertdone= 0;
+       re->i.convertdone = FALSE;
 
        re->bakebuf= NULL;
 
@@ -5045,7 +5045,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
        re->lampren.first= re->lampren.last= NULL;
        
        slurph_opt= 0;
-       re->i.partsdone= 0;     /* signal now in use for previewrender */
+       re->i.partsdone = FALSE;        /* signal now in use for previewrender */
        
        /* in localview, lamps are using normal layers, objects only local bits */
        if (re->lay & 0xFF000000)
@@ -5164,7 +5164,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
        if (re->test_break(re->tbh))
                RE_Database_Free(re);
        else
-               re->i.convertdone= 1;
+               re->i.convertdone = TRUE;
        
        re->i.infostr= NULL;
        re->stats_draw(re->sdh, &re->i);
@@ -5651,8 +5651,8 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
                                // NT check for fluidsim special treatment
                                fluidmd = (FluidsimModifierData *)modifiers_findByType(obi->ob, eModifierType_Fluidsim);
                                if (fluidmd && fluidmd->fss && (fluidmd->fss->type & OB_FLUIDSIM_DOMAIN)) {
-                                       // use preloaded per vertex simulation data, only does calculation for step=1
-                                       // NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls...
+                                       /* use preloaded per vertex simulation data, only does calculation for step=1 */
+                                       /* NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls... */
                                        load_fluidsimspeedvectors(re, obi, oldobi->vectors, step);
                                }
                                else {
index eebcf23a7a6e3d916f974995c567ecec39329946..6714fe1a29d09ea19d54cddc884d6a2cf9631657 100644 (file)
@@ -505,7 +505,7 @@ static void render_envmap(Render *re, EnvMap *env)
 void make_envmaps(Render *re)
 {
        Tex *tex;
-       int do_init= 0, depth= 0, trace;
+       int do_init = FALSE, depth= 0, trace;
        
        if (!(re->r.mode & R_ENVMAP)) return;
        
@@ -559,7 +559,7 @@ void make_envmaps(Render *re)
                                                                if (env->ok==0 && depth==0) env->recalc= 1;
                                                                
                                                                if (env->ok==0) {
-                                                                       do_init= 1;
+                                                                       do_init = TRUE;
                                                                        render_envmap(re, env);
                                                                        
                                                                        if (depth==env->depth) env->recalc= 0;
index e712950f4f8bf85d36e332b96ce91c19169461a7..c0382834987a41849ce6fd2012f57a30d365730b 100644 (file)
@@ -549,7 +549,7 @@ void initparts(Render *re)
        /* this is render info for caller, is not reset when parts are freed! */
        re->i.totpart= 0;
        re->i.curpart= 0;
-       re->i.partsdone= 0;
+       re->i.partsdone = FALSE;
        
        /* just for readable code.. */
        xminb= re->disprect.xmin;
index 79f94c77dded396758990294a8e6024c20fb1bb8..7549207af8727fe392569af7bd2483a9c2774444 100644 (file)
@@ -1302,7 +1302,7 @@ static int composite_needs_render(Scene *sce, int this_scene)
        bNode *node;
        
        if (ntree==NULL) return 1;
-       if (sce->use_nodes==0) return 1;
+       if (sce->use_nodes == FALSE) return 1;
        if ((sce->r.scemode & R_DOCOMP)==0) return 1;
        
        for (node= ntree->nodes.first; node; node= node->next) {
@@ -2074,18 +2074,18 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
 
        /* write movie or image */
        if (BKE_imtype_is_movie(scene->r.im_format.imtype)) {
-               int dofree = 0;
+               int do_free = FALSE;
                unsigned int *rect32 = (unsigned int *)rres.rect32;
                /* note; the way it gets 32 bits rects is weak... */
                if (rres.rect32 == NULL) {
                        rect32 = MEM_mapallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
                        RE_ResultGet32(re, rect32);
-                       dofree = 1;
+                       do_free = TRUE;
                }
 
                ok= mh->append_movie(&re->r, scene->r.sfra, scene->r.cfra, (int *)rect32,
                                     rres.rectx, rres.recty, re->reports);
-               if (dofree) {
+               if (do_free) {
                        MEM_freeN(rect32);
                }
                printf("Append frame %d", scene->r.cfra);
index ac48a5f41f245b3c2f0ec4da71c3c074f77e9042..0aeee7e22e8df515b482765ac0c2deb4cc83f4b6 100644 (file)
@@ -566,7 +566,7 @@ void shadeSunView(float col_r[3], const float view[3])
        GroupObject *go;
        LampRen *lar;
        float sview[3];
-       int do_init= 1;
+       int do_init = TRUE;
        
        for (go=R.lights.first; go; go= go->next) {
                lar= go->lampren;
@@ -581,7 +581,7 @@ void shadeSunView(float col_r[3], const float view[3])
                                if (sview[2] < 0.0f)
                                        sview[2] = 0.0f;
                                normalize_v3(sview);
-                               do_init= 0;
+                               do_init = FALSE;
                        }
                        
                        GetSkyXYZRadiancef(lar->sunsky, sview, colorxyz);
index f550cd8206137c258fcb5359179dde50aa74c459..726d89a7c3ecac437d8f43d9196902895ee99bbf 100644 (file)
@@ -721,7 +721,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con
                shi.lay= origshi->lay;
                shi.passflag= SCE_PASS_COMBINED; /* result of tracing needs no pass info */
                shi.combinedflag= 0xFFFFFF;              /* ray trace does all options */
-               //shi.do_preview= 0; // memset above, so don't need this
+               //shi.do_preview = FALSE; // memset above, so don't need this
                shi.light_override= origshi->light_override;
                shi.mat_override= origshi->mat_override;
                
@@ -1176,13 +1176,13 @@ static QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int t
 
        for (qsa=re->qmcsamplers[thread].first; qsa; qsa=qsa->next) {
                if (qsa->type == type && qsa->tot == tot && !qsa->used) {
-                       qsa->used= 1;
+                       qsa->used = TRUE;
                        return qsa;
                }
        }
 
        qsa= QMC_initSampler(type, tot);
-       qsa->used= 1;
+       qsa->used = TRUE;
        BLI_addtail(&re->qmcsamplers[thread], qsa);
 
        return qsa;
@@ -1483,8 +1483,8 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
        float diff[3];
        int do_tra, do_mir;
        
-       do_tra= ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f && (shi->depth <= shi->mat->ray_depth_tra));
-       do_mir= ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror!=0.0f && (shi->depth <= shi->mat->ray_depth));
+       do_tra = ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha != 1.0f && (shi->depth <= shi->mat->ray_depth_tra));
+       do_mir = ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror != 0.0f && (shi->depth <= shi->mat->ray_depth));
        
        /* raytrace mirror and refract like to separate the spec color */
        if (shi->combinedflag & SCE_PASS_SPEC)
@@ -2195,7 +2195,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
        float adapt_thresh = lar->adapt_thresh;
        int min_adapt_samples=4, max_samples = lar->ray_totsamp;
        float *co;
-       int do_soft=1, full_osa=0, i;
+       int do_soft = TRUE, full_osa = FALSE, i;
 
        float min[3], max[3];
        RayHint bb_hint;
@@ -2210,8 +2210,8 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
        else
                shadfac[3]= 1.0f;
        
-       if (lar->ray_totsamp < 2) do_soft = 0;
-       if ((R.r.mode & R_OSA) && (R.osa > 0) && (shi->vlr->flag & R_FULL_OSA)) full_osa = 1;
+       if (lar->ray_totsamp < 2) do_soft = FALSE;
+       if ((R.r.mode & R_OSA) && (R.osa > 0) && (shi->vlr->flag & R_FULL_OSA)) full_osa = TRUE;
        
        if (full_osa) {
                if (do_soft) max_samples  = max_samples/R.osa + 1;
index 58a4e7c9828e7df1610dbcadccd842c0ffe3c5c9..bf18c04cd73048e5b110e485a8f3de693f02832b 100644 (file)
@@ -1367,7 +1367,7 @@ int multitex_ext_safe(Tex *tex, float *texvec, TexResult *texres)
 {
        int use_nodes= tex->use_nodes, retval;
        
-       tex->use_nodes= 0;
+       tex->use_nodes = FALSE;
        retval= multitex_nodes(tex, texvec, NULL, NULL, 0, texres, 0, 0, NULL, NULL);
        tex->use_nodes= use_nodes;
        
@@ -1714,7 +1714,7 @@ static void compatible_bump_uv_derivs(CompatibleBump *compat_bump, ShadeInput *s
                                compat_bump->nn[1] = -shi->vn[1];
                                compat_bump->nn[2] = -shi->vn[2];
                                ortho_basis_v3v3_v3(compat_bump->nu, compat_bump->nv, compat_bump->nn);
-                               compat_bump->nunvdone= 1;
+                               compat_bump->nunvdone = TRUE;
                        }
 
                        if (tf) {
@@ -1766,7 +1766,7 @@ static int compatible_bump_compute(CompatibleBump *compat_bump, ShadeInput *shi,
                // render normal is negated
                negate_v3_v3(compat_bump->nn, shi->vn);
                ortho_basis_v3v3_v3(compat_bump->nu, compat_bump->nv, compat_bump->nn);
-               compat_bump->nunvdone= 1;
+               compat_bump->nunvdone = TRUE;
        }
 
        // two methods, either constant based on main image resolution,
@@ -1946,7 +1946,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
                ntap_bump->fPrevMagnitude = 1.0f;
                ntap_bump->iPrevBumpSpace = 0;
                
-               ntap_bump->init_done = 1;
+               ntap_bump->init_done = TRUE;
        }
 
        // resolve image dimensions
@@ -2171,8 +2171,8 @@ void do_material_tex(ShadeInput *shi, Render *re)
        float *co = NULL, *dx = NULL, *dy = NULL;
        float fact, facm, factt, facmm, stencilTin=1.0;
        float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
-       int tex_nr, rgbnor= 0, warpdone=0;
-       int use_compat_bump = 0, use_ntap_bump = 0;
+       int tex_nr, rgbnor= 0, warp_done = FALSE;
+       int use_compat_bump = FALSE, use_ntap_bump = FALSE;
        int found_nmapping = 0, found_deriv_map = 0;
        int iFirstTimeNMap=1;
 
@@ -2195,24 +2195,24 @@ void do_material_tex(ShadeInput *shi, Render *re)
 
                        found_deriv_map = (tex->type==TEX_IMAGE) && (tex->imaflag & TEX_DERIVATIVEMAP);
                        use_compat_bump= (mtex->texflag & MTEX_COMPAT_BUMP);
-                       use_ntap_bump= ((mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP))!=0 || found_deriv_map!=0) ? 1 : 0;
+                       use_ntap_bump = ((mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP))!=0 || found_deriv_map!=0) ? TRUE : FALSE;
 
                        /* XXX texture node trees don't work for this yet */
                        if (tex->nodetree && tex->use_nodes) {
-                               use_compat_bump = 0;
-                               use_ntap_bump = 0;
+                               use_compat_bump = FALSE;
+                               use_ntap_bump = FALSE;
                        }
                        
                        /* case displacement mapping */
-                       if (shi->osatex==0 && use_ntap_bump) {
-                               use_ntap_bump = 0;
-                               use_compat_bump = 1;
+                       if (shi->osatex == 0 && use_ntap_bump) {
+                               use_ntap_bump = FALSE;
+                               use_compat_bump = TRUE;
                        }
                        
                        /* case ocean */
                        if (tex->type == TEX_OCEAN) {
-                               use_ntap_bump = 0;
-                               use_compat_bump = 0;
+                               use_ntap_bump = FALSE;
+                               use_compat_bump = FALSE;
                        }
 
                        /* which coords */
@@ -2322,7 +2322,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
                        }
                        else texres.nor= NULL;
                        
-                       if (warpdone) {
+                       if (warp_done) {
                                add_v3_v3v3(tempvec, co, warpvec);
                                co= tempvec;
                        }
@@ -2409,7 +2409,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
                                        warpvec[0]= mtex->warpfac*warpnor[0];
                                        warpvec[1]= mtex->warpfac*warpnor[1];
                                        warpvec[2]= mtex->warpfac*warpnor[2];
-                                       warpdone= 1;
+                                       warp_done = TRUE;
                                }
 #if 0                          
                                if (mtex->texflag & MTEX_VIEWSPACE) {
@@ -2681,7 +2681,7 @@ void do_material_tex(ShadeInput *shi, Render *re)
                        }
                }
        }
-       if ((use_compat_bump || use_ntap_bump || found_nmapping) && (shi->mat->mode & MA_TANGENT_V)!=0) {
+       if ((use_compat_bump || use_ntap_bump || found_nmapping) && (shi->mat->mode & MA_TANGENT_V) != 0) {
                const float fnegdot = -dot_v3v3(shi->vn, shi->tang);
                // apply Gram-Schmidt projection
                madd_v3_v3fl(shi->tang,  shi->vn, fnegdot);
index 0dc7f35dc5661dfa0c05f7da742287708c3a2c7b..2fd8e49d34e002927c80cb34d264861a4d08f160 100644 (file)
@@ -683,7 +683,7 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl)
        for (y=pa->disprect.ymin; y<pa->disprect.ymax; y++) {
                for (x=pa->disprect.xmin; x<pa->disprect.xmax; x++, od+=4) {
                        float col[4];
-                       int sample, done= 0;
+                       int sample, done = FALSE;
                        
                        for (sample= 0; sample<totsample; sample++) {
                                float *pass= rlpp[sample]->rectf + od;
@@ -692,7 +692,7 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl)
                                        
                                        if (done==0) {
                                                shadeSkyPixel(col, x, y, pa->thread);
-                                               done= 1;
+                                               done = TRUE;
                                        }
                                        
                                        if (pass[3]==0.0f) {
@@ -748,7 +748,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
                                float *zrect= RE_RenderLayerGetPass(rlpp[sample], SCE_PASS_Z) + od;
                                float *rgbrect = rlpp[sample]->rectf + 4*od;
                                float rgb[3] = {0};
-                               int done= 0;
+                               int done = FALSE;
                                
                                for (go=R.lights.first; go; go= go->next) {
                                
@@ -780,7 +780,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
                                                        
                                                        if (done==0) {
                                                                copy_v3_v3(rgb, tmp_rgb);
-                                                               done = 1;                                               
+                                                               done = TRUE;
                                                        }
                                                        else {
                                                                rgb[0] = 0.5f*rgb[0] + 0.5f*tmp_rgb[0];
@@ -1935,7 +1935,7 @@ void add_halo_flare(Render *re)
        RenderResult *rr= re->result;
        RenderLayer *rl;
        HaloRen *har;
-       int a, mode, do_draw=0;
+       int a, mode, do_draw = FALSE;
        
        /* for now, we get the first renderlayer in list with halos set */
        for (rl= rr->layers.first; rl; rl= rl->next)
@@ -1954,7 +1954,7 @@ void add_halo_flare(Render *re)
                har= R.sortedhalos[a];
                
                if (har->flarec) {
-                       do_draw= 1;
+                       do_draw = TRUE;
                        renderflare(rr, rl->rectf, har);
                }
        }
@@ -1988,7 +1988,7 @@ typedef struct BakeShade {
        unsigned int *rect;
        float *rect_float;
        
-       int usemask;
+       int use_mask;
        char *rect_mask; /* bake pixel mask */
 
        float dxco[3], dyco[3];
@@ -2408,12 +2408,12 @@ static int get_next_bake_face(BakeShade *bs)
        ObjectRen *obr;
        VlakRen *vlr;
        MTFace *tface;
-       static int v= 0, vdone= 0;
+       static int v= 0, vdone = FALSE;
        static ObjectInstanceRen *obi= NULL;
        
        if (bs==NULL) {
                vlr= NULL;
-               v= vdone= 0;
+               v= vdone = FALSE;
                obi= R.instancetable.first;
                return 0;
        }
@@ -2507,7 +2507,7 @@ static void shade_tface(BakeShade *bs)
        bs->rect_float= bs->ibuf->rect_float;
        bs->quad= 0;
        
-       if (bs->usemask) {
+       if (bs->use_mask) {
                if (bs->ibuf->userdata==NULL) {
                        BLI_lock_thread(LOCK_CUSTOM1);
                        if (bs->ibuf->userdata==NULL) /* since the thread was locked, its possible another thread alloced the value */
@@ -2594,7 +2594,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
        BakeShade *handles;
        ListBase threads;
        Image *ima;
-       int a, vdone=0, usemask=0, result=BAKE_RESULT_OK;
+       int a, vdone = FALSE, use_mask = FALSE, result = BAKE_RESULT_OK;
        
        /* initialize render global */
        R= *re;
@@ -2605,7 +2605,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
        
        /* do we need a mask? */
        if (re->r.bake_filter)
-               usemask = 1;
+               use_mask = TRUE;
        
        /* baker uses this flag to detect if image was initialized */
        for (ima= G.main->image.first; ima; ima= ima->id.next) {
@@ -2642,7 +2642,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
                handles[a].actob= actob;
                handles[a].zspan= MEM_callocN(sizeof(ZSpan), "zspan for bake");
                
-               handles[a].usemask = usemask;
+               handles[a].use_mask = use_mask;
 
                handles[a].do_update = do_update; /* use to tell the view to update */
                
@@ -2655,7 +2655,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
                PIL_sleep_ms(50);
 
                /* calculate progress */
-               for (vdone=0, a=0; a<re->r.threads; a++)
+               for (vdone = FALSE, a=0; a<re->r.threads; a++)
                        vdone+= handles[a].vdone;
                if (progress)
                        *progress = (float)(vdone / (float)re->totvlak);
index 4a9e4be7f86d9c3bd0fab0e450e654ca298973cb..bc61a26564dbcc232b433b77272bf337fabce147 100644 (file)
@@ -1205,7 +1205,9 @@ static int panotestclip(Render *re, int do_pano, float *v)
        float abs4;
        short c=0;
 
-       if (do_pano==0) return testclip(v);
+       if (do_pano == FALSE) {
+               return testclip(v);
+       }
 
        abs4= fabs(v[3]);
 
index 53d06893a3ffc5af3b55ec97987252c588b201f1..a0f5caa826b353f095e4a9cb5c8f782a87b3bdb6 100644 (file)
@@ -161,7 +161,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
        double a, b, c, disc, nray[3], npos[3];
        double t0, t1 = 0.0f, t2= 0.0f, t3;
        float p1[3], p2[3], ladist, maxz = 0.0f, maxy = 0.0f, haint;
-       int snijp, doclip=1, use_yco=0;
+       int snijp, do_clip = TRUE, use_yco = FALSE;
 
        *intens= 0.0f;
        haint= lar->haint;
@@ -196,7 +196,9 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
 
 
        /* rotate maxz */
-       if (shi->co[2]==0.0f) doclip= 0;        /* for when halo at sky */
+       if (shi->co[2]==0.0f) {
+               do_clip = FALSE;  /* for when halo at sky */
+       }
        else {
                p1[0]= shi->co[0]-lar->co[0];
                p1[1]= shi->co[1]-lar->co[1];
@@ -206,7 +208,9 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
                maxz*= lar->sh_zfac;
                maxy= lar->imat[0][1]*p1[0]+lar->imat[1][1]*p1[1]+lar->imat[2][1]*p1[2];
 
-               if ( fabs(nray[2]) < FLT_EPSILON ) use_yco= 1;
+               if (fabsf(nray[2]) < FLT_EPSILON) {
+                       use_yco = TRUE;
+               }
        }
        
        /* scale z to make sure volume is normalized */ 
@@ -261,7 +265,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
                if (ok1==0 && ok2==0) return;
                
                /* intersction point with -ladist, the bottom of the cone */
-               if (use_yco==0) {
+               if (use_yco == FALSE) {
                        t3= ((double)(-ladist)-npos[2])/nray[2];