Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
authorCampbell Barton <ideasman42@gmail.com>
Tue, 1 Apr 2014 00:34:00 +0000 (11:34 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 1 Apr 2014 04:22:28 +0000 (15:22 +1100)
407 files changed:
CMakeLists.txt
SConstruct
source/blender/avi/intern/avi_mjpeg.c
source/blender/blenfont/BLF_api.h
source/blender/blenkernel/BKE_addon.h
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/BKE_constraint.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/BKE_depsgraph.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/BKE_report.h
source/blender/blenkernel/BKE_text.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/addon.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/idprop.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lamp.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/modifiers_bmesh.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/rigidbody.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/speaker.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenkernel/intern/tracking_solver.c
source/blender/blenkernel/intern/tracking_stabilize.c
source/blender/blenkernel/intern/unit.c
source/blender/blenkernel/intern/world.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenkernel/intern/writeframeserver.c
source/blender/blenlib/BLI_math_matrix.h
source/blender/blenlib/BLI_stack.h
source/blender/blenlib/BLI_sys_types.h
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/string_cursor_utf8.c
source/blender/blenlib/intern/uvproject.c
source/blender/blenlib/intern/voronoi.c
source/blender/blenlib/intern/winstuff.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/collada_utils.cpp
source/blender/compositor/intern/COM_ExecutionSystemHelper.h
source/blender/compositor/intern/COM_compositor.cpp
source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
source/blender/compositor/operations/COM_MapRangeOperation.cpp
source/blender/compositor/operations/COM_MaskOperation.cpp
source/blender/compositor/operations/COM_OutputFileOperation.cpp
source/blender/compositor/operations/COM_PreviewOperation.cpp
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/armature_add.c
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/armature_select.c
source/blender/editors/armature/armature_skinning.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_group.c
source/blender/editors/armature/pose_select.c
source/blender/editors/armature/pose_slide.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_buttons.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_keyframing.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/io/io_collada.c
source/blender/editors/mask/mask_edit.c
source/blender/editors/mask/mask_ops.c
source/blender/editors/mask/mask_select.c
source/blender/editors/mask/mask_shapekey.c
source/blender/editors/mesh/editmesh_path.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_lattice.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/object/object_select.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_ops.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/render/render_view.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_intern.h
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_clip/clip_dopesheet_ops.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_clip/clip_graph_ops.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/clip_toolbar.c
source/blender/editors/space_clip/clip_utils.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_clip/tracking_select.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_intern.h
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_draw.c
source/blender/editors/space_info/info_report.c
source/blender/editors/space_logic/logic_ops.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_nla/nla_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_modifier.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/sequencer_view.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_autocomplete.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_format.h
source/blender/editors/space_text/text_format_lua.c
source/blender/editors/space_text/text_format_osl.c
source/blender/editors/space_text/text_format_py.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.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_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/ed_util.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
source/blender/freestyle/intern/stroke/Operators.cpp
source/blender/freestyle/intern/view_map/BoxGrid.h
source/blender/freestyle/intern/view_map/SphericalGrid.h
source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
source/blender/freestyle/intern/winged_edge/Curvature.cpp
source/blender/gpu/GPU_buffers.h
source/blender/gpu/GPU_draw.h
source/blender/gpu/GPU_extensions.h
source/blender/gpu/GPU_material.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/colormanagement.c
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/imbuf.h
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/indexer_dv.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/moviecache.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/util.c
source/blender/imbuf/intern/writeimage.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_armature_api.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_linestyle.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mask.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_rigidbody.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_vfont.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_ocean.c
source/blender/modifiers/intern/MOD_skin.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/intern/node_exec.h
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/texture/nodes/node_texture_output.c
source/blender/python/generic/idprop_py_api.c
source/blender/quicktime/apple/qtkit_import.m
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/initrender.h
source/blender/render/intern/include/render_result.h
source/blender/render/intern/include/renderdatabase.h
source/blender/render/intern/raytrace/rayobject_octree.cpp
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/multires_bake.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_result.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/texture_ocean.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_playanim.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Expressions/IfExpr.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Rasterizer/RAS_TexVert.cpp

index db89daa..8b57251 100644 (file)
@@ -155,9 +155,6 @@ mark_as_advanced(WITH_HEADLESS)
 option(WITH_AUDASPACE    "Build with blenders audio library (only disable if you know what you're doing!)" ON)
 mark_as_advanced(WITH_AUDASPACE)
 
-option(WITH_BOOL_COMPAT "Continue defining \"TRUE\" and \"FALSE\" until these can be replaced with \"true\" and \"false\" from stdbool.h" ON)
-mark_as_advanced(WITH_BOOL_COMPAT)
-
 # (unix defaults to OpenMP On)
 if((UNIX AND NOT APPLE) OR (MINGW))
        set(PLATFORM_DEFAULT ON)
@@ -509,9 +506,6 @@ TEST_STDBOOL_SUPPORT()
 if(HAVE_STDBOOL_H)
        add_definitions(-DHAVE_STDBOOL_H)
 endif()
-if(WITH_BOOL_COMPAT)
-       add_definitions(-DWITH_BOOL_COMPAT)
-endif()
 
 #-----------------------------------------------------------------------------
 # Check for valid directories
index dde9d66..267e793 100644 (file)
@@ -505,7 +505,6 @@ else:
 env['CPPFLAGS'].append('-DWITH_AUDASPACE')
 env['CPPFLAGS'].append('-DWITH_AVI')
 env['CPPFLAGS'].append('-DWITH_OPENNL')
-env['CPPFLAGS'].append('-DWITH_BOOL_COMPAT')
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
     env['CPPFLAGS'].append('-D_ALLOW_KEYWORD_MACROS')
 
index a2d48c7..857501c 100644 (file)
@@ -57,8 +57,8 @@ static void add_huff_table(j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const UI
        memcpy((*htblptr)->bits, bits, sizeof((*htblptr)->bits));
        memcpy((*htblptr)->huffval, val, sizeof((*htblptr)->huffval));
 
-       /* Initialize sent_table FALSE so table will be written to JPEG file. */
-       (*htblptr)->sent_table = FALSE;
+       /* Initialize sent_table false so table will be written to JPEG file. */
+       (*htblptr)->sent_table = false;
 }
 
 /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
@@ -165,7 +165,7 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
        dinfo.err = jpeg_std_error(&jerr);
        jpeg_create_decompress(&dinfo);
        jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize);
-       jpeg_read_header(&dinfo, TRUE);
+       jpeg_read_header(&dinfo, true);
        if (dinfo.dc_huff_tbl_ptrs[0] == NULL) {
                std_huff_tables(&dinfo);
        }
@@ -187,7 +187,7 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
        jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize - numbytes);
 
        numbytes = 0;
-       jpeg_read_header(&dinfo, TRUE);
+       jpeg_read_header(&dinfo, true);
        if (dinfo.dc_huff_tbl_ptrs[0] == NULL) {
                std_huff_tables(&dinfo);
        }
@@ -224,21 +224,21 @@ static void Compress_JPEG(int quality, unsigned char *outbuffer, const unsigned
        jpeg_set_defaults(&cinfo);
        jpeg_set_colorspace(&cinfo, JCS_YCbCr);
                
-       jpeg_set_quality(&cinfo, quality, TRUE);
+       jpeg_set_quality(&cinfo, quality, true);
 
-       cinfo.dc_huff_tbl_ptrs[0]->sent_table = TRUE;
-       cinfo.dc_huff_tbl_ptrs[1]->sent_table = TRUE;
-       cinfo.ac_huff_tbl_ptrs[0]->sent_table = TRUE;
-       cinfo.ac_huff_tbl_ptrs[1]->sent_table = TRUE;
+       cinfo.dc_huff_tbl_ptrs[0]->sent_table = true;
+       cinfo.dc_huff_tbl_ptrs[1]->sent_table = true;
+       cinfo.ac_huff_tbl_ptrs[0]->sent_table = true;
+       cinfo.ac_huff_tbl_ptrs[1]->sent_table = true;
 
        cinfo.comp_info[0].component_id = 0;
        cinfo.comp_info[0].v_samp_factor = 1;
        cinfo.comp_info[1].component_id = 1;
        cinfo.comp_info[2].component_id = 2;
 
-       cinfo.write_JFIF_header = FALSE;
+       cinfo.write_JFIF_header = false;
 
-       jpeg_start_compress(&cinfo, FALSE);
+       jpeg_start_compress(&cinfo, false);
 
        i = 0;
        marker[i++] = 'A';
@@ -378,7 +378,7 @@ static void jpegmemdestmgr_init_destination(j_compress_ptr cinfo)
 static boolean jpegmemdestmgr_empty_output_buffer(j_compress_ptr cinfo)
 {
        (void)cinfo; /* unused */
-       return TRUE;
+       return true;
 }
 
 static void jpegmemdestmgr_term_destination(j_compress_ptr cinfo)
@@ -422,7 +422,7 @@ static boolean jpegmemsrcmgr_fill_input_buffer(j_decompress_ptr dinfo)
        dinfo->src->next_input_byte = buf;
        dinfo->src->bytes_in_buffer = 2;
        
-       return TRUE;
+       return true;
 }
 
 static void jpegmemsrcmgr_skip_input_data(j_decompress_ptr dinfo, long skipcnt)
index e01631f..2a27a3d 100644 (file)
@@ -154,11 +154,11 @@ void BLF_shadow_offset(int fontid, int x, int y);
 /* Set the buffer, size and number of channels to draw, one thing to take care is call
  * this function with NULL pointer when we finish, for example:
  *
- *     BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, TRUE, NULL);
+ *     BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, true, NULL);
  *
  *     ... set color, position and draw ...
  *
- *     BLF_buffer(NULL, NULL, NULL, 0, 0, FALSE, NULL);
+ *     BLF_buffer(NULL, NULL, NULL, 0, 0, false, NULL);
  */
 void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display);
 
index 739a4e3..9c09fff 100644 (file)
@@ -36,7 +36,7 @@ typedef struct bAddonPrefType {
        ExtensionRNA ext;
 } bAddonPrefType;
 
-bAddonPrefType *BKE_addon_pref_type_find(const char *idname, int quiet);
+bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet);
 void            BKE_addon_pref_type_add(bAddonPrefType *apt);
 void            BKE_addon_pref_type_remove(bAddonPrefType *apt);
 
index 60e03af..8532975 100644 (file)
@@ -93,7 +93,7 @@ void BKE_armature_where_is(struct bArmature *arm);
 void BKE_armature_where_is_bone(struct Bone *bone, struct Bone *prevbone);
 void BKE_pose_rebuild(struct Object *ob, struct bArmature *arm);
 void BKE_pose_where_is(struct Scene *scene, struct Object *ob);
-void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, int do_extra);
+void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, bool do_extra);
 void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
 
 /* get_objectspace_bone_matrix has to be removed still */
@@ -111,8 +111,8 @@ void BKE_armature_mat_pose_to_delta(float delta_mat[4][4], float pose_mat[4][4],
 
 void BKE_armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[4][4], float outmat[4][4]);
 
-void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[3][3], short use_compat);
-void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[4][4], short use_comat);
+void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[3][3], bool use_compat);
+void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[4][4], bool use_comat);
 void BKE_pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]);
 void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
 
index 49ba9c9..01b401c 100644 (file)
@@ -69,7 +69,7 @@ float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);
 
 typedef struct CameraParams {
        /* lens */
-       int is_ortho;
+       bool is_ortho;
        float lens;
        float ortho_scale;
        float zoom;
index a69a960..9234625 100644 (file)
@@ -55,7 +55,7 @@ void                curvemapping_set_black_white(struct CurveMapping *cumap, con
 #define CURVEMAP_SLOPE_POSITIVE 1
 void                    curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int preset, int slope);
 void                    curvemap_remove(struct CurveMap *cuma, const short flag);
-int                     curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
+bool                    curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
 struct CurveMapPoint   *curvemap_insert(struct CurveMap *cuma, float x, float y);
 void                    curvemap_sethandle(struct CurveMap *cuma, int type);
 
index c79dc62..8a9d358 100644 (file)
@@ -123,7 +123,7 @@ bConstraintTypeInfo *BKE_get_constraint_typeinfo(int type);
 void BKE_unique_constraint_name(struct bConstraint *con, struct ListBase *list);
 
 void BKE_free_constraints(struct ListBase *list);
-void BKE_copy_constraints(struct ListBase *dst, const struct ListBase *src, int do_extern);
+void BKE_copy_constraints(struct ListBase *dst, const struct ListBase *src, bool do_extern);
 void BKE_relink_constraints(struct ListBase *list);
 void BKE_id_loop_constraints(struct ListBase *list, ConstraintIDFunc func, void *userdata);
 void BKE_free_constraint_data(struct bConstraint *con);
index 2834a37..877e376 100644 (file)
@@ -185,7 +185,7 @@ enum {
 PointerRNA CTX_data_pointer_get(const bContext *C, const char *member);
 PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type);
 ListBase CTX_data_collection_get(const bContext *C, const char *member);
-ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const short use_rna, const short use_all);
+ListBase CTX_data_dir_get_ex(const bContext *C, const bool use_store, const bool use_rna, const bool use_all);
 ListBase CTX_data_dir_get(const bContext *C);
 int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb, short *r_type);
 
index 0db2e6a..c4dfd9d 100644 (file)
@@ -120,7 +120,7 @@ void BKE_curve_rect_from_textbox(const struct Curve *cu, const struct TextBox *t
 
 /* ** Nurbs ** */
 
-int BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]);
+bool BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]);
 
 int BKE_nurbList_verts_count(struct ListBase *nurb);
 int BKE_nurbList_verts_count_without_handles(struct ListBase *nurb);
index 05bb01a..2a3459d 100644 (file)
@@ -127,7 +127,7 @@ int  DAG_id_type_tagged(struct Main *bmain, short idtype);
 
 void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
 void DAG_ids_flush_tagged(struct Main *bmain);
-void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time);
+void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, bool time);
 void DAG_ids_clear_recalc(struct Main *bmain);
 
 /* Armature: sorts the bones according to dependencies between them */
index f7fd745..db052f5 100644 (file)
@@ -60,9 +60,11 @@ void    BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char
 bool    BKE_imbuf_alpha_test(struct ImBuf *ibuf);
 int     BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
 int     BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
-int     BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
-void    BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const struct ImageFormatData *im_format, const short use_ext, const short use_frames);
-void    BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
+int     BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool is_copy);
+void    BKE_makepicstring(char *string, const char *base, const char *relbase, int frame,
+                          const struct ImageFormatData *im_format, const bool use_ext, const bool use_frames);
+void    BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame,
+                                    const char imtype, const bool use_ext, const bool use_frames);
 int     BKE_add_image_extension(char *string, const struct ImageFormatData *im_format);
 int     BKE_add_image_extension_from_type(char *string, const char imtype);
 char    BKE_ftype_to_imtype(const int ftype);
@@ -162,7 +164,8 @@ struct Image *BKE_image_load(struct Main *bmain, const char *filepath);
 struct Image *BKE_image_load_exists(const char *filepath);
 
 /* adds image, adds ibuf, generates color or pattern */
-struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4]);
+struct Image *BKE_image_add_generated(
+        struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4]);
 /* adds image from imbuf, owns imbuf */
 struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf);
 
index c866fbb..89d3107 100644 (file)
@@ -83,8 +83,8 @@ void assign_matarar(struct Object *ob, struct Material ***matar, short totcol);
 
 short find_material_index(struct Object *ob, struct Material *ma);
 
-int object_add_material_slot(struct Object *ob);
-int object_remove_material_slot(struct Object *ob);
+bool object_add_material_slot(struct Object *ob);
+bool object_remove_material_slot(struct Object *ob);
 
 /* rna api */
 void BKE_material_resize_id(struct ID *id, short totcol, bool do_id_user);
@@ -98,7 +98,7 @@ void init_render_materials(struct Main *, int, float *);
 void end_render_material(struct Material *);
 void end_render_materials(struct Main *);
 
-int material_in_material(struct Material *parmat, struct Material *mat);
+bool material_in_material(struct Material *parmat, struct Material *mat);
 
 void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
 
index dc12213..09c5776 100644 (file)
@@ -459,7 +459,7 @@ void            nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node);
 
 void            nodeToView(struct bNode *node, float x, float y, float *rx, float *ry);
 void            nodeFromView(struct bNode *node, float x, float y, float *rx, float *ry);
-int             nodeAttachNodeCheck(struct bNode *node, struct bNode *parent);
+bool            nodeAttachNodeCheck(struct bNode *node, struct bNode *parent);
 void            nodeAttachNode(struct bNode *node, struct bNode *parent);
 void            nodeDetachNode(struct bNode *node);
 
@@ -542,7 +542,7 @@ BLI_INLINE bool                       BKE_node_instance_hash_iterator_done(bNode
 /* Node Previews */
 
 int             BKE_node_preview_used(struct bNode *node);
-bNodePreview   *BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create);
+bNodePreview   *BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create);
 bNodePreview   *BKE_node_preview_copy(struct bNodePreview *preview);
 void            BKE_node_preview_free(struct bNodePreview *preview);
 void            BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize, int create_previews);
index ef28484..4b4deea 100644 (file)
@@ -97,7 +97,7 @@ bool BKE_object_lod_is_usable(struct Object *ob, struct Scene *scene);
 struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct Scene *scene);
 struct Object *BKE_object_lod_matob_get(struct Object *ob, struct Scene *scene);
 
-struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, int copy_caches);
+struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches);
 struct Object *BKE_object_copy(struct Object *ob);
 void BKE_object_make_local(struct Object *ob);
 bool BKE_object_is_libdata(struct Object *ob);
index e62bd2b..12c4e0b 100644 (file)
@@ -172,6 +172,6 @@ typedef struct SculptSession {
 
 void free_sculptsession(struct Object *ob);
 void free_sculptsession_deformMats(struct SculptSession *ss);
-void sculptsession_bm_to_me(struct Object *ob, int reorder);
+void sculptsession_bm_to_me(struct Object *ob, bool reorder);
 void sculptsession_bm_to_me_for_render(struct Object *object);
 #endif
index 877aafe..6b8e504 100644 (file)
@@ -303,7 +303,7 @@ void psys_free(struct Object *ob, struct ParticleSystem *psys);
 void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[4][4], float winmat[4][4], int winx, int winy, int timeoffset);
 void psys_render_restore(struct Object *ob, struct ParticleSystem *psys);
 int psys_render_simplify_distribution(struct ParticleThreadContext *ctx, int tot);
-int psys_render_simplify_params(struct ParticleSystem *psys, struct ChildParticle *cpa, float *params);
+bool psys_render_simplify_params(struct ParticleSystem *psys, struct ChildParticle *cpa, float *params);
 
 void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float uvco[2]);
 void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc);
@@ -333,7 +333,7 @@ void precalc_guides(struct ParticleSimulationData *sim, struct ListBase *effecto
 float psys_get_timestep(struct ParticleSimulationData *sim);
 float psys_get_child_time(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *birthtime, float *dietime);
 float psys_get_child_size(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *pa_time);
-void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, int vel);
+void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, const bool vel);
 int psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, int always);
 
 void psys_sph_init(struct ParticleSimulationData *sim, struct SPHData *sphdata);
index 7517a93..b6f7a2b 100644 (file)
@@ -112,7 +112,7 @@ void BKE_pbvh_raycast_project_ray_root(PBVH *bvh, bool original, float ray_start
 
 void BKE_pbvh_node_draw(PBVHNode *node, void *data);
 void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3],
-                   int (*setMaterial)(int, void *attribs), int wireframe);
+                   int (*setMaterial)(int, void *attribs), bool wireframe);
 
 /* PBVH Access */
 typedef enum {
index d5131fc..9957908 100644 (file)
@@ -304,7 +304,7 @@ struct PointCache *BKE_ptcache_add(struct ListBase *ptcaches);
 void BKE_ptcache_free_mem(struct ListBase *mem_cache);
 void BKE_ptcache_free(struct PointCache *cache);
 void BKE_ptcache_free_list(struct ListBase *ptcaches);
-struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct ListBase *ptcaches_old, int copy_data);
+struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct ListBase *ptcaches_old, bool copy_data);
 
 /********************** Baking *********************/
 
index 101fc46..2acfeca 100644 (file)
@@ -64,7 +64,7 @@ void BKE_reports_print(ReportList *reports, ReportType level);
 
 Report *BKE_reports_last_displayable(ReportList *reports);
 
-int BKE_reports_contain(ReportList *reports, ReportType level);
+bool BKE_reports_contain(ReportList *reports, ReportType level);
 
 bool BKE_report_write_file_fp(FILE *fp, ReportList *reports, const char *header);
 bool BKE_report_write_file(const char *filepath, ReportList *reports, const char *header);
index 7d7fad1..4f77e4f 100644 (file)
@@ -94,9 +94,9 @@ void  txt_do_redo                     (struct Text *text);
 void   txt_split_curline       (struct Text *text);
 void   txt_backspace_char      (struct Text *text);
 void   txt_backspace_word      (struct Text *text);
-int            txt_add_char            (struct Text *text, unsigned int add);
-int            txt_add_raw_char        (struct Text *text, unsigned int add);
-int            txt_replace_char        (struct Text *text, unsigned int add);
+bool   txt_add_char            (struct Text *text, unsigned int add);
+bool   txt_add_raw_char        (struct Text *text, unsigned int add);
+bool   txt_replace_char        (struct Text *text, unsigned int add);
 void   txt_unindent            (struct Text *text);
 void   txt_comment                     (struct Text *text);
 void   txt_indent                      (struct Text *text);
index 6a5b562..c136a30 100644 (file)
@@ -91,7 +91,7 @@ struct Tex *give_current_particle_texture(struct ParticleSettings *part);
 
 struct bNode *give_current_material_texture_node(struct Material *ma);
 
-int  give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
+bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
 void set_active_mtex(struct ID *id, short act);
 
 void set_current_brush_texture(struct Brush *br, struct Tex *tex);
index b4a2dab..4e9df19 100644 (file)
@@ -1115,7 +1115,7 @@ static void calc_weightpaint_vert_color(
                if (was_a_nonzero == false) {
                        show_alert_color = true;
                }
-               else if ((draw_flag & CALC_WP_AUTO_NORMALIZE) == FALSE) {
+               else if ((draw_flag & CALC_WP_AUTO_NORMALIZE) == false) {
                        input /= defbase_sel_tot; /* get the average */
                }
        }
@@ -1402,7 +1402,7 @@ static void dm_ensure_display_normals(DerivedMesh *dm)
        BLI_assert(CustomData_has_layer(&dm->polyData, CD_NORMAL) == false);
 
        if ((dm->type == DM_TYPE_CDDM) &&
-           ((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->faceData, CD_NORMAL) == FALSE))
+           ((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->faceData, CD_NORMAL) == false))
        {
                /* if normals are dirty we want to calculate vertex normals too */
                CDDM_calc_normals_mapping_ex(dm, (dm->dirty & DM_DIRTY_NORMALS) ? false : true);
@@ -1442,7 +1442,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
 #if 0 /* XXX Will re-enable this when we have global mod stack options. */
        const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol;
 #endif
-       const bool do_final_wmcol = FALSE;
+       const bool do_final_wmcol = false;
        const bool do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol);
        /* XXX Same as above... For now, only weights preview in WPaint mode. */
        const bool do_mod_wmcol = do_init_wmcol;
@@ -1968,7 +1968,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
 #if 0 /* XXX Will re-enable this when we have global mod stack options. */
        const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol;
 #endif
-       const bool do_final_wmcol = FALSE;
+       const bool do_final_wmcol = false;
        const bool do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol);
        const bool do_init_statvis = ((((Mesh *)ob->data)->drawflag & ME_DRAW_STATVIS) && !do_init_wmcol);
        const bool do_mod_wmcol = do_init_wmcol;
index 3a32cad..d5efa09 100644 (file)
@@ -96,8 +96,8 @@ typedef struct tMakeLocalActionContext {
        bAction *act;       /* original action */
        bAction *act_new;   /* new action */
        
-       int is_lib;         /* some action users were libraries */
-       int is_local;       /* some action users were not libraries */
+       bool is_lib;        /* some action users were libraries */
+       bool is_local;      /* some action users were not libraries */
 } tMakeLocalActionContext;
 
 /* helper function for BKE_action_make_local() - local/lib init step */
@@ -106,8 +106,8 @@ static void make_localact_init_cb(ID *id, AnimData *adt, void *mlac_ptr)
        tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr;
        
        if (adt->action == mlac->act) {
-               if (id->lib) mlac->is_lib = TRUE;
-               else mlac->is_local = TRUE;
+               if (id->lib) mlac->is_lib = true;
+               else mlac->is_local = true;
        }
 }
 
@@ -129,7 +129,7 @@ static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr)
 // does copy_fcurve...
 void BKE_action_make_local(bAction *act)
 {
-       tMakeLocalActionContext mlac = {act, NULL, FALSE, FALSE};
+       tMakeLocalActionContext mlac = {act, NULL, false, false};
        Main *bmain = G.main;
        
        if (act->id.lib == NULL)
@@ -143,7 +143,7 @@ void BKE_action_make_local(bAction *act)
        
        BKE_animdata_main_cb(bmain, make_localact_init_cb, &mlac);
        
-       if (mlac.is_local && mlac.is_lib == FALSE) {
+       if (mlac.is_local && mlac.is_lib == false) {
                id_clear_lib_data(bmain, &act->id);
        }
        else if (mlac.is_local && mlac.is_lib) {
@@ -604,7 +604,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints)
        
        for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
                if (copy_constraints) {
-                       BKE_copy_constraints(&listb, &pchan->constraints, TRUE);  // BKE_copy_constraints NULLs listb
+                       BKE_copy_constraints(&listb, &pchan->constraints, true);  // BKE_copy_constraints NULLs listb
                        pchan->constraints = listb;
                        pchan->mpath = NULL; /* motion paths should not get copied yet... */
                }
@@ -843,7 +843,7 @@ void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_f
        pchan->iklinweight = pchan_from->iklinweight;
 
        /* constraints */
-       BKE_copy_constraints(&pchan->constraints, &pchan_from->constraints, TRUE);
+       BKE_copy_constraints(&pchan->constraints, &pchan_from->constraints, true);
 
        /* id-properties */
        if (pchan->prop) {
@@ -1037,7 +1037,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
                                
                                /* get extents for this curve */
                                /* TODO: allow enabling/disabling this? */
-                               calc_fcurve_range(fcu, &nmin, &nmax, FALSE, TRUE);
+                               calc_fcurve_range(fcu, &nmin, &nmax, false, true);
                                
                                /* compare to the running tally */
                                min = min_ff(min, nmin);
index 129bc46..119fa26 100644 (file)
@@ -43,7 +43,7 @@
 static GHash *global_addonpreftype_hash = NULL;
 
 
-bAddonPrefType *BKE_addon_pref_type_find(const char *idname, int quiet)
+bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet)
 {
        if (idname[0]) {
                bAddonPrefType *apt;
index 3088f2c..7bd5e22 100644 (file)
@@ -1291,7 +1291,7 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in
                /* set value - only for animatable numerical values */
                if (RNA_property_animateable(&new_ptr, prop)) {
                        int array_len = RNA_property_array_length(&new_ptr, prop);
-                       int written = FALSE;
+                       bool written = false;
                        
                        if (array_len && array_index >= array_len) {
                                if (G.debug & G_DEBUG) {
@@ -1308,13 +1308,13 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in
                                        if (array_len) {
                                                if (RNA_property_boolean_get_index(&new_ptr, prop, array_index) != ANIMSYS_FLOAT_AS_BOOL(value)) {
                                                        RNA_property_boolean_set_index(&new_ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value));
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        else {
                                                if (RNA_property_boolean_get(&new_ptr, prop) != ANIMSYS_FLOAT_AS_BOOL(value)) {
                                                        RNA_property_boolean_set(&new_ptr, prop, ANIMSYS_FLOAT_AS_BOOL(value));
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        break;
@@ -1322,13 +1322,13 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in
                                        if (array_len) {
                                                if (RNA_property_int_get_index(&new_ptr, prop, array_index) != (int)value) {
                                                        RNA_property_int_set_index(&new_ptr, prop, array_index, (int)value);
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        else {
                                                if (RNA_property_int_get(&new_ptr, prop) != (int)value) {
                                                        RNA_property_int_set(&new_ptr, prop, (int)value);
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        break;
@@ -1336,20 +1336,20 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in
                                        if (array_len) {
                                                if (RNA_property_float_get_index(&new_ptr, prop, array_index) != value) {
                                                        RNA_property_float_set_index(&new_ptr, prop, array_index, value);
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        else {
                                                if (RNA_property_float_get(&new_ptr, prop) != value) {
                                                        RNA_property_float_set(&new_ptr, prop, value);
-                                                       written = TRUE;
+                                                       written = true;
                                                }
                                        }
                                        break;
                                case PROP_ENUM:
                                        if (RNA_property_enum_get(&new_ptr, prop) != (int)value) {
                                                RNA_property_enum_set(&new_ptr, prop, (int)value);
-                                               written = TRUE;
+                                               written = true;
                                        }
                                        break;
                                default:
index afd3ae7..60ec481 100644 (file)
@@ -137,7 +137,7 @@ void BKE_armature_free(bArmature *arm)
 void BKE_armature_make_local(bArmature *arm)
 {
        Main *bmain = G.main;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
        Object *ob;
 
        if (arm->id.lib == NULL)
@@ -150,13 +150,13 @@ void BKE_armature_make_local(bArmature *arm)
        for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
                if (ob->data == arm) {
                        if (ob->id.lib)
-                               is_lib = TRUE;
+                               is_lib = true;
                        else
-                               is_local = TRUE;
+                               is_local = true;
                }
        }
 
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &arm->id);
        }
        else if (is_local && is_lib) {
@@ -827,7 +827,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 = FALSE;
+       bool use_dverts = false;
        int armature_def_nr;
        int totchan;
 
@@ -891,7 +891,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
                                use_dverts = (dm->getVertDataArray(dm, CD_MDEFORMVERT) != NULL);
                        }
                        else if (dverts) {
-                               use_dverts = TRUE;
+                               use_dverts = true;
                        }
 
                        if (use_dverts) {
@@ -1294,19 +1294,19 @@ void BKE_armature_mat_pose_to_bone_ex(Object *ob, bPoseChannel *pchan, float inm
 
        /* recalculate pose matrix with only parent transformations,
         * bone loc/sca/rot is ignored, scene and frame are not used. */
-       BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, FALSE);
+       BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, false);
 
        /* find the matrix, need to remove the bone transforms first so this is
         * calculated as a matrix to set rather then a difference ontop of whats
         * already there. */
        unit_m4(outmat);
-       BKE_pchan_apply_mat4(&work_pchan, outmat, FALSE);
+       BKE_pchan_apply_mat4(&work_pchan, outmat, false);
 
        BKE_armature_mat_pose_to_bone(&work_pchan, inmat, outmat);
 }
 
 /* same as BKE_object_mat3_to_rot() */
-void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compat)
+void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], bool use_compat)
 {
        switch (pchan->rotmode) {
                case ROT_MODE_QUAT:
@@ -1326,7 +1326,7 @@ void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compa
 
 /* Apply a 4x4 matrix to the pose bone,
  * similar to BKE_object_apply_mat4() */
-void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], short use_compat)
+void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], bool use_compat)
 {
        float rot[3][3];
        mat4_to_loc_rot_size(pchan->loc, rot, pchan->size, mat);
@@ -1619,7 +1619,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
                         *                                we get the libs direct linked in this blend.
                         */
                        BKE_extract_proxylocal_constraints(&proxylocal_constraints, &pchan->constraints);
-                       BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, FALSE);
+                       BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, false);
                        BLI_movelisttolist(&pchanw.constraints, &proxylocal_constraints);
                        
                        /* constraints - set target ob pointer to own object */
@@ -1768,7 +1768,7 @@ typedef struct tSplineIK_Tree {
 
        int type;                    /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
 
-       short free_points;           /* free the point positions array */
+       bool free_points;            /* free the point positions array */
        short chainlen;              /* number of bones in the chain */
 
        float *points;               /* parametric positions for the joints along the curve */
@@ -1791,7 +1791,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
        bSplineIKConstraint *ikData = NULL;
        float boneLengths[255], *jointPoints;
        float totLength = 0.0f;
-       short free_joints = 0;
+       bool free_joints = 0;
        int segcount = 0;
 
        /* find the SplineIK constraint */
@@ -2261,13 +2261,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 = FALSE;
+               do_modif = false;
 
                if (scene_cfra >= strip->start && scene_cfra <= strip->end)
-                       do_modif = TRUE;
+                       do_modif = true;
 
                if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) {
-                       do_modif = TRUE;
+                       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
@@ -2277,7 +2277,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 = FALSE;
+                                               do_modif = false;
                                }
                        }
 
@@ -2286,7 +2286,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 = FALSE;
+                                       do_modif = false;
                                }
                        }
                }
@@ -2390,7 +2390,7 @@ void BKE_pose_where_is_bone_tail(bPoseChannel *pchan)
 /* pchan is validated, as having bone and parent pointer
  * 'do_extra': when zero skips loc/size/rot, constraints and strip modifiers.
  */
-void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra)
+void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, bool do_extra)
 {
        /* This gives a chan_mat with actions (ipos) results. */
        if (do_extra)
index ed48bf5..9b1f2e8 100644 (file)
@@ -554,7 +554,7 @@ int blender_test_break(void)
                        blender_test_break_cb();
        }
        
-       return (G.is_break == TRUE);
+       return (G.is_break == true);
 }
 
 
@@ -598,7 +598,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
 
        if (success) {
                /* important not to update time here, else non keyed tranforms are lost */
-               DAG_on_visible_update(G.main, FALSE);
+               DAG_on_visible_update(G.main, false);
        }
 
        return success;
index 17fdb15..c34b237 100644 (file)
@@ -212,7 +212,7 @@ void BKE_brush_make_local(Brush *brush)
 
        Main *bmain = G.main;
        Scene *scene;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        if (brush->id.lib == NULL) return;
 
@@ -225,12 +225,12 @@ void BKE_brush_make_local(Brush *brush)
 
        for (scene = bmain->scene.first; scene && ELEM(0, is_lib, is_local); scene = scene->id.next) {
                if (BKE_paint_brush(&scene->toolsettings->imapaint.paint) == brush) {
-                       if (scene->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (scene->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
 
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &brush->id);
                extern_local_brush(brush);
 
@@ -450,7 +450,7 @@ void BKE_brush_curve_preset(Brush *b, int preset)
 
        b->curve->preset = preset;
        curvemap_reset(cm, &b->curve->clipr, b->curve->preset, CURVEMAP_SLOPE_NEGATIVE);
-       curvemapping_changed(b->curve, FALSE);
+       curvemapping_changed(b->curve, false);
 }
 
 int BKE_brush_texture_set_nr(Brush *brush, int nr)
index 1e47dc3..b20ba40 100644 (file)
@@ -84,7 +84,7 @@ void BKE_camera_make_local(Camera *cam)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -99,12 +99,12 @@ void BKE_camera_make_local(Camera *cam)
        
        for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
                if (ob->data == cam) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
        
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &cam->id);
        }
        else if (is_local && is_lib) {
@@ -214,7 +214,7 @@ void BKE_camera_params_from_object(CameraParams *params, Object *ob)
                Camera *cam = ob->data;
 
                if (cam->type == CAM_ORTHO)
-                       params->is_ortho = TRUE;
+                       params->is_ortho = true;
                params->lens = cam->lens;
                params->ortho_scale = cam->ortho_scale;
 
@@ -273,7 +273,7 @@ void BKE_camera_params_from_view3d(CameraParams *params, View3D *v3d, RegionView
                params->clipend *= 0.5f;    // otherwise too extreme low zbuffer quality
                params->clipsta = -params->clipend;
 
-               params->is_ortho = TRUE;
+               params->is_ortho = true;
                /* make sure any changes to this match ED_view3d_radius_to_ortho_dist() */
                params->ortho_scale = rv3d->dist * sensor_size / v3d->lens;
                params->zoom = 2.0f;
@@ -454,7 +454,7 @@ void BKE_camera_view_frame(Scene *scene, Camera *camera, float r_vec[4][3])
        float dummy_drawsize;
        const float dummy_scale[3] = {1.0f, 1.0f, 1.0f};
 
-       BKE_camera_view_frame_ex(scene, camera, FALSE, 1.0, dummy_scale,
+       BKE_camera_view_frame_ex(scene, camera, false, 1.0, dummy_scale,
                                 dummy_asp, dummy_shift, &dummy_drawsize, r_vec);
 }
 
index a7940eb..64b3cf5 100644 (file)
@@ -82,7 +82,7 @@ typedef struct {
 
        /* Cached */
        struct PBVH *pbvh;
-       int pbvh_draw;
+       bool pbvh_draw;
 
        /* Mesh connectivity */
        MeshElemMap *pmap;
@@ -223,7 +223,7 @@ static const MeshElemMap *cdDM_getPolyMap(Object *ob, DerivedMesh *dm)
        return cddm->pmap;
 }
 
-static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
+static bool can_pbvh_draw(Object *ob, DerivedMesh *dm)
 {
        CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
        Mesh *me = ob->data;
@@ -265,7 +265,7 @@ static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
        /* Sculpting on a BMesh (dynamic-topology) gets a special PBVH */
        if (!cddm->pbvh && ob->sculpt->bm) {
                cddm->pbvh = BKE_pbvh_new();
-               cddm->pbvh_draw = TRUE;
+               cddm->pbvh_draw = true;
 
                BKE_pbvh_build_bmesh(cddm->pbvh, ob->sculpt->bm,
                                     ob->sculpt->bm_smooth_shading,
@@ -429,7 +429,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
        if (cddm->pbvh && cddm->pbvh_draw &&
            BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH)
        {
-               BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, TRUE);
+               BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, true);
 
                return;
        }
@@ -450,7 +450,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
        else {  /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */
                int prevstart = 0;
                int prevdraw = 1;
-               int draw = TRUE;
+               bool draw = true;
 
                GPU_edge_setup(dm);
                if (!GPU_buffer_legacy(dm)) {
@@ -458,10 +458,10 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges
                                if ((drawAllEdges || (medge->flag & ME_EDGEDRAW)) &&
                                    (drawLooseEdges || !(medge->flag & ME_LOOSEEDGE)))
                                {
-                                       draw = TRUE;
+                                       draw = true;
                                }
                                else {
-                                       draw = FALSE;
+                                       draw = false;
                                }
                                if (prevdraw != draw) {
                                        if (prevdraw > 0 && (i - prevstart) > 0) {
@@ -550,7 +550,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
                        float (*face_nors)[3] = CustomData_get_layer(&dm->faceData, CD_NORMAL);
 
                        BKE_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors,
-                                     setMaterial, FALSE);
+                                     setMaterial, false);
                        glShadeModel(GL_FLAT);
                }
 
@@ -657,7 +657,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
        if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
                if (dm->numTessFaceData) {
                        GPU_set_tpage(NULL, false, false);
-                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE);
+                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
                }
 
                return;
@@ -1136,7 +1136,8 @@ 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, do_draw, matnr, new_matnr;
+       int a, b, matnr, new_matnr;
+       bool do_draw;
        int orig;
 
        /* double lookup */
@@ -1153,7 +1154,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
        if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
                if (dm->numTessFaceData) {
                        setMaterial(1, &gattribs);
-                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE);
+                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
                }
 
                return;
@@ -1162,7 +1163,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
        cdDM_update_normals_from_pbvh(dm);
 
        matnr = -1;
-       do_draw = FALSE;
+       do_draw = false;
 
        glShadeModel(GL_SMOOTH);
 
@@ -1479,7 +1480,7 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
        if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
                if (dm->numTessFaceData) {
                        setMaterial(userData, 1, &gattribs);
-                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE);
+                       BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
                }
 
                return;
@@ -2506,11 +2507,11 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
 
                /* skip faces with all vertices merged */
                {
-                       int all_vertices_merged = TRUE;
+                       bool all_vertices_merged = true;
 
                        for (j = 0; j < mp->totloop; j++, ml++) {
                                if (vtargetmap[ml->v] == -1) {
-                                       all_vertices_merged = FALSE;
+                                       all_vertices_merged = false;
                                        break;
                                }
                        }
@@ -2667,7 +2668,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
        index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
 
        for (ehi = BLI_edgehashIterator_new(eh), i = 0;
-            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_isDone(ehi) == false;
             BLI_edgehashIterator_step(ehi), i++, med++, index++)
        {
                BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
@@ -2739,7 +2740,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
        index = CustomData_get_layer(&edgeData, CD_ORIGINDEX);
 
        for (ehi = BLI_edgehashIterator_new(eh), i = 0;
-            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_isDone(ehi) == false;
             BLI_edgehashIterator_step(ehi), ++i, ++med, ++index)
        {
                BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
index e2cb011..75d24fa 100644 (file)
@@ -183,14 +183,14 @@ void curvemapping_set_black_white(CurveMapping *cumap, const float black[3], con
 /* ********** NOTE: requires curvemapping_changed() call after ******** */
 
 /* remove specified point */
-int curvemap_remove_point(CurveMap *cuma, CurveMapPoint *point)
+bool curvemap_remove_point(CurveMap *cuma, CurveMapPoint *point)
 {
        CurveMapPoint *cmp;
        int a, b, removed = 0;
        
        /* must have 2 points minimum */
        if (cuma->totpoint <= 2)
-               return FALSE;
+               return false;
 
        cmp = MEM_mallocN((cuma->totpoint) * sizeof(CurveMapPoint), "curve points");
 
@@ -759,7 +759,7 @@ void curvemapping_changed_all(CurveMapping *cumap)
        for (a = 0; a < CM_TOT; a++) {
                if (cumap->cm[a].curve) {
                        cumap->cur = a;
-                       curvemapping_changed(cumap, FALSE);
+                       curvemapping_changed(cumap, false);
                }
        }
 
index 243b99a..7ec0035 100644 (file)
@@ -717,7 +717,7 @@ static void childof_id_looper(bConstraint *con, ConstraintIDFunc func, void *use
        bChildOfConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int childof_get_tars(bConstraint *con, ListBase *list)
@@ -852,7 +852,7 @@ static void trackto_id_looper(bConstraint *con, ConstraintIDFunc func, void *use
        bTrackToConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int trackto_get_tars(bConstraint *con, ListBase *list)
@@ -1030,10 +1030,10 @@ static void kinematic_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bKinematicConstraint *data = con->data;
        
        /* chain target */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
        
        /* poletarget */
-       func(con, (ID **)&data->poletar, FALSE, userdata);
+       func(con, (ID **)&data->poletar, false, userdata);
 }
 
 static int kinematic_get_tars(bConstraint *con, ListBase *list)
@@ -1122,7 +1122,7 @@ static void followpath_id_looper(bConstraint *con, ConstraintIDFunc func, void *
        bFollowPathConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int followpath_get_tars(bConstraint *con, ListBase *list)
@@ -1169,7 +1169,7 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
 
 #ifdef CYCLIC_DEPENDENCY_WORKAROUND
                if (ct->tar->curve_cache == NULL) {
-                       BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE);
+                       BKE_displist_make_curveTypes(cob->scene, ct->tar, false);
                }
 #endif
 
@@ -1470,7 +1470,7 @@ static void loclike_id_looper(bConstraint *con, ConstraintIDFunc func, void *use
        bLocateLikeConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int loclike_get_tars(bConstraint *con, ListBase *list)
@@ -1560,7 +1560,7 @@ static void rotlike_id_looper(bConstraint *con, ConstraintIDFunc func, void *use
        bRotateLikeConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int rotlike_get_tars(bConstraint *con, ListBase *list)
@@ -1672,7 +1672,7 @@ static void sizelike_id_looper(bConstraint *con, ConstraintIDFunc func, void *us
        bSizeLikeConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int sizelike_get_tars(bConstraint *con, ListBase *list)
@@ -1761,7 +1761,7 @@ static void translike_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bTransLikeConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int translike_get_tars(bConstraint *con, ListBase *list)
@@ -1924,10 +1924,10 @@ static void pycon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userd
        
        /* targets */
        for (ct = data->targets.first; ct; ct = ct->next)
-               func(con, (ID **)&ct->tar, FALSE, userdata);
+               func(con, (ID **)&ct->tar, false, userdata);
                
        /* script */
-       func(con, (ID **)&data->text, TRUE, userdata);
+       func(con, (ID **)&data->text, true, userdata);
 }
 
 /* Whether this approach is maintained remains to be seen (aligorith) */
@@ -1942,7 +1942,7 @@ static void pycon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTa
                /* special exception for curves - depsgraph issues */
                if (ct->tar->type == OB_CURVE) {
                        if (ct->tar->curve_cache == NULL) {
-                               BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE);
+                               BKE_displist_make_curveTypes(cob->scene, ct->tar, false);
                        }
                }
 #endif
@@ -2017,10 +2017,10 @@ static void actcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *user
        bActionConstraint *data = con->data;
        
        /* target */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
        
        /* action */
-       func(con, (ID **)&data->act, TRUE, userdata);
+       func(con, (ID **)&data->act, true, userdata);
 }
 
 static int actcon_get_tars(bConstraint *con, ListBase *list)
@@ -2184,7 +2184,7 @@ static void locktrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bLockTrackConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int locktrack_get_tars(bConstraint *con, ListBase *list)
@@ -2491,7 +2491,7 @@ static void distlimit_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bDistLimitConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int distlimit_get_tars(bConstraint *con, ListBase *list)
@@ -2618,7 +2618,7 @@ static void stretchto_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bStretchToConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int stretchto_get_tars(bConstraint *con, ListBase *list)
@@ -2790,7 +2790,7 @@ static void minmax_id_looper(bConstraint *con, ConstraintIDFunc func, void *user
        bMinMaxConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int minmax_get_tars(bConstraint *con, ListBase *list)
@@ -2932,8 +2932,8 @@ static void rbj_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdat
        bRigidBodyJointConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
-       func(con, (ID **)&data->child, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
+       func(con, (ID **)&data->child, false, userdata);
 }
 
 static int rbj_get_tars(bConstraint *con, ListBase *list)
@@ -2984,7 +2984,7 @@ static void clampto_id_looper(bConstraint *con, ConstraintIDFunc func, void *use
        bClampToConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int clampto_get_tars(bConstraint *con, ListBase *list)
@@ -3018,7 +3018,7 @@ static void clampto_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bCo
 #ifdef CYCLIC_DEPENDENCY_WORKAROUND
        if (VALID_CONS_TARGET(ct)) {
                if (ct->tar->curve_cache == NULL) {
-                       BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE);
+                       BKE_displist_make_curveTypes(cob->scene, ct->tar, false);
                }
        }
 #endif
@@ -3046,7 +3046,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
                
                INIT_MINMAX(curveMin, curveMax);
                /* XXX - don't think this is good calling this here - campbell */
-               BKE_object_minmax(ct->tar, curveMin, curveMax, TRUE);
+               BKE_object_minmax(ct->tar, curveMin, curveMax, true);
                
                /* get targetmatrix */
                if (data->tar->curve_cache &&  data->tar->curve_cache->path && data->tar->curve_cache->path->data) {
@@ -3164,7 +3164,7 @@ static void transform_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bTransformConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int transform_get_tars(bConstraint *con, ListBase *list)
@@ -3311,7 +3311,7 @@ static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void *
        bShrinkwrapConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->target, FALSE, userdata);
+       func(con, (ID **)&data->target, false, userdata);
 }
 
 static void shrinkwrap_new_data(void *cdata)
@@ -3383,7 +3383,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
                                                bvhtree_from_mesh_faces(&treeData, target, 0.0, 2, 6);
                                        
                                        if (treeData.tree == NULL) {
-                                               fail = TRUE;
+                                               fail = true;
                                                break;
                                        }
                                        
@@ -3425,13 +3425,13 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
                                        mul_mat3_m4_v3(mat, no);
 
                                        if (normalize_v3(no) < FLT_EPSILON) {
-                                               fail = TRUE;
+                                               fail = true;
                                                break;
                                        }
 
                                        bvhtree_from_mesh_faces(&treeData, target, scon->dist, 4, 6);
                                        if (treeData.tree == NULL) {
-                                               fail = TRUE;
+                                               fail = true;
                                                break;
                                        }
 
@@ -3439,7 +3439,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
                                        if (BKE_shrinkwrap_project_normal(0, co, no, &transform, treeData.tree, &hit,
                                                                          treeData.raycast_callback, &treeData) == false)
                                        {
-                                               fail = TRUE;
+                                               fail = true;
                                                break;
                                        }
                                        copy_v3_v3(co, hit.co);
@@ -3451,7 +3451,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
                        
                        target->release(target);
                        
-                       if (fail == TRUE) {
+                       if (fail == true) {
                                /* Don't move the point */
                                zero_v3(co);
                        }
@@ -3502,7 +3502,7 @@ static void damptrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *u
        bDampTrackConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int damptrack_get_tars(bConstraint *con, ListBase *list)
@@ -3647,7 +3647,7 @@ static void splineik_id_looper(bConstraint *con, ConstraintIDFunc func, void *us
        bSplineIKConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int splineik_get_tars(bConstraint *con, ListBase *list)
@@ -3681,7 +3681,7 @@ static void splineik_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bC
 #ifdef CYCLIC_DEPENDENCY_WORKAROUND
        if (VALID_CONS_TARGET(ct)) {
                if (ct->tar->curve_cache == NULL) {
-                       BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE);
+                       BKE_displist_make_curveTypes(cob->scene, ct->tar, false);
                }
        }
 #endif
@@ -3715,7 +3715,7 @@ static void pivotcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *us
        bPivotConstraint *data = con->data;
        
        /* target only */
-       func(con, (ID **)&data->tar, FALSE, userdata);
+       func(con, (ID **)&data->tar, false, userdata);
 }
 
 static int pivotcon_get_tars(bConstraint *con, ListBase *list)
@@ -3846,9 +3846,9 @@ static void followtrack_id_looper(bConstraint *con, ConstraintIDFunc func, void
 {
        bFollowTrackConstraint *data = con->data;
 
-       func(con, (ID **)&data->clip, TRUE, userdata);
-       func(con, (ID **)&data->camera, FALSE, userdata);
-       func(con, (ID **)&data->depth_ob, FALSE, userdata);
+       func(con, (ID **)&data->clip, true, userdata);
+       func(con, (ID **)&data->camera, false, userdata);
+       func(con, (ID **)&data->depth_ob, false, userdata);
 }
 
 static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -4082,7 +4082,7 @@ static void camerasolver_id_looper(bConstraint *con, ConstraintIDFunc func, void
 {
        bCameraSolverConstraint *data = con->data;
 
-       func(con, (ID **)&data->clip, TRUE, userdata);
+       func(con, (ID **)&data->clip, true, userdata);
 }
 
 static void camerasolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -4138,8 +4138,8 @@ static void objectsolver_id_looper(bConstraint *con, ConstraintIDFunc func, void
 {
        bObjectSolverConstraint *data = con->data;
 
-       func(con, (ID **)&data->clip, FALSE, userdata);
-       func(con, (ID **)&data->camera, FALSE, userdata);
+       func(con, (ID **)&data->clip, false, userdata);
+       func(con, (ID **)&data->camera, false, userdata);
 }
 
 static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -4521,7 +4521,7 @@ static void con_fix_copied_refs_cb(bConstraint *UNUSED(con), ID **idpoin, short
 }
 
 /* duplicate all of the constraints in a constraint stack */
-void BKE_copy_constraints(ListBase *dst, const ListBase *src, int do_extern)
+void BKE_copy_constraints(ListBase *dst, const ListBase *src, bool do_extern)
 {
        bConstraint *con, *srccon;
        
index a63807f..eeb1f4b 100644 (file)
@@ -258,7 +258,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
        bScreen *sc;
        ScrArea *sa;
        ARegion *ar;
-       int done = FALSE, recursion = C->data.recursion;
+       int done = 0, recursion = C->data.recursion;
        int ret = 0;
 
        memset(result, 0, sizeof(bContextDataResult));
@@ -291,7 +291,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 = TRUE;
+                       done = 1;
                }
        }
        if (done != 1 && recursion < 2 && (ar = CTX_wm_region(C))) {
@@ -435,11 +435,11 @@ int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListB
        return ret;
 }
 
-static void data_dir_add(ListBase *lb, const char *member, const short use_all)
+static void data_dir_add(ListBase *lb, const char *member, const bool use_all)
 {
        LinkData *link;
        
-       if ((use_all == FALSE) && strcmp(member, "scene") == 0) /* exception */
+       if ((use_all == false) && strcmp(member, "scene") == 0) /* exception */
                return;
 
        if (BLI_findstring(lb, member, offsetof(LinkData, data)))
@@ -456,7 +456,7 @@ static void data_dir_add(ListBase *lb, const char *member, const short use_all)
  * \param use_rna Use Include the properties from 'RNA_Context'
  * \param use_all Don't skip values (currently only "scene")
  */
-ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const short use_rna, const short use_all)
+ListBase CTX_data_dir_get_ex(const bContext *C, const bool use_store, const bool use_rna, const bool use_all)
 {
        bContextDataResult result;
        ListBase lb;
@@ -526,7 +526,7 @@ ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const sho
 
 ListBase CTX_data_dir_get(const bContext *C)
 {
-       return CTX_data_dir_get_ex(C, TRUE, FALSE, FALSE);
+       return CTX_data_dir_get_ex(C, true, false, false);
 }
 
 bool CTX_data_equals(const char *member, const char *str)
index 109909e..ae45ca5 100644 (file)
@@ -256,7 +256,7 @@ void BKE_curve_make_local(Curve *cu)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - when there are only lib users: don't do
         * - when there are only local users: set flag
@@ -274,12 +274,12 @@ void BKE_curve_make_local(Curve *cu)
 
        for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
                if (ob->data == cu) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
 
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &cu->id);
                extern_local_curve(cu);
        }
@@ -437,7 +437,7 @@ void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_s
        if (r_size) copy_v3_v3(r_size, cu->size);
 }
 
-int BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3])
+bool BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3])
 {
        Nurb *nu;
        int tot = 0;
@@ -448,20 +448,20 @@ int BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3])
                        tot_nu = nu->pntsu;
                        if (index - tot < tot_nu) {
                                copy_v3_v3(r_co, nu->bezt[index - tot].vec[1]);
-                               return TRUE;
+                               return true;
                        }
                }
                else {
                        tot_nu = nu->pntsu * nu->pntsv;
                        if (index - tot < tot_nu) {
                                copy_v3_v3(r_co, nu->bp[index - tot].vec);
-                               return TRUE;
+                               return true;
                        }
                }
                tot += tot_nu;
        }
 
-       return FALSE;
+       return false;
 }
 
 int BKE_nurbList_verts_count(ListBase *nurb)
@@ -1494,12 +1494,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 = FALSE;
+                                               use_b = false;
 
                                        for (a = 0; a < sizev; a++) {
                                                int use_a = a;
                                                if (a == sizev - 1 && (nu->flagv & CU_NURB_CYCLIC))
-                                                       use_a = FALSE;
+                                                       use_a = false;
 
                                                tdata = _tdata + 3 * (use_b * (nu->pntsv * resolv) + use_a);
 
@@ -2530,7 +2530,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
        float min, inp;
        struct BevelSort *sortdata, *sd, *sd1;
        int a, b, nr, poly, resolu = 0, len = 0;
-       int do_tilt, do_radius, do_weight;
+       bool do_tilt, do_radius, do_weight;
        bool is_editmode = false;
        ListBase *bev;
 
@@ -2558,7 +2558,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
                /* 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 = TRUE;
+               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 */
@@ -2591,7 +2591,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
                                        bevp->alfa = bp->alfa;
                                        bevp->radius = bp->radius;
                                        bevp->weight = bp->weight;
-                                       bevp->split_tag = TRUE;
+                                       bevp->split_tag = true;
                                        bevp++;
                                        bp++;
                                }
@@ -2631,8 +2631,8 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
                                                bevp->alfa = prevbezt->alfa;
                                                bevp->radius = prevbezt->radius;
                                                bevp->weight = prevbezt->weight;
-                                               bevp->split_tag = TRUE;
-                                               bevp->dupe_tag = FALSE;
+                                               bevp->split_tag = true;
+                                               bevp->dupe_tag = false;
                                                bevp++;
                                                bl->nr++;
                                                bl->dupe_nr = 1;
@@ -2665,13 +2665,13 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
                                                /* indicate with handlecodes double points */
                                                if (prevbezt->h1 == prevbezt->h2) {
                                                        if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT)
-                                                               bevp->split_tag = TRUE;
+                                                               bevp->split_tag = true;
                                                }
                                                else {
                                                        if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT)
-                                                               bevp->split_tag = TRUE;
+                                                               bevp->split_tag = true;
                                                        else if (prevbezt->h2 == 0 || prevbezt->h2 == HD_VECT)
-                                                               bevp->split_tag = TRUE;
+                                                               bevp->split_tag = true;
                                                }
                                                bl->nr += resolu;
                                                bevp += resolu;
@@ -2737,7 +2737,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
                                if (fabsf(bevp0->vec[0] - bevp1->vec[0]) < 0.00001f) {
                                        if (fabsf(bevp0->vec[1] - bevp1->vec[1]) < 0.00001f) {
                                                if (fabsf(bevp0->vec[2] - bevp1->vec[2]) < 0.00001f) {
-                                                       bevp0->dupe_tag = TRUE;
+                                                       bevp0->dupe_tag = true;
                                                        bl->dupe_nr++;
                                                }
                                        }
@@ -3175,7 +3175,7 @@ void BKE_nurb_handle_calc(BezTriple *bezt, BezTriple *prev, BezTriple *next, con
 
 void BKE_nurb_handles_calc(Nurb *nu) /* first, if needed, set handle flags */
 {
-       calchandlesNurb_intern(nu, FALSE);
+       calchandlesNurb_intern(nu, false);
 }
 
 /* similar to BKE_nurb_handle_calc but for curves and
@@ -3693,7 +3693,7 @@ void BK_curve_nurbs_vertexCos_apply(ListBase *lb, float (*vertexCos)[3])
                        }
                }
 
-               calchandlesNurb_intern(nu, TRUE);
+               calchandlesNurb_intern(nu, true);
        }
 }
 
index 82b6dde..d072088 100644 (file)
@@ -359,7 +359,7 @@ void defvert_normalize_lock_map(
 
                for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
                        if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
-                               if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
+                               if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == false)) {
                                        tot_weight += dw->weight;
                                }
                                else {
@@ -377,7 +377,7 @@ void defvert_normalize_lock_map(
                        float scalar = (1.0f / tot_weight) * lock_iweight;
                        for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
                                if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
-                                       if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
+                                       if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == false)) {
                                                dw->weight *= scalar;
 
                                                /* in case of division errors with very low weights */
index af32130..45f8095 100644 (file)
@@ -2535,7 +2535,8 @@ void DAG_ids_flush_tagged(Main *bmain)
        ListBase listbase;
        DagSceneLayer *dsl;
        ListBase *lbarray[MAX_LIBARRAY];
-       int a, do_flush = FALSE;
+       int a;
+       bool do_flush = false;
        
        /* get list of visible scenes and layers */
        dag_current_scene_layers(bmain, &listbase);
@@ -2559,7 +2560,7 @@ void DAG_ids_flush_tagged(Main *bmain)
                                        for (dsl = listbase.first; dsl; dsl = dsl->next)
                                                dag_id_flush_update(bmain, dsl->scene, id);
                                        
-                                       do_flush = TRUE;
+                                       do_flush = true;
                                }
                        }
                }
@@ -2574,10 +2575,11 @@ void DAG_ids_flush_tagged(Main *bmain)
        BLI_freelistN(&listbase);
 }
 
-void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time)
+void DAG_ids_check_recalc(Main *bmain, Scene *scene, bool time)
 {
        ListBase *lbarray[MAX_LIBARRAY];
-       int a, updated = 0;
+       int a;
+       bool updated = false;
 
        /* loop over all ID types */
        a  = set_listbasepointers(bmain, lbarray);
@@ -2595,7 +2597,7 @@ void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time)
 #endif
                    bmain->id_tag_update[id->name[0]])
                {
-                       updated = 1;
+                       updated = true;
                        break;
                }
        }
index eeedd07..cdff6e2 100644 (file)
@@ -1538,7 +1538,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
                if (!for_orco)
                        curve_calc_modifiers_pre(scene, ob, &nubase, for_render, use_render_resolution);
 
-               BKE_curve_bevelList_make(ob, &nubase, for_render != FALSE);
+               BKE_curve_bevelList_make(ob, &nubase, for_render != false);
 
                /* If curve has no bevel will return nothing */
                BKE_curve_bevel_make(scene, ob, &dlbev, for_render, use_render_resolution);
index 24ccc66..a778a07 100644 (file)
@@ -297,12 +297,12 @@ DynamicPaintSurface *get_activeSurface(DynamicPaintCanvasSettings *canvas)
 void dynamicPaint_resetPreview(DynamicPaintCanvasSettings *canvas)
 {
        DynamicPaintSurface *surface = canvas->surfaces.first;
-       int done = FALSE;
+       bool done = false;
 
        for (; surface; surface = surface->next) {
                if (!done && dynamicPaint_surfaceHasColorPreview(surface)) {
                        surface->flags |= MOD_DPAINT_PREVIEW;
-                       done = TRUE;
+                       done = true;
                }
                else
                        surface->flags &= ~MOD_DPAINT_PREVIEW;
index 752ae29..b7c5c60 100644 (file)
@@ -932,9 +932,10 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
        DMVertexAttribs attribs;
        GPUVertexAttribs gattribs;
 
-       int i, matnr, new_matnr, do_draw, fi;
+       int i, matnr, new_matnr, fi;
+       bool do_draw;
 
-       do_draw = FALSE;
+       do_draw = false;
        matnr = -1;
 
        memset(&attribs, 0, sizeof(attribs));
index 038b9cb..1810e41 100644 (file)
@@ -447,7 +447,7 @@ int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, bool *
 static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple **last,
                                       const bool do_sel_only)
 {
-       short found = FALSE;
+       bool found = false;
        
        /* init outputs */
        *first = NULL;
@@ -467,7 +467,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple
                for (i = 0; i < fcu->totvert; bezt++, i++) {
                        if (BEZSELECTED(bezt)) {
                                *first = bezt;
-                               found = TRUE;
+                               found = true;
                                break;
                        }
                }
@@ -477,7 +477,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple
                for (i = 0; i < fcu->totvert; bezt--, i++) {
                        if (BEZSELECTED(bezt)) {
                                *last = bezt;
-                               found = TRUE;
+                               found = true;
                                break;
                        }
                }
@@ -486,7 +486,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple
                /* just full array */
                *first = fcu->bezt;
                *last = ARRAY_LAST_ITEM(fcu->bezt, BezTriple, sizeof(BezTriple), fcu->totvert);
-               found = TRUE;
+               found = true;
        }
        
        return found;
@@ -529,7 +529,7 @@ bool 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 == FALSE) || BEZSELECTED(bezt)) {
+                                       if ((do_sel_only == false) || BEZSELECTED(bezt)) {
                                                if (include_handles) {
                                                        yminv = min_ffff(yminv, bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]);
                                                        ymaxv = max_ffff(ymaxv, bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]);
@@ -539,7 +539,7 @@ bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa
                                                        ymaxv = max_ff(ymaxv, bezt->vec[1][1]);
                                                }
                                                
-                                               foundvert = TRUE;
+                                               foundvert = true;
                                        }
                                }
                        }
@@ -561,7 +561,7 @@ bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa
                                        if (fpt->vec[1] > ymaxv)
                                                ymaxv = fpt->vec[1];
                                        
-                                       foundvert = TRUE;
+                                       foundvert = true;
                                }
                        }
                }
@@ -593,7 +593,7 @@ bool calc_fcurve_range(FCurve *fcu, float *start, float *end,
                        const bool do_sel_only, const bool do_min_length)
 {
        float min = 999999999.0f, max = -999999999.0f;
-       short foundvert = FALSE;
+       bool foundvert = false;
 
        if (fcu->totvert) {
                if (fcu->bezt) {
@@ -608,19 +608,19 @@ bool calc_fcurve_range(FCurve *fcu, float *start, float *end,
                                min = min_ff(min, bezt_first->vec[1][0]);
                                max = max_ff(max, bezt_last->vec[1][0]);
                                
-                               foundvert = TRUE;
+                               foundvert = true;
                        }
                }
                else if (fcu->fpt) {
                        min = min_ff(min, fcu->fpt[0].vec[0]);
                        max = max_ff(max, fcu->fpt[fcu->totvert - 1].vec[0]);
                        
-                       foundvert = TRUE;
+                       foundvert = true;
                }
                
        }
        
-       if (foundvert == FALSE) {
+       if (foundvert == false) {
                min = max = 0.0f;
        }
 
@@ -1309,7 +1309,8 @@ 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 use_eulers = FALSE, rot_order = ROT_MODE_EUL;
+       bool use_eulers = false;
+       short rot_order = ROT_MODE_EUL;
        
        /* check if this target has valid data */
        if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) {
@@ -1337,7 +1338,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
                if (pchan->rotmode > 0) {
                        copy_v3_v3(oldEul, pchan->eul);
                        rot_order = pchan->rotmode;
-                       use_eulers = TRUE;
+                       use_eulers = true;
                }
                
                if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
@@ -1364,7 +1365,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
                if (ob->rotmode > 0) {
                        copy_v3_v3(oldEul, ob->rot);
                        rot_order = ob->rotmode;
-                       use_eulers = TRUE;
+                       use_eulers = true;
                }
                
                if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
index c60c1ea..6bef88b 100644 (file)
@@ -217,14 +217,14 @@ VFont *BKE_vfont_load(Main *bmain, const char *name)
                BLI_strncpy(filename, name, sizeof(filename));
                
                pf = get_builtin_packedfile();
-               is_builtin = TRUE;
+               is_builtin = true;
        }
        else {
                BLI_split_file_part(name, filename, sizeof(filename));
                pf = newPackedFile(NULL, name, bmain->name);
                temp_pf = newPackedFile(NULL, name, bmain->name);
                
-               is_builtin = FALSE;
+               is_builtin = false;
        }
 
        if (pf) {
index 2a61b2e..e84db7e 100644 (file)
@@ -154,17 +154,17 @@ Group *BKE_group_copy(Group *group)
 }
 
 /* external */
-static int group_object_add_internal(Group *group, Object *ob)
+static bool group_object_add_internal(Group *group, Object *ob)
 {
        GroupObject *go;
        
        if (group == NULL || ob == NULL) {
-               return FALSE;
+               return false;
        }
        
        /* check if the object has been added already */
        if (BLI_findptr(&group->gobject, ob, offsetof(GroupObject, ob))) {
-               return FALSE;
+               return false;
        }
        
        go = MEM_callocN(sizeof(GroupObject), "groupobject");
@@ -172,7 +172,7 @@ static int group_object_add_internal(Group *group, Object *ob)
        
        go->ob = ob;
        
-       return TRUE;
+       return true;
 }
 
 bool BKE_group_object_add(Group *group, Object *object, Scene *scene, Base *base)
@@ -296,7 +296,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
 {
        static ListBase nlastrips = {NULL, NULL};
        static bAction *action = NULL;
-       static int done = FALSE;
+       static bool done = false;
        bActionStrip *strip, *nstrip;
        
        if (mode == 's') {
@@ -310,7 +310,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
                                        action = target->action;
                                        target->action = NULL;
                                        target->nlaflag |= OB_NLA_OVERRIDE;
-                                       done = TRUE;
+                                       done = true;
                                }
                                nstrip = MEM_dupallocN(strip);
                                BLI_addtail(&target->nlastrips, nstrip);
@@ -325,7 +325,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
                        
                        BLI_listbase_clear(&nlastrips);  /* not needed, but yah... :) */
                        action = NULL;
-                       done = FALSE;
+                       done = false;
                }
        }
 }
index 603ddf7..23d55ad 100644 (file)
@@ -806,7 +806,7 @@ IDProperty *IDP_GetProperties(ID *id, const bool create_if_needed)
 }
 
 /**
- * \param is_strict When FALSE treat missing items as a match */
+ * \param is_strict When false treat missing items as a match */
 bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is_strict)
 {
        if (prop1 == NULL && prop2 == NULL)
@@ -871,7 +871,7 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is
 
 bool IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
 {
-       return IDP_EqualsProperties_ex(prop1, prop2, TRUE);
+       return IDP_EqualsProperties_ex(prop1, prop2, true);
 }
 
 /**
index b74424a..7664367 100644 (file)
@@ -382,7 +382,7 @@ void BKE_image_make_local(struct Image *ima)
        Tex *tex;
        Brush *brush;
        Mesh *me;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -403,14 +403,14 @@ void BKE_image_make_local(struct Image *ima)
 
        for (tex = bmain->tex.first; tex; tex = tex->id.next) {
                if (tex->ima == ima) {
-                       if (tex->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (tex->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
        for (brush = bmain->brush.first; brush; brush = brush->id.next) {
                if (brush->clone.image == ima) {
-                       if (brush->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (brush->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
        for (me = bmain->mesh.first; me; me = me->id.next) {
@@ -424,8 +424,8 @@ void BKE_image_make_local(struct Image *ima)
 
                                        for (a = 0; a < me->totface; a++, tface++) {
                                                if (tface->tpage == ima) {
-                                                       if (me->id.lib) is_lib = TRUE;
-                                                       else is_local = TRUE;
+                                                       if (me->id.lib) is_lib = true;
+                                                       else is_local = true;
                                                }
                                        }
                                }
@@ -442,8 +442,8 @@ void BKE_image_make_local(struct Image *ima)
 
                                        for (a = 0; a < me->totpoly; a++, mtpoly++) {
                                                if (mtpoly->tpage == ima) {
-                                                       if (me->id.lib) is_lib = TRUE;
-                                                       else is_local = TRUE;
+                                                       if (me->id.lib) is_lib = true;
+                                                       else is_local = true;
                                                }
                                        }
                                }
@@ -452,7 +452,7 @@ void BKE_image_make_local(struct Image *ima)
 
        }
 
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &ima->id);
                extern_local_image(ima);
        }
@@ -739,7 +739,7 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
                /* both byte and float buffers are filling in sRGB space, need to linearize float buffer after BKE_image_buf_fill* functions */
 
                IMB_buffer_float_from_float(rect_float, rect_float, ibuf->channels, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB,
-                                           TRUE, ibuf->x, ibuf->y, ibuf->x, ibuf->x);
+                                           true, ibuf->x, ibuf->y, ibuf->x, ibuf->x);
        }
 
        return ibuf;
@@ -1156,7 +1156,7 @@ int BKE_imtype_requires_linear_float(const char imtype)
                case R_IMF_IMTYPE_RADHDR:
                case R_IMF_IMTYPE_OPENEXR:
                case R_IMF_IMTYPE_MULTILAYER:
-                       return TRUE;
+                       return true;
        }
        return 0;
 }
@@ -1372,7 +1372,7 @@ static bool do_add_image_extension(char *string, const char imtype, const ImageF
 
        }
        else {
-               return FALSE;
+               return false;
        }
 }
 
@@ -1895,7 +1895,7 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf)
                float *buf = ibuf->rect_float;
                for (tot = ibuf->x * ibuf->y; tot--; buf += 4) {
                        if (buf[3] < 1.0f) {
-                               return TRUE;
+                               return true;
                        }
                }
        }
@@ -1903,12 +1903,12 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf)
                unsigned char *buf = (unsigned char *)ibuf->rect;
                for (tot = ibuf->x * ibuf->y; tot--; buf += 4) {
                        if (buf[3] != 255) {
-                               return TRUE;
+                               return true;
                        }
                }
        }
 
-       return FALSE;
+       return false;
 }
 
 /* note: imf->planes is ignored here, its assumed the image channels
@@ -2055,7 +2055,7 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
 /* same as BKE_imbuf_write() but crappy workaround not to perminantly modify
  * _some_, values in the imbuf */
 int BKE_imbuf_write_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
-                       const short save_copy)
+                       const bool save_copy)
 {
        ImBuf ibuf_back = *ibuf;
        int ok;
@@ -2098,12 +2098,14 @@ static void do_makepicstring(char *string, const char *base, const char *relbase
                do_add_image_extension(string, imtype, im_format);
 }
 
-void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const ImageFormatData *im_format, const short use_ext, const short use_frames)
+void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame,
+                       const ImageFormatData *im_format, const bool use_ext, const bool use_frames)
 {
        do_makepicstring(string, base, relbase, frame, im_format->imtype, im_format, use_ext, use_frames);
 }
 
-void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames)
+void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame,
+                                 const char imtype, const bool use_ext, const bool use_frames)
 {
        do_makepicstring(string, base, relbase, frame, imtype, NULL, use_ext, use_frames);
 }
@@ -2441,7 +2443,7 @@ void BKE_image_backup_render(Scene *scene, Image *ima)
 static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr)
 {
        const char *colorspace = ima->colorspace_settings.name;
-       int predivide = ima->alpha_mode == IMA_ALPHA_PREMUL;
+       bool predivide = (ima->alpha_mode == IMA_ALPHA_PREMUL);
 
        ima->rr = RE_MultilayerConvert(ibuf->userdata, colorspace, predivide, ibuf->x, ibuf->y);
 
@@ -3004,16 +3006,16 @@ static ImBuf *image_get_cached_ibuf(Image *ima, ImageUser *iuser, int *r_frame,
 BLI_INLINE bool image_quick_test(Image *ima, ImageUser *iuser)
 {
        if (ima == NULL)
-               return FALSE;
+               return false;
 
        if (iuser) {
                if (iuser->ok == 0)
-                       return FALSE;
+                       return false;
        }
        else if (ima->ok == 0)
-               return FALSE;
+               return false;
 
-       return TRUE;
+       return true;
 }
 
 /* Checks optional ImageUser and verifies/creates ImBuf.
@@ -3157,7 +3159,7 @@ bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser)
 
        /* quick reject tests */
        if (!image_quick_test(ima, iuser))
-               return FALSE;
+               return false;
 
        BLI_spin_lock(&image_spin);
 
@@ -3215,15 +3217,15 @@ void BKE_image_pool_free(ImagePool *pool)
        MEM_freeN(pool);
 }
 
-BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame, int index, int *found)
+BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame, int index, bool *found)
 {
        ImagePoolEntry *entry;
 
-       *found = FALSE;
+       *found = false;
 
        for (entry = pool->image_buffers.first; entry; entry = entry->next) {
                if (entry->image == image && entry->frame == frame && entry->index == index) {
-                       *found = TRUE;
+                       *found = true;
                        return entry->ibuf;
                }
        }
@@ -3234,7 +3236,8 @@ BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame
 ImBuf *BKE_image_pool_acquire_ibuf(Image *ima, ImageUser *iuser, ImagePool *pool)
 {
        ImBuf *ibuf;
-       int index, frame, found;
+       int index, frame;
+       bool found;
 
        if (!image_quick_test(ima, iuser))
                return NULL;
@@ -3291,7 +3294,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool
        const int len = (iuser->fie_ima * iuser->frames) / 2;
 
        if (r_is_in_range) {
-               *r_is_in_range = FALSE;
+               *r_is_in_range = false;
        }
 
        if (len == 0) {
@@ -3308,7 +3311,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool
                        if (cfra == 0) cfra = len;
 
                        if (r_is_in_range) {
-                               *r_is_in_range = TRUE;
+                               *r_is_in_range = true;
                        }
                }
 
@@ -3320,7 +3323,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool
                }
                else {
                        if (r_is_in_range) {
-                               *r_is_in_range = TRUE;
+                               *r_is_in_range = true;
                        }
                }
 
@@ -3470,7 +3473,7 @@ unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame)
        unsigned char *pixels = NULL;
 
        iuser.framenr = frame;
-       iuser.ok = TRUE;
+       iuser.ok = true;
 
        ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock);
 
@@ -3497,7 +3500,7 @@ float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame)
        float *pixels = NULL;
 
        iuser.framenr = frame;
-       iuser.ok = TRUE;
+       iuser.ok = true;
 
        ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock);
 
index 9dbaaa9..11c0057 100644 (file)
@@ -546,10 +546,10 @@ static char *key_block_get_data(Key *key, KeyBlock *actkb, KeyBlock *kb, char **
 
 
 /* currently only the first value of 'ofs' may be set. */
-static short key_pointer_size(const Key *key, const int mode, int *poinsize, int *ofs)
+static bool key_pointer_size(const Key *key, const int mode, int *poinsize, int *ofs)
 {
        if (key->from == NULL) {
-               return FALSE;
+               return false;
        }
 
        switch (GS(key->from->name)) {
@@ -574,10 +574,10 @@ static short key_pointer_size(const Key *key, const int mode, int *poinsize, int
                        break;
                default:
                        BLI_assert(!"invalid 'key->from' ID type");
-                       return FALSE;
+                       return false;
        }
 
-       return TRUE;
+       return true;
 }
 
 static void cp_key(const int start, int end, const int tot, char *poin, Key *key, KeyBlock *actkb, KeyBlock *kb, float *weights, const int mode)
index 3cade88..749e915 100644 (file)
@@ -161,7 +161,7 @@ void BKE_lamp_make_local(Lamp *la)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -177,13 +177,13 @@ void BKE_lamp_make_local(Lamp *la)
        ob = bmain->object.first;
        while (ob) {
                if (ob->data == la) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
                ob = ob->id.next;
        }
        
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &la->id);
        }
        else if (is_local && is_lib) {
index f647926..55abd4b 100644 (file)
@@ -314,7 +314,7 @@ void BKE_lattice_make_local(Lattice *lt)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       int is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -327,14 +327,14 @@ void BKE_lattice_make_local(Lattice *lt)
                return;
        }
        
-       for (ob = bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob = ob->id.next) {
+       for (ob = bmain->object.first; ob && ELEM(false, is_lib, is_local); ob = ob->id.next) {
                if (ob->data == lt) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
        
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &lt->id);
        }
        else if (is_local && is_lib) {
@@ -630,7 +630,7 @@ static bool calc_curve_deform(Scene *scene, Object *par, float co[3],
        /* to be sure, mostly after file load */
        if (ELEM(NULL, par->curve_cache, par->curve_cache->path)) {
 #ifdef CYCLIC_DEPENDENCY_WORKAROUND
-               BKE_displist_make_curveTypes(scene, par, FALSE);
+               BKE_displist_make_curveTypes(scene, par, false);
 #endif
                if (par->curve_cache->path == NULL) {
                        return 0;  // happens on append and cyclic dependencies...
@@ -731,7 +731,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target, DerivedMesh
        init_curve_deform(cuOb, target, &cd);
 
        /* dummy bounds, keep if CU_DEFORM_BOUNDS_OFF is set */
-       if (is_neg_axis == FALSE) {
+       if (is_neg_axis == false) {
                cd.dmin[0] = cd.dmin[1] = cd.dmin[2] = 0.0f;
                cd.dmax[0] = cd.dmax[1] = cd.dmax[2] = 1.0f;
        }
@@ -756,7 +756,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target, DerivedMesh
                }
        }
        else {
-               use_vgroups = FALSE;
+               use_vgroups = false;
        }
        
        if (vgroup && vgroup[0] && use_vgroups) {
@@ -880,7 +880,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
 {
        LatticeDeformData *lattice_deform_data;
        int a;
-       int use_vgroups;
+       bool use_vgroups;
 
        if (laOb->type != OB_LATTICE)
                return;
@@ -902,7 +902,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
                }
        }
        else {
-               use_vgroups = FALSE;
+               use_vgroups = false;
        }
        
        if (vgroup && vgroup[0] && use_vgroups) {
index 9f05284..9262838 100644 (file)
@@ -318,7 +318,7 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather
 
 /* this function is not exact, sometimes it returns false positives,
  * the main point of it is to clear out _almost_ all bucket/face non-intersections,
- * returning TRUE in corner cases is ok but missing an intersection is NOT.
+ * returning true in corner cases is ok but missing an intersection is NOT.
  *
  * method used
  * - check if the center of the buckets bounding box is intersecting the face
index eb8b385..01bbd1d 100644 (file)
@@ -80,7 +80,7 @@ void init_def_material(void)
 /* not material itself */
 void BKE_material_free(Material *ma)
 {
-       BKE_material_free_ex(ma, TRUE);
+       BKE_material_free_ex(ma, true);
 }
 
 /* not material itself */
@@ -294,7 +294,8 @@ void BKE_material_make_local(Material *ma)
        Mesh *me;
        Curve *cu;
        MetaBall *mb;
-       int a, is_local = FALSE, is_lib = FALSE;
+       int a;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -318,8 +319,8 @@ void BKE_material_make_local(Material *ma)
                if (ob->mat) {
                        for (a = 0; a < ob->totcol; a++) {
                                if (ob->mat[a] == ma) {
-                                       if (ob->id.lib) is_lib = TRUE;
-                                       else is_local = TRUE;
+                                       if (ob->id.lib) is_lib = true;
+                                       else is_local = true;
                                }
                        }
                }
@@ -331,8 +332,8 @@ void BKE_material_make_local(Material *ma)
                if (me->mat) {
                        for (a = 0; a < me->totcol; a++) {
                                if (me->mat[a] == ma) {
-                                       if (me->id.lib) is_lib = TRUE;
-                                       else is_local = TRUE;
+                                       if (me->id.lib) is_lib = true;
+                                       else is_local = true;
                                }
                        }
                }
@@ -344,8 +345,8 @@ void BKE_material_make_local(Material *ma)
                if (cu->mat) {
                        for (a = 0; a < cu->totcol; a++) {
                                if (cu->mat[a] == ma) {
-                                       if (cu->id.lib) is_lib = TRUE;
-                                       else is_local = TRUE;
+                                       if (cu->id.lib) is_lib = true;
+                                       else is_local = true;
                                }
                        }
                }
@@ -357,8 +358,8 @@ void BKE_material_make_local(Material *ma)
                if (mb->mat) {
                        for (a = 0; a < mb->totcol; a++) {
                                if (mb->mat[a] == ma) {
-                                       if (mb->id.lib) is_lib = TRUE;
-                                       else is_local = TRUE;
+                                       if (mb->id.lib) is_lib = true;
+                                       else is_local = true;
                                }
                        }
                }
@@ -366,7 +367,7 @@ void BKE_material_make_local(Material *ma)
        }
 
        /* Only local users. */
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &ma->id);
                extern_local_material(ma);
        }
@@ -944,14 +945,14 @@ short find_material_index(Object *ob, Material *ma)
        return 0;
 }
 
-int object_add_material_slot(Object *ob)
+bool object_add_material_slot(Object *ob)
 {
-       if (ob == NULL) return FALSE;
-       if (ob->totcol >= MAXMAT) return FALSE;
+       if (ob == NULL) return false;
+       if (ob->totcol >= MAXMAT) return false;
        
        assign_material(ob, NULL, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF);
        ob->actcol = ob->totcol;
-       return TRUE;
+       return true;
 }
 
 static void do_init_render_material(Material *ma, int r_mode, float *amb)
@@ -1128,7 +1129,7 @@ static bool material_in_nodetree(bNodeTree *ntree, Material *mat)
        return 0;
 }
 
-int material_in_material(Material *parmat, Material *mat)
+bool material_in_material(Material *parmat, Material *mat)
 {
        if (parmat == mat)
                return 1;
@@ -1196,7 +1197,7 @@ void material_drivers_update(Scene *scene, Material *ma, float ctime)
        ma->id.flag &= ~LIB_DOIT;
 }
 
-int object_remove_material_slot(Object *ob)
+bool object_remove_material_slot(Object *ob)
 {
        Material *mao, ***matarar;
        Object *obt;
@@ -1204,14 +1205,14 @@ int object_remove_material_slot(Object *ob)
        short a, actcol;
        
        if (ob == NULL || ob->totcol == 0) {
-               return FALSE;
+               return false;
        }
 
        /* this should never happen and used to crash */
        if (ob->actcol <= 0) {
                printf("%s: invalid material index %d, report a bug!\n", __func__, ob->actcol);
                BLI_assert(0);
-               return FALSE;
+               return false;
        }
 
        /* take a mesh/curve/mball as starting point, remove 1 index,
@@ -1280,7 +1281,7 @@ int object_remove_material_slot(Object *ob)
                }
        }
 
-       return TRUE;
+       return true;
 }
 
 
@@ -1532,7 +1533,7 @@ void free_matcopybuf(void)
        matcopybuf.ramp_spec = NULL;
 
        if (matcopybuf.nodetree) {
-               ntreeFreeTree_ex(matcopybuf.nodetree, FALSE);
+               ntreeFreeTree_ex(matcopybuf.nodetree, false);
                MEM_freeN(matcopybuf.nodetree);
                matcopybuf.nodetree = NULL;
        }
@@ -1558,7 +1559,7 @@ void copy_matcopybuf(Material *ma)
                        matcopybuf.mtex[a] = MEM_dupallocN(mtex);
                }
        }
-       matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, FALSE);
+       matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, false);
        matcopybuf.preview = NULL;
        BLI_listbase_clear(&matcopybuf.gpumaterial);
        matcopied = 1;
@@ -1611,7 +1612,7 @@ void paste_matcopybuf(Material *ma)
                }
        }
 
-       ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, FALSE);
+       ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, false);
 }
 
 
index 39da067..9efd0de 100644 (file)
@@ -252,7 +252,7 @@ void BKE_mball_make_local(MetaBall *mb)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -269,12 +269,12 @@ void BKE_mball_make_local(MetaBall *mb)
 
        for (ob = G.main->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
                if (ob->data == mb) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
        
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &mb->id);
                extern_local_mball(mb);
        }
@@ -356,7 +356,7 @@ void BKE_mball_texspace_calc(Object *ob)
        DispList *dl;
        BoundBox *bb;
        float *data, min[3], max[3] /*, loc[3], size[3] */;
-       int tot, do_it = FALSE;
+       int tot, do_it = false;
 
        if (ob->bb == NULL) ob->bb = MEM_callocN(sizeof(BoundBox), "mb boundbox");
        bb = ob->bb;
@@ -369,7 +369,7 @@ void BKE_mball_texspace_calc(Object *ob)
        dl = ob->curve_cache->disp.first;
        while (dl) {
                tot = dl->nr;
-               if (tot) do_it = TRUE;
+               if (tot) do_it = true;
                data = dl->verts;
                while (tot--) {
                        /* Also weird... but longer. From utildefines. */
@@ -1111,11 +1111,11 @@ static int otherface(int edge, int face)
 
 static void makecubetable(void)
 {
-       static int is_done = FALSE;
+       static bool is_done = false;
        int i, e, c, done[12], pos[8];
 
        if (is_done) return;
-       is_done = TRUE;
+       is_done = true;
 
        for (i = 0; i < 256; i++) {
                for (e = 0; e < 12; e++) done[e] = 0;
index b7ebd5c..7d8d98a 100644 (file)
@@ -526,7 +526,7 @@ Mesh *BKE_mesh_copy_ex(Main *bmain, Mesh *me)
                CustomData_copy(&me->fdata, &men->fdata, CD_MASK_MESH, CD_DUPLICATE, men->totface);
        }
        else {
-               mesh_tessface_clear_intern(men, FALSE);
+               mesh_tessface_clear_intern(men, false);
        }
 
        BKE_mesh_update_customdata_pointers(men, do_tessface);
@@ -623,7 +623,7 @@ void BKE_mesh_make_local(Mesh *me)
 {
        Main *bmain = G.main;
        Object *ob;
-       int is_local = FALSE, is_lib = FALSE;
+       bool is_local = false, is_lib = false;
 
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -639,12 +639,12 @@ void BKE_mesh_make_local(Mesh *me)
 
        for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) {
                if (me == ob->data) {
-                       if (ob->id.lib) is_lib = TRUE;
-                       else is_local = TRUE;
+                       if (ob->id.lib) is_lib = true;
+                       else is_local = true;
                }
        }
 
-       if (is_local && is_lib == FALSE) {
+       if (is_local && is_lib == false) {
                id_clear_lib_data(bmain, &me->id);
                expand_local_mesh(me);
        }
@@ -1126,7 +1126,7 @@ static void make_edges_mdata_extend(MEdge **r_alledge, int *r_totedge,
 
                /* --- */
                for (ehi = BLI_edgehashIterator_new(eh);
-                    BLI_edgehashIterator_isDone(ehi) == FALSE;
+                    BLI_edgehashIterator_isDone(ehi) == false;
                     BLI_edgehashIterator_step(ehi), ++medge, e_index++)
                {
                        BLI_edgehashIterator_getKey(ehi, &medge->v1, &medge->v2);
@@ -1596,19 +1596,19 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e
                        /* each iteration find a polyline and add this as a nurbs poly spline */
 
                        ListBase polyline = {NULL, NULL}; /* store a list of VertLink's */
-                       int closed = FALSE;
+                       bool closed = false;
                        int totpoly = 0;
                        MEdge *med_current = ((EdgeLink *)edges.last)->edge;
                        unsigned int startVert = med_current->v1;
                        unsigned int endVert = med_current->v2;
-                       int ok = TRUE;
+                       bool ok = true;
 
                        appendPolyLineVert(&polyline, startVert);   totpoly++;
                        appendPolyLineVert(&polyline, endVert);     totpoly++;
                        BLI_freelinkN(&edges, edges.last);          totedges--;
 
                        while (ok) { /* while connected edges are found... */
-                               ok = FALSE;
+                               ok = false;
                                i = totedges;
                                while (i) {
                                        EdgeLink *edl;
@@ -1621,25 +1621,25 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e
                                                endVert = med->v2;
                                                appendPolyLineVert(&polyline, med->v2); totpoly++;
                                                BLI_freelinkN(&edges, edl);             totedges--;
-                                               ok = TRUE;
+                                               ok = true;
                                        }
                                        else if (med->v2 == endVert) {
                                                endVert = med->v1;
                                                appendPolyLineVert(&polyline, endVert); totpoly++;
                                                BLI_freelinkN(&edges, edl);             totedges--;
-                                               ok = TRUE;
+                                               ok = true;
                                        }
                                        else if (med->v1 == startVert) {
                                                startVert = med->v2;
                                                prependPolyLineVert(&polyline, startVert);  totpoly++;
                                                BLI_freelinkN(&edges, edl);                 totedges--;
-                                               ok = TRUE;
+                                               ok = true;
                                        }
                                        else if (med->v2 == startVert) {
                                                startVert = med->v1;
                                                prependPolyLineVert(&polyline, startVert);  totpoly++;
                                                BLI_freelinkN(&edges, edl);                 totedges--;
-                                               ok = TRUE;
+                                               ok = true;
                                        }
                                }
                        }
@@ -1648,7 +1648,7 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e
                        if (startVert == endVert) {
                                BLI_freelinkN(&polyline, polyline.last);
                                totpoly--;
-                               closed = TRUE;
+                               closed = true;
                        }
 
                        /* --- nurbs --- */
@@ -1920,7 +1920,7 @@ void BKE_mesh_tessface_ensure(Mesh *mesh)
 
 void BKE_mesh_tessface_clear(Mesh *mesh)
 {
-       mesh_tessface_clear_intern(mesh, TRUE);
+       mesh_tessface_clear_intern(mesh, true);
 }
 
 void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh)
index 7b56784..848483d 100644 (file)
@@ -73,7 +73,7 @@ typedef struct SortPoly {
        int numverts;
        int loopstart;
        unsigned int index;
-       int invalid; /* Poly index. */
+       bool invalid;  /* Poly index. */
 } SortPoly;
 
 static void edge_store_assign(uint32_t verts[2],  const uint32_t v1, const uint32_t v2)
@@ -256,7 +256,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
        }
 
        for (i = 1; i < totvert; i++, mv++) {
-               int fix_normal = TRUE;
+               bool fix_normal = true;
 
                for (j = 0; j < 3; j++) {
                        if (!finite(mv->co[j])) {
@@ -265,25 +265,25 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                if (do_fixes) {
                                        zero_v3(mv->co);
 
-                                       verts_fixed = TRUE;
+                                       verts_fixed = true;
                                }
                        }
 
                        if (mv->no[j] != 0)
-                               fix_normal = FALSE;
+                               fix_normal = false;
                }
 
                if (fix_normal) {
                        PRINT_ERR("\tVertex %u: has zero normal, assuming Z-up normal\n", i);
                        if (do_fixes) {
                                mv->no[2] = SHRT_MAX;
-                               verts_fixed = TRUE;
+                               verts_fixed = true;
                        }
                }
        }
 
        for (i = 0, me = medges; i < totedge; i++, me++) {
-               int remove = FALSE;
+               int remove = false;
                if (me->v1 == me->v2) {
                        PRINT_ERR("\tEdge %u: has matching verts, both %u\n", i, me->v1);
                        remove = do_fixes;
@@ -303,7 +303,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                        remove = do_fixes;
                }
 
-               if (remove == FALSE) {
+               if (remove == false) {
                        BLI_edgehash_insert(edge_hash, me->v1, me->v2, SET_INT_IN_POINTER(i));
                }
                else {
@@ -312,7 +312,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
        }
 
        if (mfaces && !mpolys) {
-#              define REMOVE_FACE_TAG(_mf) { _mf->v3 = 0; do_face_free = TRUE; } (void)0
+#              define REMOVE_FACE_TAG(_mf) { _mf->v3 = 0; do_face_free = true; } (void)0
 #              define CHECK_FACE_VERT_INDEX(a, b) \
                                        if (mf->a == mf->b) { \
                                                PRINT_ERR("    face %u: verts invalid, " STRINGIFY(a) "/" STRINGIFY(b) " both %u\n", i, mf->a); \
@@ -322,7 +322,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        if (!BLI_edgehash_haskey(edge_hash, mf->a, mf->b)) { \
                                                PRINT_ERR("    face %u: edge " STRINGIFY(a) "/" STRINGIFY(b) \
                                                          " (%u,%u) is missing edge data\n", i, mf->a, mf->b); \
-                                               do_edge_recalc = TRUE; \
+                                               do_edge_recalc = true; \
                                        } (void)0
 
                MFace *mf;
@@ -336,7 +336,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                PRINT_ERR("No Polys, only tesselated Faces\n");
 
                for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) {
-                       int remove = FALSE;
+                       int remove = false;
                        int fidx;
                        unsigned int fv[4];
 
@@ -349,7 +349,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                }
                        } while (fidx--);
 
-                       if (remove == FALSE) {
+                       if (remove == false) {
                                if (mf->v4) {
                                        CHECK_FACE_VERT_INDEX(v1, v2);
                                        CHECK_FACE_VERT_INDEX(v1, v3);
@@ -367,7 +367,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        CHECK_FACE_VERT_INDEX(v2, v3);
                                }
 
-                               if (remove == FALSE) {
+                               if (remove == false) {
                                        if (totedge) {
                                                if (mf->v4) {
                                                        CHECK_FACE_EDGE(v1, v2);
@@ -411,7 +411,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                sf++;
 
                for (i = 1; i < totsortface; i++, sf++) {
-                       int remove = FALSE;
+                       int remove = false;
 
                        /* on a valid mesh, code below will never run */
                        if (memcmp(sf->es, sf_prev->es, sizeof(sf_prev->es)) == 0) {
@@ -475,18 +475,18 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                /* Invalid loop data. */
                                PRINT_ERR("\tPoly %u is invalid (loopstart: %u, totloop: %u)\n",
                                          sp->index, mp->loopstart, mp->totloop);
-                               sp->invalid = TRUE;
+                               sp->invalid = true;
                        }
                        else if (mp->loopstart + mp->totloop > totloop) {
                                /* Invalid loop data. */
                                PRINT_ERR("\tPoly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n",
                                          sp->index, mp->loopstart, mp->loopstart + mp->totloop - 1, totloop - 1);
-                               sp->invalid = TRUE;
+                               sp->invalid = true;
                        }
                        else {
                                /* Poly itself is valid, for now. */
                                int v1, v2; /* v1 is prev loop vert idx, v2 is current loop one. */
-                               sp->invalid = FALSE;
+                               sp->invalid = false;
                                sp->verts = v = MEM_mallocN(sizeof(int) * mp->totloop, "Vert idx of SortPoly");
                                sp->numverts = mp->totloop;
                                sp->loopstart = mp->loopstart;
@@ -496,7 +496,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        if (ml->v >= totvert) {
                                                /* Invalid vert idx. */
                                                PRINT_ERR("\tLoop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
-                                               sp->invalid = TRUE;
+                                               sp->invalid = true;
                                        }
 
                                        mverts[ml->v].flag |= ME_VERT_TMP_TAG;
@@ -509,7 +509,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        for (j = 0; j < mp->totloop; j++, v++) {
                                                if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) {
                                                        PRINT_ERR("\tPoly %u has duplicate vert reference at corner (%u)\n", i, j);
-                                                       sp->invalid = TRUE;
+                                                       sp->invalid = true;
                                                }
                                                mverts[*v].flag &= ~ME_VERT_TMP_TAG;
                                        }
@@ -526,9 +526,9 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                                /* Edge not existing. */
                                                PRINT_ERR("\tPoly %u needs missing edge (%u, %u)\n", sp->index, v1, v2);
                                                if (do_fixes)
-                                                       do_edge_recalc = TRUE;
+                                                       do_edge_recalc = true;
                                                else
-                                                       sp->invalid = TRUE;
+                                                       sp->invalid = true;
                                        }
                                        else if (ml->e >= totedge) {
                                                /* Invalid edge idx.
@@ -541,7 +541,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                                }
                                                else {
                                                        PRINT_ERR("\tLoop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e);
-                                                       sp->invalid = TRUE;
+                                                       sp->invalid = true;
                                                }
                                        }
                                        else {
@@ -557,7 +557,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                                        }
                                                        else {
                                                                PRINT_ERR("\tPoly %u has invalid edge reference (%u)\n", sp->index, ml->e);
-                                                               sp->invalid = TRUE;
+                                                               sp->invalid = true;
                                                        }
                                                }
                                        }
@@ -576,7 +576,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                                        if (dlt > 1) {
                                                                PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
                                                                          sp->index, *prev_v, dlt);
-                                                               sp->invalid = TRUE;
+                                                               sp->invalid = true;
                                                        }
                                                        prev_v = v;
                                                }
@@ -584,7 +584,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        if (v - prev_v > 1) { /* Don't forget final verts! */
                                                PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
                                                          sp->index, *prev_v, (int)(v - prev_v));
-                                               sp->invalid = TRUE;
+                                               sp->invalid = true;
                                        }
                                }
                        
@@ -599,7 +599,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                for (i = 1; i < totpoly; i++, sp++) {
                        int p1_nv = sp->numverts, p2_nv = prev_sp->numverts;
                        int *p1_v = sp->verts, *p2_v = prev_sp->verts;
-                       short p1_sub = TRUE, p2_sub = TRUE;
+                       short p1_sub = true, p2_sub = true;
                        if (sp->invalid)
                                break;
                        /* Test same polys. */
@@ -616,13 +616,13 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                        while ((p1_nv && p2_nv) && (p1_sub || p2_sub)) {
                                if (*p1_v < *p2_v) {
                                        if (p1_sub)
-                                               p1_sub = FALSE;
+                                               p1_sub = false;
                                        p1_nv--;
                                        p1_v++;
                                }
                                else if (*p2_v < *p1_v) {
                                        if (p2_sub)
-                                               p2_sub = FALSE;
+                                               p2_sub = false;
                                        p2_nv--;
                                        p2_v++;
                                }
@@ -635,23 +635,23 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                }
                        }
                        if (p1_nv && p1_sub)
-                               p1_sub = FALSE;
+                               p1_sub = false;
                        else if (p2_nv && p2_sub)
-                               p2_sub = FALSE;
+                               p2_sub = false;
 
                        if (p1_sub && p2_sub) {
                                PRINT("\tPolys %u and %u use same vertices, considering poly %u as invalid.\n",
                                      prev_sp->index, sp->index, sp->index);
-                               sp->invalid = TRUE;
+                               sp->invalid = true;
                        }
                        /* XXX In fact, these might be valid? :/ */
                        else if (p1_sub) {
                                PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", sp->index, prev_sp->index);
-                               sp->invalid = TRUE;
+                               sp->invalid = true;
                        }
                        else if (p2_sub) {
                                PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", prev_sp->index, sp->index);
-                               prev_sp->invalid = TRUE;
+                               prev_sp->invalid = true;
                                prev_sp = sp; /* sp is new reference poly. */
                        }
 #else
@@ -670,7 +670,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                else {
                                        is_valid = false;
                                }
-                               sp->invalid = TRUE;
+                               sp->invalid = true;
                        }
 #endif
                        else {
@@ -755,14 +755,14 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                        PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
                                        if (do_fixes) {
                                                dw->weight = 0.0f;
-                                               vert_weights_fixed = TRUE;
+                                               vert_weights_fixed = true;
                                        }
                                }
                                else if (dw->weight < 0.0f || dw->weight > 1.0f) {
                                        PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
                                        if (do_fixes) {
                                                CLAMP(dw->weight, 0.0f, 1.0f);
-                                               vert_weights_fixed = TRUE;
+                                               vert_weights_fixed = true;
                                        }
                                }
 
@@ -776,7 +776,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                                        j--;
                                                        dw = dv->dw + j;
 
-                                                       vert_weights_fixed = TRUE;
+                                                       vert_weights_fixed = true;
                                                }
                                                else { /* all freed */
                                                        break;
@@ -812,7 +812,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
 
        if (mesh && mesh->mselect) {
                MSelect *msel;
-               int free_msel = FALSE;
+               bool free_msel = false;
 
                for (i = 0, msel = mesh->mselect; i < mesh->totselect; i++, msel++) {
                        int tot_elem = 0;
@@ -820,7 +820,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                        if (msel->index < 0) {
                                PRINT_ERR("\tMesh select element %d type %d index is negative, "
                                          "resetting selection stack.\n", i, msel->type);
-                               free_msel = TRUE;
+                               free_msel = true;
                                break;
                        }
 
@@ -840,7 +840,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
                                PRINT_ERR("\tMesh select element %d type %d index %d is larger than data array size %d, "
                                          "resetting selection stack.\n", i, msel->type, msel->index, tot_elem);
 
-                               free_msel = TRUE;
+                               free_msel = true;
                                break;
                        }
                }
@@ -1095,12 +1095,12 @@ void BKE_mesh_strip_loose_polysloops(Mesh *me)
        int *new_idx = MEM_mallocN(sizeof(int) * me->totloop, __func__);
 
        for (a = b = 0, p = me->mpoly; a < me->totpoly; a++, p++) {
-               int invalid = FALSE;
+               bool invalid = false;
                int i = p->loopstart;
                int stop = i + p->totloop;
 
                if (stop > me->totloop || stop < i) {
-                       invalid = TRUE;
+                       invalid = true;
                }
                else {
                        l = &me->mloop[i];
@@ -1108,7 +1108,7 @@ void BKE_mesh_strip_loose_polysloops(Mesh *me)
                        /* If one of the poly's loops is invalid, the whole poly is invalid! */
                        for (; i--; l++) {
                                if (l->e == INVALID_LOOP_EDGE_MARKER) {
-                                       invalid = TRUE;
+                                       invalid = true;
                                        break;
                                }
                        }
@@ -1431,7 +1431,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
 
        med = CustomData_get_layer(&edata, CD_MEDGE);
        for (ehi = BLI_edgehashIterator_new(eh), i = 0;
-            BLI_edgehashIterator_isDone(ehi) == FALSE;
+            BLI_edgehashIterator_isDone(ehi) == false;
             BLI_edgehashIterator_step(ehi), ++i, ++med)
        {
                if (update && (med_orig = BLI_edgehashIterator_getValue(ehi))) {
index a9ff569..8c79dee 100644 (file)
@@ -79,7 +79,7 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm, const bool calc_face_normal)
        int cd_edge_bweight_offset;
        int cd_edge_crease_offset;
 
-       if (is_init == FALSE) {
+       if (is_init == false) {
                /* check if we have an origflag */
                has_orig_hflag |= CustomData_has_layer(&bm->vdata, CD_ORIGINDEX) ? BM_VERT : 0;
                has_orig_hflag |= CustomData_has_layer(&bm->edata, CD_ORIGINDEX) ? BM_EDGE : 0;
index 81744af..d4179be 100644 (file)
@@ -1191,7 +1191,7 @@ void BKE_movieclip_reload(MovieClip *clip)
        /* clear cache */
        free_buffers(clip);
 
-       clip->tracking.stabilization.ok = FALSE;
+       clip->tracking.stabilization.ok = false;
 
        /* update clip source */
        detect_clip_source(clip);
@@ -1231,7 +1231,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
 
        scopes->marker = NULL;
        scopes->track = NULL;
-       scopes->track_locked = TRUE;
+       scopes->track_locked = true;
 
        if (clip) {
                MovieTrackingTrack *act_track = BKE_tracking_track_get_active(&clip->tracking);
@@ -1245,12 +1245,12 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
                        scopes->track = track;
 
                        if (marker->flag & MARKER_DISABLED) {
-                               scopes->track_disabled = TRUE;
+                               scopes->track_disabled = true;
                        }
                        else {
                                ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user);
 
-                               scopes->track_disabled = FALSE;
+                               scopes->track_disabled = false;
 
                                if (ibuf && (ibuf->rect || ibuf->rect_float)) {
                                        ImBuf *search_ibuf;
@@ -1296,7 +1296,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
                        if ((track->flag & TRACK_LOCKED) == 0) {
                                float pat_min[2], pat_max[2];
 
-                               scopes->track_locked = FALSE;
+                               scopes->track_locked = false;
 
                                /* XXX: would work fine with non-transformed patterns, but would likely fail
                                 *      with transformed patterns, but that would be easier to debug when
@@ -1310,7 +1310,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
        }
 
        scopes->framenr = user->framenr;
-       scopes->ok = TRUE;
+       scopes->ok = true;
 }
 
 static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, bool undistorted, bool threaded)
index cba905a..b6c87f2 100644 (file)
@@ -699,7 +699,7 @@ void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int dire
        multires_set_tot_level(ob, mmd, lvl);
 }
 
-static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple, int alloc_paint_mask)
+static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple, bool alloc_paint_mask)
 {
        MultiresModifierData mmd = {{NULL}};
        MultiresFlags flags = MULTIRES_USE_LOCAL_MMD;
@@ -1302,7 +1302,7 @@ void multires_set_space(DerivedMesh *dm, Object *ob, int from, int to)
        }
 
        totlvl = mmd->totlvl;
-       ccgdm = multires_dm_create_local(ob, dm, totlvl, totlvl, mmd->simple, FALSE);
+       ccgdm = multires_dm_create_local(ob, dm, totlvl, totlvl, mmd->simple, false);
        
        subsurf = subsurf_dm_create_local(ob, dm, totlvl,
                                          mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges, mmd->flags & eMultiresModifierFlag_PlainUv, 0);
index b2d6988..2122526 100644 (file)
@@ -1027,16 +1027,16 @@ void nodeFromView(bNode *node, float x, float y, float *rx, float *ry)
        }
 }
 
-int nodeAttachNodeCheck(bNode *node, bNode *parent)
+bool nodeAttachNodeCheck(bNode *node, bNode *parent)
 {
        bNode *parent_recurse;
        for (parent_recurse = node; parent_recurse; parent_recurse = parent_recurse->parent) {
                if (parent_recurse == parent) {
-                       return TRUE;
+                       return true;
                }
        }
 
-       return FALSE;
+       return false;
 }
 
 void nodeAttachNode(bNode *node, bNode *parent)
@@ -1044,7 +1044,7 @@ void nodeAttachNode(bNode *node, bNode *parent)
        float locx, locy;
 
        BLI_assert(parent->type == NODE_FRAME);
-       BLI_assert(nodeAttachNodeCheck(parent, node) == FALSE);
+       BLI_assert(nodeAttachNodeCheck(parent, node) == false);
 
        nodeToView(node, 0.0f, 0.0f, &locx, &locy);
        
@@ -1203,11 +1203,11 @@ static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, Main *bmain, bool do_
 
 bNodeTree *ntreeCopyTree_ex(bNodeTree *ntree, const bool do_id_user)
 {
-       return ntreeCopyTree_internal(ntree, G.main, do_id_user, TRUE, TRUE);
+       return ntreeCopyTree_internal(ntree, G.main, do_id_user, true, true);
 }
 bNodeTree *ntreeCopyTree(bNodeTree *ntree)
 {
-       return ntreeCopyTree_ex(ntree, TRUE);
+       return ntreeCopyTree_ex(ntree, true);
 }
 
 /* use when duplicating scenes */
@@ -1234,7 +1234,7 @@ void ntreeSwitchID_ex(bNodeTree *ntree, ID *id_from, ID *id_to, const bool do_id
 }
 void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to)
 {
-       ntreeSwitchID_ex(ntree, id_from, id_to, TRUE);
+       ntreeSwitchID_ex(ntree, id_from, id_to, true);
 }
 
 void ntreeUserIncrefID(bNodeTree *ntree)
@@ -1265,7 +1265,7 @@ int BKE_node_preview_used(bNode *node)
        return (node->typeinfo->flag & NODE_PREVIEW) != 0;
 }
 
-bNodePreview *BKE_node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create)
+bNodePreview *BKE_node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create)
 {
        bNodePreview *preview;
        
@@ -1779,7 +1779,7 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const bool do_id_user)
 /* same as ntreeFreeTree_ex but always manage users */
 void ntreeFreeTree(bNodeTree *ntree)
 {
-       ntreeFreeTree_ex(ntree, TRUE);
+       ntreeFreeTree_ex(ntree, true);
 }
 
 void ntreeFreeCache(bNodeTree *ntree)
@@ -1876,7 +1876,7 @@ bNodeTree *ntreeFromID(ID *id)
 void ntreeMakeLocal(bNodeTree *ntree)
 {
        Main *bmain = G.main;
-       int lib = FALSE, local = FALSE;
+       bool lib = false, local = false;
        
        /* - only lib users: do nothing
         * - only local users: set flag
@@ -1896,9 +1896,9 @@ void ntreeMakeLocal(bNodeTree *ntree)
                for (node = tntree->nodes.first; node; node = node->next) {
                        if (node->id == (ID *)ntree) {
                                if (owner_id->lib)
-                                       lib = TRUE;
+                                       lib = true;
                                else
-                                       local = TRUE;
+                                       local = true;
                        }
                }
        } FOREACH_NODETREE_END
@@ -1971,7 +1971,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
                /* Make full copy.
                 * Note: previews are not copied here.
                 */
-               ltree = ntreeCopyTree_internal(ntree, NULL, FALSE, FALSE, FALSE);
+               ltree = ntreeCopyTree_internal(ntree, NULL, false, false, false);
                ltree->flag |= NTREE_IS_LOCALIZED;
                
                for (node = ltree->nodes.first; node; node = node->next) {
@@ -2028,7 +2028,7 @@ void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree)
                if (ntree->typeinfo->local_merge)
                        ntree->typeinfo->local_merge(localtree, ntree);
                
-               ntreeFreeTree_ex(localtree, FALSE);
+               ntreeFreeTree_ex(localtree, false);
                MEM_freeN(localtree);
        }
 }
@@ -2170,7 +2170,7 @@ static void ntree_interface_identifier_base(bNodeTree *ntree, char *base)
 {
        /* generate a valid RNA identifier */
        sprintf(base, "NodeTreeInterface_%s", ntree->id.name + 2);
-       RNA_identifier_sanitize(base, FALSE);
+       RNA_identifier_sanitize(base, false);
 }
 
 /* check if the identifier is already in use */
@@ -2390,9 +2390,9 @@ bool nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id)
 
        for (node = ntree->nodes.first; node; node = node->next) {
                if (node->id && GS(node->id->name) == idtype) {
-                       if (id && ok == FALSE && node->id == id) {
+                       if (id && ok == false && node->id == id) {
                                node->flag |= NODE_ACTIVE_ID;
-                               ok = TRUE;
+                               ok = true;
                        }
                        else {
                                node->flag &= ~NODE_ACTIVE_ID;
@@ -2543,7 +2543,7 @@ void BKE_node_clipboard_clear(void)
 #endif
 }
 
-/* return FALSE when one or more ID's are lost */
+/* return false when one or more ID's are lost */
 bool BKE_node_clipboard_validate(void)
 {
        bool ok = true;
@@ -2763,10 +2763,10 @@ bool BKE_node_instance_hash_tag_key(bNodeInstanceHash *hash, bNodeInstanceKey ke
        
        if (entry) {
                entry->tag = 1;
-               return TRUE;
+               return true;
        }
        else
-               return FALSE;
+               return false;
 }
 
 void BKE_node_instance_hash_remove_untagged(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp)
@@ -2803,7 +2803,7 @@ static int node_get_deplist_recurs(bNodeTree *ntree, bNode *node, bNode ***nsort
        bNodeLink *link;
        int level = 0xFFF;
        
-       node->done = TRUE;
+       node->done = true;
        
        /* check linked nodes */
        for (link = ntree->links.first; link; link = link->next) {
@@ -2840,7 +2840,7 @@ void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, in
        
        /* first clear data */
        for (node = ntree->nodes.first; node; node = node->next) {
-               node->done = FALSE;
+               node->done = false;
                (*totnodes)++;
        }
        if (*totnodes == 0) {
@@ -2865,7 +2865,7 @@ static void ntree_update_node_level(bNodeTree *ntree)
        
        /* first clear tag */
        for (node = ntree->nodes.first; node; node = node->next) {
-               node->done = FALSE;
+               node->done = false;
        }
        
        /* recursive check */
@@ -2937,7 +2937,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree)
        /* avoid reentrant updates, can be caused by RNA update callbacks */
        if (ntree->is_updating)
                return;
-       ntree->is_updating = TRUE;
+       ntree->is_updating = true;
        
        if (ntree->update & (NTREE_UPDATE_LINKS | NTREE_UPDATE_NODES)) {
                /* set the bNodeSocket->link pointers */
@@ -2985,7 +2985,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree)
        }
        ntree->update = 0;
        
-       ntree->is_updating = FALSE;
+       ntree->is_updating = false;
 }
 
 void nodeUpdate(bNodeTree *ntree, bNode *node)
@@ -2993,7 +2993,7 @@ void nodeUpdate(bNodeTree *ntree, bNode *node)
        /* avoid reentrant updates, can be caused by RNA update callbacks */
        if (ntree->is_updating)
                return;
-       ntree->is_updating = TRUE;
+       ntree->is_updating = true;
        
        if (node->typeinfo->updatefunc)
                node->typeinfo->updatefunc(ntree, node);
@@ -3003,7 +3003,7 @@ void nodeUpdate(bNodeTree *ntree, bNode *node)
        /* clear update flag */
        node->update = 0;
        
-       ntree->is_updating = FALSE;
+       ntree->is_updating = false;
 }
 
 bool nodeUpdateID(bNodeTree *ntree, ID *id)
@@ -3034,7 +3034,7 @@ bool nodeUpdateID(bNodeTree *ntree, ID *id)
                nodeUpdateInternalLinks(ntree, node);
        }
        
-       ntree->is_updating = FALSE;
+       ntree->is_updating =&nbs