split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 18:36:47 +0000 (18:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 18:36:47 +0000 (18:36 +0000)
no functional changes.

454 files changed:
source/blender/blenkernel/BKE_array_mallocn.h [new file with mode: 0644]
source/blender/blenkernel/BKE_bmesh.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/BME_conversions.c
source/blender/blenkernel/intern/BME_eulers.c
source/blender/blenkernel/intern/BME_structure.c
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/customdata_file.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/seqcache.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/sketch.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/writeavi.c
source/blender/blenkernel/intern/writeframeserver.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_utildefines.h [new file with mode: 0644]
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/graph.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/voxel.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentImporter.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_ipo_utils.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/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poseUtils.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_lib.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/loopcut.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.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_group.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_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_boids.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_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/screen/area.c
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_undo.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_draw.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_draw.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/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_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_draw.c
source/blender/editors/space_image/image_header.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/image_render.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_draw.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_report.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_info/textview.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/drawnode.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_header.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_state.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/script_edit.c
source/blender/editors/space_script/script_header.c
source/blender/editors/space_script/space_script.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_scopes.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_sound/sound_header.c
source/blender/editors/space_sound/space_sound.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_time/time_ops.c
source/blender/editors/space_userpref/space_userpref.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.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_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.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_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_input.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_ndofinput.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/util/numinput.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_unwrap_ops.c
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/ikplugin/intern/iksolver_plugin.c
source/blender/ikplugin/intern/itasc_plugin.cpp
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/cache.c
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/rectop.c
source/blender/imbuf/intern/rotate.c
source/blender/imbuf/intern/thumbs_blend.c
source/blender/imbuf/intern/tiff.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_actuator.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_lattice.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.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_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_property.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_sculpt_paint.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_world.c
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_curve.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_lattice.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_none.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_shapekey.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_softbody.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_subsurf.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/intern/CMP_util.h
source/blender/nodes/intern/SHD_util.h
source/blender/nodes/intern/TEX_util.h
source/blender/python/generic/IDProp.c
source/blender/python/generic/bgl.c
source/blender/python/generic/blf_py_api.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/mathutils.c
source/blender/python/generic/mathutils_color.c
source/blender/python/generic/mathutils_euler.c
source/blender/python/generic/mathutils_geometry.c
source/blender/python/generic/mathutils_matrix.c
source/blender/python/generic/mathutils_quat.c
source/blender/python/generic/mathutils_vector.c
source/blender/python/generic/noise.c
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_operator_wrap.c
source/blender/python/intern/bpy_props.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_callback.c
source/blender/render/intern/raytrace/bvh.h
source/blender/render/intern/raytrace/rayobject.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
source/blender/render/intern/raytrace/reorganize.h
source/blender/render/intern/raytrace/svbvh.h
source/blender/render/intern/raytrace/vbvh.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/occlusion.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/rayobject_blibvh.c
source/blender/render/intern/source/rayobject_instance.c
source/blender/render/intern/source/rayobject_octree.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/texture.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.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_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/intern/wm_window.c
source/creator/buildinfo.c
source/creator/creator.c
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_ModifierDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.cpp

diff --git a/source/blender/blenkernel/BKE_array_mallocn.h b/source/blender/blenkernel/BKE_array_mallocn.h
new file mode 100644 (file)
index 0000000..c2ced0e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+*/
+
+#ifndef BKE_ARRAY_MALLOCN_H
+#define BKE_ARRAY_MALLOCN_H
+
+/*little array macro library.  example of usage:
+
+int *arr = NULL;
+V_DECLARE(arr);
+int i;
+
+for (i=0; i<10; i++) {
+       V_GROW(arr);
+       arr[i] = something;
+}
+V_FREE(arr);
+
+arrays are buffered, using double-buffering (so on each reallocation,
+the array size is doubled).  supposedly this should give good Big Oh
+behaviour, though it may not be the best in practice.
+*/
+
+#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp
+
+/*in the future, I plan on having V_DECLARE allocate stack memory it'll
+  use at first, and switch over to heap when it needs more.  that'll mess
+  up cases where you'd want to use this API to build a dynamic list for
+  non-local use, so all such cases should use this macro.*/
+#define V_DYNDECLARE(vec) V_DECLARE(vec)
+
+/*this returns the entire size of the array, including any buffering.*/
+#define V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec)))
+
+/*this returns the logical size of the array, not including buffering.*/
+#define V_COUNT(vec) _##vec##_count
+
+/*grow the array by one.  zeroes the new elements.*/
+#define V_GROW(vec) \
+       V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \
+       ((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\
+       (void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\
+       (void)(vec && (MEM_freeN(vec),1)),\
+       (vec = _##vec##_tmp),\
+       _##vec##_count++)
+
+#define V_FREE(vec) if (vec) MEM_freeN(vec);
+
+/*resets the logical size of an array to zero, but doesn't
+  free the memory.*/
+#define V_RESET(vec) _##vec##_count=0
+
+/*set the count of the array*/
+#define V_SETCOUNT(vec, count) _##vec##_count = (count)
+
+#endif // BKE_ARRAY_MALLOCN_H
index 18db68a..44ca384 100644 (file)
@@ -38,6 +38,7 @@
 #define BKE_BMESH_H
 
 #include "DNA_listBase.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_mempool.h"
 #include "BLI_memarena.h"
index 46746bb..781de5e 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
 */
 
+/* This file shold contain blender format spesific macros
+ * generic defines should go in BLI_utildefines.h */
+
 #ifndef BKE_UTILDEFINES_H
 #define BKE_UTILDEFINES_H
 
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-/* Macro to convert a value to string in the preprocessor
- * STRINGIFY_ARG: gives the defined name in the string
- * STRINGIFY: gives the defined value. */
-#define STRINGIFY_ARG(x) #x
-#define STRINGIFY(x) STRINGIFY_ARG(x)
-
-/* useful for debugging */
-#define AT __FILE__ ":" STRINGIFY(__LINE__)
-
-
-#ifdef __GNUC__
-#  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-#else
-#  define UNUSED(x) UNUSED_ ## x
-#endif
-
-
-/* BKE_assert(), default only to print
- * for aborting need to define WITH_ASSERT_ABORT */
-#if !defined NDEBUG
-#  ifdef WITH_ASSERT_ABORT
-#    define _dummy_abort abort
-#  else
-#    define _dummy_abort() (void)0
-#  endif
-#  ifdef __GNUC__ /* just want to check if __func__ is available */
-#    define BKE_assert(a) \
-do { \
-       if (0 == (a)) { \
-               fprintf(stderr, \
-                       "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \
-                       __FILE__, __func__, __LINE__, STRINGIFY(a)); \
-               _dummy_abort(); \
-       } \
-} while (0)
-#  else
-#    define BKE_assert(a) \
-do { \
-       if (0 == (a)) { \
-               fprintf(stderr, \
-                       "BKE_assert failed: %s, %d at \'%s\'\n", \
-                       __FILE__, __LINE__, STRINGIFY(a)); \
-               _dummy_abort(); \
-       } \
-} while (0)
-#  endif
-#else
-#  define BKE_assert(a) (void)0
-#endif
-
-
 /* these values need to be hardcoded in structs, dna does not recognize defines */
 /* also defined in DNA_space_types.h */
 #ifndef FILE_MAXDIR
@@ -97,94 +41,6 @@ do { \
 #define FILE_MAX                       240
 #endif
 
-#define ELEM(a, b, c)           ( (a)==(b) || (a)==(c) )
-#define ELEM3(a, b, c, d)       ( ELEM(a, b, c) || (a)==(d) )
-#define ELEM4(a, b, c, d, e)    ( ELEM(a, b, c) || ELEM(a, d, e) )
-#define ELEM5(a, b, c, d, e, f) ( ELEM(a, b, c) || ELEM3(a, d, e, f) )
-#define ELEM6(a, b, c, d, e, f, g)      ( ELEM(a, b, c) || ELEM4(a, d, e, f, g) )
-#define ELEM7(a, b, c, d, e, f, g, h)   ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) )
-#define ELEM8(a, b, c, d, e, f, g, h, i)        ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) )
-#define ELEM9(a, b, c, d, e, f, g, h, i, j)        ( ELEM4(a, b, c, d, e) || ELEM5(a, f, g, h, i, j) )
-#define ELEM10(a, b, c, d, e, f, g, h, i, j, k)        ( ELEM4(a, b, c, d, e) || ELEM6(a, f, g, h, i, j, k) )
-#define ELEM11(a, b, c, d, e, f, g, h, i, j, k, l)        ( ELEM4(a, b, c, d, e) || ELEM7(a, f, g, h, i, j, k, l) )
-
-/* shift around elements */
-#define SHIFT3(type, a, b, c) { type tmp; tmp = a; a = c; c = b; b = tmp; }
-#define SHIFT4(type, a, b, c, d) { type tmp; tmp = a; a = d; d = c; c = b; b = tmp; }
-
-/* min/max */
-#define MIN2(x,y)               ( (x)<(y) ? (x) : (y) )
-#define MIN3(x,y,z)             MIN2( MIN2((x),(y)) , (z) )
-#define MIN4(x,y,z,a)           MIN2( MIN2((x),(y)) , MIN2((z),(a)) )
-
-#define MAX2(x,y)               ( (x)>(y) ? (x) : (y) )
-#define MAX3(x,y,z)             MAX2( MAX2((x),(y)) , (z) )
-#define MAX4(x,y,z,a)           MAX2( MAX2((x),(y)) , MAX2((z),(a)) )
-
-#define INIT_MINMAX(min, max) { (min)[0]= (min)[1]= (min)[2]= 1.0e30f; (max)[0]= (max)[1]= (max)[2]= -1.0e30f; }
-
-#define INIT_MINMAX2(min, max) { (min)[0]= (min)[1]= 1.0e30f; (max)[0]= (max)[1]= -1.0e30f; }
-
-#define DO_MIN(vec, min) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0];      \
-                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1];   \
-                                                         if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; } \
-
-#define DO_MAX(vec, max) { if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0];         \
-                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1];   \
-                                                         if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \
-
-#define DO_MINMAX(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
-                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
-                                                         if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
-                                                         if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
-                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
-                                                         if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \
-
-#define DO_MINMAX2(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
-                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
-                                                         if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
-                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; }
-
-/* some math and copy defines */
-
-#ifndef SWAP
-#define SWAP(type, a, b)        { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
-#endif
-
-#define ABS(a)                                 ( (a)<0 ? (-(a)) : (a) )
-
-#define AVG2(x, y)             ( 0.5 * ((x) + (y)) )
-
-#define FTOCHAR(val) ((val)<=0.0f)? 0 : (((val)>(1.0f-0.5f/255.0f))? 255 : (char)((255.0f*(val))+0.5f))
-#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
-
-#define VECCOPY(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);}
-#define VECCOPY2D(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1);}
-#define QUATCOPY(v1,v2)         {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);}
-#define LONGCOPY(a, b, c)      {int lcpc=c, *lcpa=(int *)a, *lcpb=(int *)b; while(lcpc-->0) *(lcpa++)= *(lcpb++);}
-
-
-#define VECADD(v1,v2,v3)       {*(v1)= *(v2) + *(v3); *(v1+1)= *(v2+1) + *(v3+1); *(v1+2)= *(v2+2) + *(v3+2);}
-#define VECSUB(v1,v2,v3)       {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1); *(v1+2)= *(v2+2) - *(v3+2);}
-#define VECSUB2D(v1,v2,v3)     {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1);}
-#define VECADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac);}
-#define VECSUBFAC(v1,v2,v3,fac) {*(v1)= *(v2) - *(v3)*(fac); *(v1+1)= *(v2+1) - *(v3+1)*(fac); *(v1+2)= *(v2+2) - *(v3+2)*(fac);}
-#define QUATADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac); *(v1+3)= *(v2+3) + *(v3+3)*(fac);}
-
-#define INPR(v1, v2)           ( (v1)[0]*(v2)[0] + (v1)[1]*(v2)[1] + (v1)[2]*(v2)[2] )
-
-
-/* some misc stuff.... */
-#define CLAMP(a, b, c)         if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
-#define CLAMPIS(a, b, c) ((a)<(b) ? (b) : (a)>(c) ? (c) : (a))
-#define CLAMPTEST(a, b, c)     if((b)<(c)) {CLAMP(a, b, c);} else {CLAMP(a, c, b);}
-
-#define IS_EQ(a,b) ((fabs((double)(a)-(b)) >= (double) FLT_EPSILON) ? 0 : 1)
-
-#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0)))
-#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0))
-#define IN_RANGE_INCL(a, b, c) ((b < c)? ((b<=a && a<=c)? 1:0) : ((c<=a && a<=b)? 1:0))
-
 /* this weirdo pops up in two places ... */
 #if !defined(WIN32)
 #ifndef O_BINARY
@@ -203,8 +59,6 @@ do { \
 
 #define ID_NEW(a)              if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
 
-#define BLEN MAKE_ID('B','L','E','N')
-
 #define DATA MAKE_ID('D','A','T','A')
 #define GLOB MAKE_ID('G','L','O','B')
 #define IMAG MAKE_ID('I','M','A','G')
@@ -216,28 +70,6 @@ do { \
 
 #define ENDB MAKE_ID('E','N','D','B')
 
-
-/* This one rotates the bytes in an int64, int (32) and short (16) */
-#define SWITCH_INT64(a) { \
-       char s_i, *p_i; \
-       p_i= (char *)&(a); \
-       s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
-       s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
-       s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
-       s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
-
-#define SWITCH_INT(a) { \
-       char s_i, *p_i; \
-       p_i= (char *)&(a); \
-       s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
-       s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
-
-#define SWITCH_SHORT(a)        { \
-       char s_i, *p_i; \
-       p_i= (char *)&(a); \
-       s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
-
-
 /* Bit operations */
 #define BTST(a,b)      ( ( (a) & 1<<(b) )!=0 )   
 #define BNTST(a,b)     ( ( (a) & 1<<(b) )==0 )
@@ -253,70 +85,6 @@ do { \
 #endif
 #define GS(a)  (*((short *)(a)))
 
-/* Warning-free macros for storing ints in pointers. Use these _only_
- * for storing an int in a pointer, not a pointer in an int (64bit)! */
-#define SET_INT_IN_POINTER(i) ((void*)(intptr_t)(i))
-#define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i))
-
-/*little array macro library.  example of usage:
-
-int *arr = NULL;
-V_DECLARE(arr);
-int i;
-
-for (i=0; i<10; i++) {
-       V_GROW(arr);
-       arr[i] = something;
-}
-V_FREE(arr);
-
-arrays are buffered, using double-buffering (so on each reallocation,
-the array size is doubled).  supposedly this should give good Big Oh
-behaviour, though it may not be the best in practice.
-*/
-
-#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp
-
-/*in the future, I plan on having V_DECLARE allocate stack memory it'll
-  use at first, and switch over to heap when it needs more.  that'll mess
-  up cases where you'd want to use this API to build a dynamic list for
-  non-local use, so all such cases should use this macro.*/
-#define V_DYNDECLARE(vec) V_DECLARE(vec)
-
-/*this returns the entire size of the array, including any buffering.*/
-#define V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec)))
-
-/*this returns the logical size of the array, not including buffering.*/
-#define V_COUNT(vec) _##vec##_count
-
-/*grow the array by one.  zeroes the new elements.*/
-#define V_GROW(vec) \
-       V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \
-       ((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\
-       (void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\
-       (void)(vec && (MEM_freeN(vec),1)),\
-       (vec = _##vec##_tmp),\
-       _##vec##_count++)
-
-#define V_FREE(vec) if (vec) MEM_freeN(vec);
-
-/*resets the logical size of an array to zero, but doesn't
-  free the memory.*/
-#define V_RESET(vec) _##vec##_count=0
-
-/*set the count of the array*/
-#define V_SETCOUNT(vec, count) _##vec##_count = (count)
-
-/*little macro so inline keyword works*/
-#if defined(_MSC_VER)
-#define BM_INLINE static __forceinline
-#elif defined(__GNUC__)
-#define BM_INLINE static inline __attribute((always_inline))
-#else
-/* #warning "MSC/GNUC defines not found, inline non-functional" */
-#define BM_INLINE static 
-#endif
-
 #define BMEMSET(mem, val, size) {unsigned int _i; char *_c = (char*) mem; for (_i=0; _i<size; _i++) *_c++ = val;}
 
-#endif
+#endif // BKE_UTILDEFINES_H
index 4df5183..672ef0b 100644 (file)
@@ -144,6 +144,7 @@ set(SRC
        BKE_anim.h
        BKE_animsys.h
        BKE_armature.h
+       BKE_array_mallocn.h
        BKE_blender.h
        BKE_bmesh.h
        BKE_bmeshCustomData.h
index 341eb38..e80d482 100644 (file)
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_mesh.h"
 #include "BKE_cdderivedmesh.h"
 
-#include "BLI_edgehash.h"
 //XXX #include "BIF_editmesh.h"
 //XXX #include "editmesh.h"
 #include "bmesh_private.h"
index 036cd4a..cd94299 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #include "MEM_guardedalloc.h"
-
+#include "BLI_utildefines.h"
 
 #include "bmesh_private.h"
 
index de3eb94..9463d22 100644 (file)
@@ -33,8 +33,9 @@
  */
 
 #include <limits.h>
-#include "MEM_guardedalloc.h"
 
+#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
 #include "BKE_bmesh.h"
 /**
  *     MISC utility functions.
index 444bc10..0c8352a 100644 (file)
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 
-#include "BKE_bmesh.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_bmesh.h"
 
 /*split this all into a seperate bevel.c file in src*/
 
index 3d87b77..3b8da39 100644 (file)
@@ -43,6 +43,7 @@
 #include "BLI_math.h"
 #include "BLI_memarena.h"
 #include "BLI_pbvh.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_displist.h"
index fdd51dd..bd36e1b 100644 (file)
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
+
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_anim.h"
 
 #include "BIK_api.h"
 
-#include "BLI_blenlib.h"
-#include "BLI_ghash.h"
-#include "BLI_math.h"
-
 #include "RNA_access.h"
 
 /* *********************** NOTE ON POSE AND ACTION **********************
index c372855..8cac386 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_editVert.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index abe5b50..e46c117 100644 (file)
@@ -36,8 +36,8 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
-#include "BKE_library.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_material_types.h"
@@ -50,6 +50,7 @@
 #include "BKE_nla.h"
 #include "BKE_global.h"
 #include "BKE_main.h"
+#include "BKE_library.h"
 #include "BKE_utildefines.h"
 
 #include "RNA_access.h"
index 6b21e45..0367d85 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index b218632..7d75912 100644 (file)
@@ -58,6 +58,7 @@
 #include "BLI_bpath.h"
 #include "BLI_dynstr.h"
 #include "BLI_path_util.h"
+#include "BLI_utildefines.h"
 
 #include "IMB_imbuf.h"
 
index 1bde063..85ee376 100644 (file)
@@ -41,6 +41,8 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_kdtree.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_collision.h"
 #include "BKE_effect.h"
 #include "BKE_boids.h"
index 649b3e3..a78d2ec 100644 (file)
@@ -45,6 +45,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_brush.h"
 #include "BKE_colortools.h"
index 882295b..0d3825f 100644 (file)
 
 #include "DNA_meshdata_types.h"
 
+#include "BLI_editVert.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_DerivedMesh.h"
 #include "BKE_utildefines.h"
-#include "BLI_editVert.h"
 
 #include "BLI_math.h"
 #include "MEM_guardedalloc.h"
index efdfdbc..956972e 100644 (file)
 #include <string.h>
 #include "BIF_gl.h"
 
-#include "BKE_cdderivedmesh.h"
-#include "BKE_global.h"
-#include "BKE_mesh.h"
-#include "BKE_paint.h"
-#include "BKE_utildefines.h"
-
 #include "BLI_blenlib.h"
 #include "BLI_edgehash.h"
 #include "BLI_editVert.h"
 #include "BLI_math.h"
 #include "BLI_pbvh.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_global.h"
+#include "BKE_mesh.h"
+#include "BKE_paint.h"
+#include "BKE_utildefines.h"
 
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
index b283120..4b14e64 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_cloth.h"
index b2d5871..8f02891 100644 (file)
@@ -42,6 +42,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_DerivedMesh.h"
 #include "BKE_global.h"
index 1b3d100..282a055 100644 (file)
 #include "DNA_color_types.h"
 #include "DNA_curve_types.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_colortools.h"
 #include "BKE_curve.h"
 #include "BKE_fcurve.h"
 #include "BKE_utildefines.h"
 
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
-
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 
index b6e68a7..ad6b3b8 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_listbase.h"
 #include "BLI_math.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_armature_types.h"
 #include "DNA_constraint_types.h"
index 6dd3eb4..b555076 100644 (file)
 #include <stdlib.h>  
 
 #include "MEM_guardedalloc.h"
+
 #include "BLI_blenlib.h"  
 #include "BLI_math.h"  
+#include "BLI_utildefines.h"
 
 #include "DNA_curve_types.h"  
 #include "DNA_material_types.h"  
index f7606a3..134b0e1 100644 (file)
@@ -46,6 +46,7 @@
 #include "BLI_linklist.h"
 #include "BLI_math.h"
 #include "BLI_mempool.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_customdata.h"
 #include "BKE_customdata_file.h"
index 5954ac1..ebc2134 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "BLI_fileops.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_customdata_file.h"
 #include "BKE_global.h"
index 5fdb8f0..61865f5 100644 (file)
 #include <string.h>
 #include <math.h>
 
+#include "MEM_guardedalloc.h"
+
 #include "BLI_winstuff.h"
+#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_camera_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_windowmanager_types.h"
 
-#include "MEM_guardedalloc.h"
-
-#include "BLI_ghash.h"
-
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_effect.h"
@@ -61,6 +61,7 @@
 #include "BKE_pointcache.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
+#include "BKE_utildefines.h"
 
 #include "depsgraph_private.h"
  
index 8c32733..53e33ee 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "MEM_guardedalloc.h"
 
-
 #include "DNA_curve_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_scene_types.h"
@@ -46,6 +45,7 @@
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_scanfill.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_global.h"
 #include "BKE_displist.h"
index 51f2203..aeec2a5 100644 (file)
@@ -59,6 +59,7 @@
 #include "BLI_listbase.h"
 #include "BLI_noise.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "PIL_time.h"
 
index d19226b..612ea84 100644 (file)
 #include "DNA_camera_types.h"
 #include "DNA_scene_types.h"
 
-#include "BKE_utildefines.h"
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_storage.h"
+#include "BLI_utildefines.h"
 
+#include "BKE_utildefines.h"
 #include "BKE_blender.h"
 #include "BKE_global.h"
 #include "BKE_main.h"
index 4a596b0..16d332c 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_fcurve.h"
 #include "BKE_animsys.h"
index ef89d39..c4db31d 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_customdata.h"
index 0376d75..40636fe 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h" /* windows needs for M_PI */
+#include "BLI_utildefines.h"
 
 #include "BKE_fcurve.h"
 #include "BKE_idprop.h"
index ec63975..9a9d67a 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_vfontdata.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_packedFile_types.h"
 #include "DNA_curve_types.h"
@@ -49,9 +50,7 @@
 #include "DNA_object_types.h"
 
 #include "BKE_utildefines.h"
-
 #include "BKE_packedFile.h"
-
 #include "BKE_library.h"
 #include "BKE_font.h"
 #include "BKE_global.h"
index 80f2627..4d02697 100644 (file)
@@ -33,8 +33,8 @@
 
 #include "MEM_guardedalloc.h"
 
-
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_gpencil_types.h"
 
index e125f3d..3b82114 100644 (file)
@@ -41,6 +41,7 @@
 #include "DNA_particle_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_global.h"
index 30e4318..1df272f 100644 (file)
@@ -40,6 +40,7 @@
 #include "DNA_world_types.h"
 #include "DNA_brush_types.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
 #include "BKE_icons.h"
index 70bfc96..301588d 100644 (file)
@@ -60,6 +60,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_bmfont.h"
 #include "BKE_global.h"
index e19f36a..b810e02 100644 (file)
@@ -37,6 +37,7 @@
 #include "BLI_threads.h"
 #include "BLI_math.h"
 #include "BLI_linklist.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cloth.h"
 #include "BKE_collision.h"
index a040c27..cc89068 100644 (file)
@@ -59,6 +59,7 @@
 #include "BLI_math.h" /* windows needs for M_PI */
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index 5a46d73..a495894 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
 #include "BLI_math_vector.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_key_types.h"
index 891d42c..15761dc 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
index 08adfdc..6af7df6 100644 (file)
@@ -67,9 +67,9 @@
 #include "DNA_world_types.h"
 #include "DNA_gpencil_types.h"
 
-
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_animsys.h"
index c8fb921..887b1fe 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "BLI_math.h"          
 #include "BLI_listbase.h"              
+#include "BLI_utildefines.h"
 
 #include "BKE_animsys.h"
 #include "BKE_displist.h"
index 8658d7e..bd1c009 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index 03fab07..15ececd 100644 (file)
 #include "DNA_meshdata_types.h"
 #include "DNA_ipo_types.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_editVert.h"
+#include "BLI_math.h"
+#include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_animsys.h"
 #include "BKE_main.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_object.h"
 #include "BKE_utildefines.h"
 
-#include "BLI_blenlib.h"
-#include "BLI_editVert.h"
-#include "BLI_math.h"
-#include "BLI_edgehash.h"
-
-
 EditMesh *BKE_mesh_get_editmesh(Mesh *me)
 {
        return me->edit_mesh;
index f8fdc9e..cc3d6a9 100644 (file)
 #include <math.h>
 #include <float.h>
 
+#include "MEM_guardedalloc.h"
+
 #include "DNA_armature_types.h"
 #include "DNA_object_types.h"
 #include "DNA_meshdata_types.h"
 
-#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_bmesh.h"
 #include "BKE_cloth.h"
index a3c13b3..79de12e 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_math.h"
 #include "BLI_pbvh.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_mesh.h"
index 5996bdc..fc7950e 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
 #include "DNA_anim_types.h"
index a2b6163..e564a32 100644 (file)
@@ -57,6 +57,7 @@
 #include "BLI_editVert.h"
 #include "BLI_math.h"
 #include "BLI_pbvh.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index c278bf3..12ebaf7 100644 (file)
@@ -47,6 +47,7 @@
 #include "DNA_packedFile_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_global.h"
index 116ed3c..945131b 100644 (file)
@@ -31,6 +31,8 @@
 #include "DNA_scene_types.h"
 #include "DNA_brush_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 #include "BKE_brush.h"
 #include "BKE_library.h"
index d3a0cd5..27a19ec 100644 (file)
 #include "DNA_scene_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_kdtree.h"
 #include "BLI_rand.h"
 #include "BLI_threads.h"
-#include "BLI_math.h"
 
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
@@ -2477,7 +2478,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
        float orco[3], ornor[3], hairmat[4][4], t, dvec[3], off1[4][3], off2[4][3];
        float length, max_length = 1.0f, cur_length = 0.0f;
        float eff_length, eff_vec[3], weight[4];
-       int k, cpa_num, maxw=0;
+       int k, cpa_num;
        short cpa_from;
 
        if(!pcache)
@@ -2749,7 +2750,6 @@ static void *exec_child_path_cache(void *data)
 
 void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupdate)
 {
-       ParticleSettings *part = sim->psys->part;
        ParticleThread *pthreads;
        ParticleThreadContext *ctx;
        ParticleCacheKey **cache;
index 207a9b8..646f808 100644 (file)
@@ -63,6 +63,7 @@
 #include "BLI_listbase.h"
 #include "BLI_threads.h"
 #include "BLI_storage.h" /* For _LARGEFILE64_SOURCE;  zlib needs this on some systems */
+#include "BLI_utildefines.h"
 
 #include "BKE_main.h"
 #include "BKE_animsys.h"
@@ -3641,7 +3642,6 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
 static int emit_particles(ParticleSimulationData *sim, PTCacheID *pid, float UNUSED(cfra))
 {
        ParticleSystem *psys = sim->psys;
-       ParticleSettings *part = psys->part;
        int oldtotpart = psys->totpart;
        int totpart = tot_particles(psys, pid);
 
index 9ad0024..6f52803 100644 (file)
@@ -44,6 +44,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "PIL_time.h"
 
index 5df912c..1dd2798 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_report.h"
 #include "BKE_global.h" /* G.background only */
index 9aeb9a8..ded32de 100644 (file)
@@ -39,6 +39,8 @@
 #include <io.h>
 #endif
 
+#include "MEM_guardedalloc.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_group_types.h"
 #include "DNA_object_types.h"
@@ -46,7 +48,9 @@
 #include "DNA_screen_types.h"
 #include "DNA_sequence_types.h"
 
-#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
@@ -69,9 +73,6 @@
 //XXX #include "BIF_previewrender.h"
 //XXX #include "BIF_editseq.h"
 
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-
 //XXX #include "nla.h"
 
 #ifdef WIN32
index b25c533..122e186 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "DNA_sequence_types.h"
 #include "BKE_sequencer.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_mempool.h"
 #include <pthread.h>
index c11b51b..2d31cf7 100644 (file)
@@ -35,6 +35,7 @@
 #include "PIL_dynlib.h"
 
 #include "BLI_math.h" /* windows needs for M_PI */
+#include "BLI_utildefines.h"
 
 #include "DNA_scene_types.h"
 #include "DNA_sequence_types.h"
index 03d4f3d..4a3c80a 100644 (file)
 #include "DNA_object_types.h"
 #include "DNA_sound_types.h"
 
+#include "BLI_math.h"
+#include "BLI_fileops.h"
+#include "BLI_listbase.h"
+#include "BLI_path_util.h"
+#include "BLI_string.h"
+#include "BLI_threads.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_animsys.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
 #include "RNA_access.h"
 #include "RE_pipeline.h"
 
-#include "BLI_math.h"
-#include "BLI_fileops.h"
-#include "BLI_listbase.h"
-#include "BLI_path_util.h"
-#include "BLI_string.h"
-#include "BLI_threads.h"
 #include <pthread.h>
 
 #include "IMB_imbuf.h"
index 16e4933..ee39e63 100644 (file)
 #include "DNA_mesh_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_editVert.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_shrinkwrap.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_lattice.h"
 #include "BKE_mesh.h"
 #include "BKE_subsurf.h"
 
-#include "BLI_editVert.h"
-#include "BLI_math.h"
-
-
 /* Util macros */
 #define OUT_OF_MEMORY()        ((void)printf("Shrinkwrap: Out of memory\n"))
 
index 7e39cdd..a81f49d 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_sketch.h"
 #include "BKE_utildefines.h"
index 9a0f278..41732ff 100644 (file)
@@ -48,6 +48,7 @@
 #include "BLI_edgehash.h"
 #include "BLI_kdtree.h"
 #include "BLI_kdopbvh.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_bvhutils.h"
 #include "BKE_cdderivedmesh.h"
index eb56331..6814f28 100644 (file)
@@ -63,6 +63,7 @@ variables on the UI for now
 #include "DNA_meshdata_types.h"
 
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_threads.h"
 
index 874fd0f..02b3d85 100644 (file)
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_edgehash.h"
+#include "BLI_math.h"
+#include "BLI_memarena.h"
+#include "BLI_pbvh.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_cdderivedmesh.h"
 #include "BKE_global.h"
 #include "BKE_mesh.h"
 #include "BKE_subsurf.h"
 #include "BKE_utildefines.h"
 
-#include "BLI_blenlib.h"
-#include "BLI_edgehash.h"
-#include "BLI_math.h"
-#include "BLI_memarena.h"
-#include "BLI_pbvh.h"
-
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
 
index 44a8141..8d73c0c 100644 (file)
@@ -36,6 +36,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_constraint_types.h"
 #include "DNA_controller_types.h"
index 595b859..11c0ce7 100644 (file)
 
 #include "PIL_dynlib.h"
 
-
-
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_kdopbvh.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_key_types.h"
 #include "DNA_object_types.h"
index de708f2..0bfc006 100644 (file)
@@ -38,6 +38,7 @@
 #include "DNA_scene_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_global.h"
 #include "BKE_main.h"
index dd63c26..625a916 100644 (file)
@@ -47,6 +47,8 @@
 
 #include "DNA_userdef_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 #include "BKE_global.h"
 #include "BKE_report.h"
index 96505da..46c0f76 100644 (file)
@@ -40,8 +40,6 @@ extern "C" {
 #include <stdlib.h>
 #include <string.h>
 
-#include "BKE_utildefines.h"
-
 #include "BLI_mempool.h"
 #include "BLI_blenlib.h"
 
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
new file mode 100644 (file)
index 0000000..c01a647
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+ * $Id: BKE_utildefines.h 34147 2011-01-07 09:47:05Z campbellbarton $
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+*/
+
+#ifndef BLI_UTILDEFINES_H
+#define BLI_UTILDEFINES_H
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+
+#define ELEM(a, b, c)           ( (a)==(b) || (a)==(c) )
+#define ELEM3(a, b, c, d)       ( ELEM(a, b, c) || (a)==(d) )
+#define ELEM4(a, b, c, d, e)    ( ELEM(a, b, c) || ELEM(a, d, e) )
+#define ELEM5(a, b, c, d, e, f) ( ELEM(a, b, c) || ELEM3(a, d, e, f) )
+#define ELEM6(a, b, c, d, e, f, g)      ( ELEM(a, b, c) || ELEM4(a, d, e, f, g) )
+#define ELEM7(a, b, c, d, e, f, g, h)   ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) )
+#define ELEM8(a, b, c, d, e, f, g, h, i)        ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) )
+#define ELEM9(a, b, c, d, e, f, g, h, i, j)        ( ELEM4(a, b, c, d, e) || ELEM5(a, f, g, h, i, j) )
+#define ELEM10(a, b, c, d, e, f, g, h, i, j, k)        ( ELEM4(a, b, c, d, e) || ELEM6(a, f, g, h, i, j, k) )
+#define ELEM11(a, b, c, d, e, f, g, h, i, j, k, l)        ( ELEM4(a, b, c, d, e) || ELEM7(a, f, g, h, i, j, k, l) )
+
+/* shift around elements */
+#define SHIFT3(type, a, b, c) { type tmp; tmp = a; a = c; c = b; b = tmp; }
+#define SHIFT4(type, a, b, c, d) { type tmp; tmp = a; a = d; d = c; c = b; b = tmp; }
+
+/* min/max */
+#define MIN2(x,y)               ( (x)<(y) ? (x) : (y) )
+#define MIN3(x,y,z)             MIN2( MIN2((x),(y)) , (z) )
+#define MIN4(x,y,z,a)           MIN2( MIN2((x),(y)) , MIN2((z),(a)) )
+
+#define MAX2(x,y)               ( (x)>(y) ? (x) : (y) )
+#define MAX3(x,y,z)             MAX2( MAX2((x),(y)) , (z) )
+#define MAX4(x,y,z,a)           MAX2( MAX2((x),(y)) , MAX2((z),(a)) )
+
+#define INIT_MINMAX(min, max) { (min)[0]= (min)[1]= (min)[2]= 1.0e30f; (max)[0]= (max)[1]= (max)[2]= -1.0e30f; }
+
+#define INIT_MINMAX2(min, max) { (min)[0]= (min)[1]= 1.0e30f; (max)[0]= (max)[1]= -1.0e30f; }
+
+#define DO_MIN(vec, min) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0];      \
+                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1];   \
+                                                         if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; } \
+
+#define DO_MAX(vec, max) { if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0];         \
+                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1];   \
+                                                         if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \
+
+#define DO_MINMAX(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
+                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
+                                                         if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \
+                                                         if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
+                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \
+                                                         if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \
+
+#define DO_MINMAX2(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \
+                                                         if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \
+                                                         if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \
+                                                         if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; }
+
+/* some math and copy defines */
+
+#ifndef SWAP
+#define SWAP(type, a, b)        { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
+#endif
+
+#define ABS(a)                                 ( (a)<0 ? (-(a)) : (a) )
+
+#define AVG2(x, y)             ( 0.5 * ((x) + (y)) )
+
+#define FTOCHAR(val) ((val)<=0.0f)? 0 : (((val)>(1.0f-0.5f/255.0f))? 255 : (char)((255.0f*(val))+0.5f))
+#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
+
+#define VECCOPY(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);}
+#define VECCOPY2D(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1);}
+#define QUATCOPY(v1,v2)         {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);}
+#define LONGCOPY(a, b, c)      {int lcpc=c, *lcpa=(int *)a, *lcpb=(int *)b; while(lcpc-->0) *(lcpa++)= *(lcpb++);}
+
+
+#define VECADD(v1,v2,v3)       {*(v1)= *(v2) + *(v3); *(v1+1)= *(v2+1) + *(v3+1); *(v1+2)= *(v2+2) + *(v3+2);}
+#define VECSUB(v1,v2,v3)       {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1); *(v1+2)= *(v2+2) - *(v3+2);}
+#define VECSUB2D(v1,v2,v3)     {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1);}
+#define VECADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac);}
+#define VECSUBFAC(v1,v2,v3,fac) {*(v1)= *(v2) - *(v3)*(fac); *(v1+1)= *(v2+1) - *(v3+1)*(fac); *(v1+2)= *(v2+2) - *(v3+2)*(fac);}
+#define QUATADDFAC(v1,v2,v3,fac) {*(v1)= *(v2) + *(v3)*(fac); *(v1+1)= *(v2+1) + *(v3+1)*(fac); *(v1+2)= *(v2+2) + *(v3+2)*(fac); *(v1+3)= *(v2+3) + *(v3+3)*(fac);}
+
+#define INPR(v1, v2)           ( (v1)[0]*(v2)[0] + (v1)[1]*(v2)[1] + (v1)[2]*(v2)[2] )
+
+/* some misc stuff.... */
+#define CLAMP(a, b, c)         if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
+#define CLAMPIS(a, b, c) ((a)<(b) ? (b) : (a)>(c) ? (c) : (a))
+#define CLAMPTEST(a, b, c)     if((b)<(c)) {CLAMP(a, b, c);} else {CLAMP(a, c, b);}
+
+#define IS_EQ(a,b) ((fabs((double)(a)-(b)) >= (double) FLT_EPSILON) ? 0 : 1)
+
+#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0)))
+#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0))
+#define IN_RANGE_INCL(a, b, c) ((b < c)? ((b<=a && a<=c)? 1:0) : ((c<=a && a<=b)? 1:0))
+
+
+/* This one rotates the bytes in an int64, int (32) and short (16) */
+#define SWITCH_INT64(a) { \
+       char s_i, *p_i; \
+       p_i= (char *)&(a); \
+       s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
+       s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
+       s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
+       s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
+
+               #define SWITCH_INT(a) { \
+       char s_i, *p_i; \
+       p_i= (char *)&(a); \
+       s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \
+       s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; }
+
+#define SWITCH_SHORT(a)        { \
+       char s_i, *p_i; \
+       p_i= (char *)&(a); \
+       s_i=p_i[0]; p_i[0]=p_i[1]; p_i[1]=s_i; }
+
+
+/* Warning-free macros for storing ints in pointers. Use these _only_
+ * for storing an int in a pointer, not a pointer in an int (64bit)! */
+#define SET_INT_IN_POINTER(i) ((void*)(intptr_t)(i))
+#define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i))
+
+/* Macro to convert a value to string in the preprocessor
+ * STRINGIFY_ARG: gives the defined name in the string
+ * STRINGIFY: gives the defined value. */
+#define STRINGIFY_ARG(x) #x
+#define STRINGIFY(x) STRINGIFY_ARG(x)
+
+/* useful for debugging */
+#define AT __FILE__ ":" STRINGIFY(__LINE__)
+
+/* UNUSED macro, for function argument */
+#ifdef __GNUC__
+#  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
+#else
+#  define UNUSED(x) UNUSED_ ## x
+#endif
+
+
+/*little macro so inline keyword works*/
+#if defined(_MSC_VER)
+#  define BM_INLINE static __forceinline
+#elif defined(__GNUC__)
+#  define BM_INLINE static inline __attribute((always_inline))
+#else
+/* #warning "MSC/GNUC defines not found, inline non-functional" */
+#  define BM_INLINE static
+#endif
+
+
+/* BKE_assert(), default only to print
+ * for aborting need to define WITH_ASSERT_ABORT
+ */
+#if !defined NDEBUG
+#  ifdef WITH_ASSERT_ABORT
+#    define _dummy_abort abort
+#  else
+#    define _dummy_abort() (void)0
+#  endif
+#  ifdef __GNUC__ /* just want to check if __func__ is available */
+#    define BKE_assert(a) \
+do { \
+       if (0 == (a)) { \
+               fprintf(stderr, \
+                       "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \
+                       __FILE__, __func__, __LINE__, STRINGIFY(a)); \
+               _dummy_abort(); \
+       } \
+} while (0)
+#  else
+#    define BKE_assert(a) \
+do { \
+       if (0 == (a)) { \
+               fprintf(stderr, \
+                       "BKE_assert failed: %s, %d at \'%s\'\n", \
+                       __FILE__, __LINE__, STRINGIFY(a)); \
+               _dummy_abort(); \
+       } \
+} while (0)
+#  endif
+#else
+#  define BKE_assert(a) (void)0
+#endif
+
+#endif // BLI_UTILDEFINES_H
index dcd66cc..35acbe5 100644 (file)
@@ -121,6 +121,7 @@ set(SRC
        BLI_storage_types.h
        BLI_string.h
        BLI_threads.h
+       BLI_utildefines.h
        BLI_uvproject.h
        BLI_vfontdata.h
        BLI_voxel.h
index b9df4b3..ff41f76 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 #include "BLI_args.h"
 #include "BLI_ghash.h"
 
index 729f530..a8ca828 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLO_sys_types.h" // for intptr_t support
 /***/
index 8c0be97..85520c9 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 
 #include "BLI_kdopbvh.h"
index f8421fa..39f4408 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_bpath.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_global.h"
 #include "BKE_image.h" /* so we can check the image's type */
index fc41839..94cd162 100644 (file)
@@ -46,7 +46,8 @@
 
 #include "BLI_vfontdata.h"
 #include "BLI_blenlib.h"
-#include "BLI_math.h"  
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 //XXX #include "BIF_toolbox.h"
 
index b324cb4..95beca0 100644 (file)
@@ -31,6 +31,7 @@
 #include "BLI_graph.h"
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index 2a420b7..98ba9b0 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "BLI_math.h"
 #include "BLI_memarena.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index 4cbd93c..0e46a9d 100644 (file)
@@ -43,6 +43,7 @@
 #include "BLI_string.h"
 #include "BLI_storage.h"
 #include "BLI_storage_types.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_blender.h"       // BLENDER_VERSION
index 9d126a4..8727fab 100644 (file)
@@ -27,6 +27,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_pbvh.h"
 
index 2b04a49..64f7d79 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include "BLI_voxel.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 
index 8b16e11..bc7f674 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_linklist.h"
 
@@ -49,6 +50,7 @@
 #include "BKE_library.h" // for free_main
 #include "BKE_idcode.h"
 #include "BKE_report.h"
+#include "BKE_utildefines.h"
 
 #include "BLO_readfile.h"
 #include "BLO_undofile.h"
index 38476b0..f3bd91d 100644 (file)
@@ -88,6 +88,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_anim.h"
 #include "BKE_action.h"
index f1e1d13..76bc257 100644 (file)
@@ -129,6 +129,7 @@ Any case: direct data is ALWAYS after the lib block
 #include "BLI_blenlib.h"
 #include "BLI_linklist.h"
 #include "BLI_bpath.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_action.h"
 #include "BKE_blender.h"
index f7ee0db..6dbffd5 100644 (file)
 
 #include "COLLADASaxFWLLoader.h"
 
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_string.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_main.h"
 #include "BKE_library.h"
 #include "BKE_texture.h"
 #include "BKE_utildefines.h"
 #include "BKE_image.h"
 
-#include "BLI_listbase.h"
-#include "BLI_math.h"
-#include "BLI_string.h"
-
 #include "DNA_camera_types.h"
 #include "DNA_lamp_types.h"
 
index 7322eb8..298fd91 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
 #include "DNA_world_types.h"
 
 #include "RNA_access.h"
+
 #include "BKE_curve.h"
 #include "BKE_key.h"
 #include "BKE_context.h"
+#include "BKE_utildefines.h" /* FILE_MAX */
 
 #include "UI_interface.h"
 #include "UI_interface_icons.h"
index d3dd808..319f804 100644 (file)
@@ -32,6 +32,8 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index 02d69fd..3401016 100644 (file)
@@ -38,6 +38,7 @@
 #include "DNA_sequence_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_animsys.h"
 #include "BKE_action.h"
index e3669dd..c61adcd 100644 (file)
@@ -69,6 +69,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
 #include "BKE_animsys.h"
@@ -81,6 +82,7 @@
 #include "BKE_material.h"
 #include "BKE_node.h"
 #include "BKE_sequencer.h"
+#include "BKE_utildefines.h"
 
 #include "ED_anim_api.h"
 
index 56161f4..34eb652 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 
index 4e77e15..80b026d 100644 (file)
@@ -38,6 +38,7 @@
 #include "RNA_enum_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_fcurve.h"
index ba5a53e..6b0fa30 100644 (file)
@@ -31,6 +31,8 @@
 
 #include "BLO_sys_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_scene_types.h"
 
index 902fa2f..c6c3337 100644 (file)
@@ -32,6 +32,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 
index 7642f63..b47fea5 100644 (file)
@@ -43,6 +43,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_fcurve.h"
index 834a102..6d0fe4c 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index d675bf6..4ba09a3 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index e8509a1..92fce2a 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index e31af91..726c898 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index 433abc7..51b00cc 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_scene_types.h"
index 6d677e2..935331e 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_ghash.h"
 
index 6abdd85..23b6af9 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_graph.h"
+#include "BLI_utildefines.h"
  
 #include "BKE_utildefines.h"
 
index 3e8c5c3..e9d0645 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_graph.h"
 #include "BLI_rand.h"
index 121a7d6..7a5c14b 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_graph.h"
 #include "BLI_ghash.h"
 
index 3d8e87d..8946291 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
 #include "BLI_memarena.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_DerivedMesh.h"
 #include "BKE_modifier.h"
index c516210..47e5f73 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index 6756691..7b1b3b6 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index 71b6be4..d5994e2 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index 21431bb..2ce6da9 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
index e896ccc..780dc88 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_edgehash.h"
 #include "BLI_ghash.h"
index 93cf02c..73db7b1 100644 (file)
@@ -48,6 +48,7 @@
 #include "BLI_math.h"
 #include "BLI_dynstr.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
 #include "BKE_context.h"
index 86a0eee..70a41ae 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_curve_types.h"
 #include "DNA_object_types.h"
index 29cdfff..8294363 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_gpencil_types.h"
 #include "DNA_scene_types.h"
index e0d257c..e766065 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_curve_types.h"
 #include "DNA_object_types.h"
index 11a15fd..d5cdb55 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_gpencil.h"
 #include "BKE_context.h"
index 5860bda..d74a907 100644 (file)
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_library.h"
 #include "BKE_unit.h"
+#include "BKE_utildefines.h" /* FILE_MAX */
 
 #include "BIF_gl.h"
 
index 6526137..e3321ed 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_math.h"
 #include "BLI_rect.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_colortools.h"
 #include "BKE_texture.h"
index 0733652..0dd135c 100644 (file)
@@ -38,6 +38,8 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 #include "PIL_time.h"
 
 #include "BKE_colortools.h"
index f8aa335..7d2f8e0 100644 (file)
@@ -43,6 +43,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_storage_types.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_brush_types.h"
 #include "DNA_object_types.h"
index 46dfd34..f39a020 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 1c2b0f9..95c52d2 100644 (file)
@@ -29,7 +29,6 @@
 #include <math.h>
 #include <string.h>
 
-
 #include "MEM_guardedalloc.h"
 
 #include "DNA_scene_types.h"
@@ -38,6 +37,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math_color.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 88eabf7..2b6c18c 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_userdef_types.h"
 
index 1da50e0..571a48a 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_dynstr.h"
 #include "BLI_ghash.h"
 
index 71b9616..69e866d 100644 (file)
@@ -32,6 +32,7 @@
 #include "DNA_userdef_types.h"
 
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_animsys.h"
 #include "BKE_colortools.h"
index 2f7e0be..1a31c71 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "DNA_object_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_context.h"
 #include "BKE_utildefines.h"
 
index 1ce045c..cf29794 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_listbase.h"
 #include "BLI_rect.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_curve.h"
index 6500ce0..a096d39 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "MEM_guardedalloc.h"
 
-
 #include "DNA_curve_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_screen_types.h"
@@ -44,7 +43,7 @@
 #include "DNA_windowmanager_types.h"
 
 #include "BLI_blenlib.h"
-
+#include "BLI_utildefines.h"
 
 #include "BKE_DerivedMesh.h"
 #include "BKE_global.h"
index 628a7cb..b5c89d6 100644 (file)
@@ -36,6 +36,7 @@
 #include "DNA_userdef_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index af63b9c..fa4b039 100644 (file)
@@ -32,6 +32,7 @@
 #include "DNA_userdef_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 
index 945313a..2a391f7 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_heap.h"
 #include "BLI_edgehash.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "IMB_imbuf_types.h"
 #include "IMB_imbuf.h"
index b749d60..d010ab1 100644 (file)
@@ -43,6 +43,7 @@
 #include "BLI_editVert.h"
 #include "BLI_dynstr.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_DerivedMesh.h"
 #include "BKE_context.h"
index b826c98..d9db1e9 100644 (file)
@@ -44,6 +44,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
index e50f652..46ece1a 100644 (file)
@@ -48,6 +48,7 @@ editmesh_lib: generic (no UI, no menus) operations/evaluators for editmesh data
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_customdata.h"
 #include "BKE_context.h"
index 2e17cb4..4ffd458 100644 (file)
@@ -46,12 +46,14 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_ghash.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "BKE_mesh.h"
+#include "BKE_array_mallocn.h"
 
 #include "PIL_time.h"
 
index 6be4234..54a3adc 100644 (file)
@@ -38,7 +38,6 @@ editmesh_mods.c, UI level access, no geometry changes
 
 #include "MEM_guardedalloc.h"
 
-
 #include "DNA_material_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
@@ -49,6 +48,7 @@ editmesh_mods.c, UI level access, no geometry changes
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_displist.h"
index b4e1e5a..1f6fa9b 100644 (file)
@@ -52,6 +52,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_rand.h"
 #include "BLI_ghash.h"
index af7285c..42df009 100644 (file)
@@ -46,6 +46,7 @@
 #include "BLI_dynstr.h" /*for WM_operator_pystring */
 #include "BLI_editVert.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_blender.h"
 #include "BKE_context.h"
@@ -54,6 +55,7 @@
 #include "BKE_modifier.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
+#include "BKE_array_mallocn.h"
 
 #include "BIF_gl.h"
 #include "BIF_glutil.h" /* for paint cursor */
index e8e7791..7dd5196 100644 (file)
 #include "DNA_scene_types.h"
 #include "DNA_view3d_types.h"
 
+#include "BLI_math.h"
+#include "BLI_editVert.h"
+#include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "BKE_displist.h"
 #include "BKE_mesh.h"
 #include "BKE_report.h"
 
-#include "BLI_math.h"
-#include "BLI_editVert.h"
-#include "BLI_edgehash.h"
-
 #include "RNA_access.h"
 #include "RNA_define.h"
 
index 6cf0fe0..3e7b760 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_ghash.h"
 #include "BLI_rand.h" /* for randome face sorting */
index 2ec2257..b73f738 100644 (file)
@@ -35,6 +35,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_meta_types.h"
 #include "DNA_object_types.h"
index 696d8bc..2656db0 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "BLI_math.h"
 #include "BLI_listbase.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
index 4af2e00..0b3e116 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_blender.h"
 #include "BKE_context.h"
index 5afba18..5076fec 100644 (file)
@@ -35,6 +35,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_constraint_types.h"
 #include "DNA_curve_types.h"
index 7afb298..1465c23 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_editVert.h"
 #include "BLI_ghash.h"
 #include "BLI_rand.h"
index 3b50499..c26affc 100644 (file)
@@ -29,8 +29,8 @@
 
 #include <string.h>
 
-
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_group_types.h"
 #include "DNA_object_types.h"
index e04ec43..92a53b8 100644 (file)
@@ -34,6 +34,7 @@
 #include "BLI_editVert.h"
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_curve_types.h"
 #include "DNA_lattice_types.h"
index 2eefad0..1f70dd8 100644 (file)
@@ -31,6 +31,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_curve_types.h"
 #include "DNA_key_types.h"
 #include "DNA_lattice_types.h"
@@ -46,8 +49,6 @@
 #include "BKE_lattice.h"
 #include "BKE_mesh.h"
 
-#include "BLI_listbase.h"
-
 #include "ED_screen.h"
 #include "ED_view3d.h"
 #include "ED_util.h"
index ef6f450..13b92ed 100644 (file)
@@ -43,6 +43,7 @@
 #include "BLI_string.h"
 #include "BLI_path_util.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_curve.h"
 #include "BKE_context.h"
index 221d121..2c0293b 100644 (file)
 #include <stdlib.h>
 #include <math.h>
 
-
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 
index 260f2bc..6ddd747 100644 (file)
@@ -47,6 +47,7 @@
 #include "BLI_editVert.h"
 #include "BLI_listbase.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_action.h"
 #include "BKE_animsys.h"
index 265fd84..3cb20eb 100644 (file)
@@ -42,6 +42,7 @@
 #include "BLI_listbase.h"
 #include "BLI_rand.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_group.h"
index 125e3c6..d8e54a7 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_curve_types.h"
 #include "DNA_key_types.h"
index 1792cab..60ea557 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_listbase.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_curve.h"
index 410ad93..53e74cc 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_customdata.h"
index 84d9c07..90e387a 100644 (file)
 #include "DNA_particle_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_boids.h"
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "BKE_main.h"
 #include "BKE_particle.h"
 
-#include "BLI_listbase.h"
 #include "RNA_access.h"
 #include "RNA_enum_types.h"
 #include "RNA_define.h"
index 238ace1..87ba66c 100644 (file)
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_dynstr.h"
+#include "BLI_kdtree.h"
+#include "BLI_rand.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_DerivedMesh.h"
 #include "BKE_depsgraph.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_pointcache.h"
 
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_dynstr.h"
-#include "BLI_kdtree.h"
-#include "BLI_rand.h"
-
-
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
 
index 6e0ac82..f86314a 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "BLI_math.h"
 #include "BLI_listbase.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
index da8e7e0..4e08dd4 100644 (file)
@@ -53,6 +53,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_animsys.h"
 #include "BKE_armature.h"
index e0fc0d7..7b53120 100644 (file)
@@ -31,6 +31,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_scene_types.h"
 
 #include "BKE_context.h"
 #include "BKE_scene.h"
 #include "BKE_utildefines.h" 
 
-#include "BLI_blenlib.h"
-
 #include "ED_particle.h"
 
-
 #include "WM_api.h"
 #include "WM_types.h"
 
index 96e4863..96994ab 100644 (file)
@@ -34,6 +34,7 @@
 #include "BLI_math.h"
 #include "BLI_threads.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_scene_types.h"
 
index df5576c..8a4a043 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
index 10f5ed2..d635a79 100644 (file)
@@ -45,6 +45,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_world_types.h"
 #include "DNA_camera_types.h"
index 24b521d..44fce48 100644 (file)
 #include "DNA_space_types.h"
 #include "DNA_world_types.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_editVert.h"
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_animsys.h"
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
-#include "BLI_editVert.h"
-#include "BLI_listbase.h"
-
 #include "GPU_material.h"
 
 #include "RNA_access.h"
index 328cfb1..5ea5fe0 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 6a9fc14..9b3a518 100644 (file)
@@ -32,7 +32,8 @@
 
 #include "DNA_vec_types.h"
 
-#include "BKE_utildefines.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_colortools.h"
 
 #include "BLI_math.h"
index 82f5f25..949ca1d 100644 (file)
@@ -33,6 +33,8 @@
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 #include "BKE_context.h"
 #include "BKE_object.h"
index 7c30d11..376e70f 100644 (file)
@@ -34,6 +34,7 @@
 #include "DNA_userdef_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 8a515f8..d891b02 100644 (file)
@@ -33,6 +33,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_armature_types.h"
 #include "DNA_lattice_types.h"
index d4235a0..1fbcd7e 100644 (file)
@@ -31,6 +31,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "IMB_imbuf_types.h"
 #include "IMB_imbuf.h"
index bbfa909..82c2f61 100644 (file)
 #include "BLI_dynstr.h"
 #include "BLI_linklist.h"
 #include "BLI_memarena.h"
-#include "PIL_time.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
+
+#include "PIL_time.h"
 
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
index 8b010b6..4bf8b72 100644 (file)
@@ -19,6 +19,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include "BLI_utildefines.h"
+
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
index d410cea..bbd5dae 100644 (file)
@@ -28,6 +28,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_brush_types.h"
@@ -41,9 +44,6 @@
 #include "WM_api.h"
 #include "WM_types.h"
 
-#include "BLI_math.h"
-
-
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
 
index 643e2cd..76cf24d 100644 (file)
 
 #include "MEM_guardedalloc.h"
 
-#include "DNA_userdef_types.h"
-
 #include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_userdef_types.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_context.h"
index 6e158fe..52cee23 100644 (file)
@@ -9,16 +9,16 @@
 #include "DNA_scene_types.h"
 #include "DNA_brush_types.h"
 
-#include "RNA_access.h"
-#include "RNA_define.h"
-
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_brush.h"
 #include "BKE_context.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_paint.h"
 
+#include "RNA_access.h"
+#include "RNA_define.h"
 
 #include "BIF_gl.h"
 
index 2f837c9..a62f01e 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
 #include "IMB_imbuf.h"
index 15d940c..482aa08 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_dynstr.h"
 #include "BLI_ghash.h"
 #include "BLI_pbvh.h"
index c991293..a8fee6e 100644 (file)
@@ -33,6 +33,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_threads.h"
 
index 80d0b0f..cd6c7e4 100644 (file)
@@ -32,6 +32,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_packedFile_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_space_types.h"
@@ -45,9 +48,6 @@
 #include "BKE_packedFile.h"
 #include "BKE_sound.h"
 
-#include "BLI_blenlib.h"
-
-
 #include "RNA_access.h"
 #include "RNA_define.h"
 #include "RNA_enum_types.h"
index cf515a2..6b0511d 100644 (file)
@@ -34,9 +34,9 @@
 #include <string.h>
 #include <float.h>
 
-
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 /* Types --------------------------------------------------------------- */
 
index 250ce37..7756075 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index 2d47424..2699087 100644 (file)
@@ -34,6 +34,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index a2d1167..0317439 100644 (file)
@@ -37,6 +37,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index 0d0d371..74f897c 100644 (file)
@@ -25,7 +25,9 @@
 #include <stdlib.h>
 
 #include "MEM_guardedalloc.h"
+
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_object_types.h"
 #include "DNA_windowmanager_types.h"
index 2d16bb6..75a3e7c 100644 (file)
@@ -30,6 +30,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_armature_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
@@ -38,8 +41,6 @@
 #include "DNA_world_types.h"
 #include "DNA_brush_types.h"
 
-#include "BLI_listbase.h"
-
 #include "BKE_context.h"
 #include "BKE_action.h"
 #include "BKE_material.h"
index 9071d9f..66c96ce 100644 (file)
@@ -29,9 +29,8 @@
 #include <string.h>
 #include <stdio.h>
 
-
-
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_context.h"
index 18e906e..b7c9bdd 100644 (file)
@@ -36,6 +36,7 @@
 #include "BLI_path_util.h"
 #include "BLI_storage.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index b09137f..b33231f 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index 0bb0d78..6c3666a 100644 (file)
 #include <sys/stat.h>
 #include <limits.h>
 
-
 #include "BLF_api.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_space_types.h"
 #include "DNA_screen_types.h"
 
-// #include "BKE_suggestions.h"
 #include "BKE_report.h"
 #include "BKE_utildefines.h"
 
index 405c965..a2c65bc 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_text.h" /* only for character utility funcs */
index 4fbe96c..c44d13a 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
@@ -42,7 +43,6 @@
 
 #include "BIF_gl.h"
 
-
 #include "RNA_access.h"
 
 #include "WM_api.h"
index ece2274..84090c8 100644 (file)
@@ -30,6 +30,7 @@
 #include <string.h>
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_dynstr.h"
 #include "BLI_storage_types.h"
 #ifdef WIN32
index 2e8db0d..17b5394 100644 (file)
@@ -33,6 +33,7 @@
 #include "BKE_main.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 #include "BLI_storage_types.h"
 #ifdef WIN32
 #include "BLI_winstuff.h"
index 4d9bd9b..f9c467a 100644 (file)
@@ -30,6 +30,7 @@
 #include "BKE_screen.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
index ce4b5bd..e16b2f6 100644 (file)
@@ -46,6 +46,7 @@
 #include "BLI_linklist.h"
 #include "BLI_storage_types.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #ifdef WIN32
 #include "BLI_winstuff.h"
index d55fcd7..9e29967 100644 (file)
@@ -62,6 +62,7 @@
 #include "BLI_path_util.h"
 #include "BLI_storage_types.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 12cca14..b8ffc73 100644 (file)
@@ -42,6 +42,7 @@
 #include "BLI_math.h"
 #include "BLI_rand.h"
 #include "BLI_storage_types.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index d34ef74..c937ebc 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
index 08e3870..271b6ae 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index c948cf6..154c955 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index 1939de6..4f529df 100644 (file)
 #include <stdlib.h>
 #include <math.h>
 
-
 #include "DNA_scene_types.h"
 #include "DNA_anim_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_sound.h"
index 05fcb3c..58a5f4b 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_anim_types.h"
 #include "DNA_object_types.h"
index d9d1f0a..37d58e5 100644 (file)
@@ -37,6 +37,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index ec3861a..7509903 100644 (file)
@@ -40,6 +40,7 @@
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_colortools.h"
 #include "BKE_context.h"
index 6e7af2c..e2d58b1 100644 (file)
@@ -39,7 +39,9 @@
 #include "DNA_brush_types.h"
 
 #include "PIL_time.h"
+
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
index 7725928..ceb7cda 100644 (file)
 #include "DNA_space_types.h"
 #include "DNA_windowmanager_types.h"
 
-
 #include "BLI_blenlib.h"
 #include "BLI_editVert.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 
-
 #include "ED_image.h"
 
 #include "WM_types.h"
 
-
 #include "UI_interface.h"
 
-
-
 #include "image_intern.h"
 
 /********************** toolbox operator *********************/
index 2b6958e..69bbfb7 100644 (file)
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 #include "DNA_object_types.h"
 #include "DNA_node_types.h"
 #include "DNA_packedFile_types.h"
@@ -48,9 +52,6 @@
 #include "BKE_report.h"
 #include "BKE_screen.h"
 
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 
index 5fa0a2d..d80801f 100644 (file)
@@ -28,6 +28,8 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include "BLI_utildefines.h"
+
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 
index db83623..c911adb 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_math.h"
 #include "BLI_editVert.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_colortools.h"
 #include "BKE_context.h"
index cc5e02c..ba3beff 100644 (file)
 #include <sys/stat.h>
 #include <limits.h>
 
-
 #include "BLF_api.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_space_types.h"
 #include "DNA_screen_types.h"
index 190814a..a20d3b9 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_bpath.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 787d708..46c4c8c 100644 (file)
@@ -28,9 +28,9 @@
 
 #include "MEM_guardedalloc.h"
 
-
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 
index b4185d1..cf3607e 100644 (file)
 #include "DNA_meta_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_anim.h"
 #include "BKE_displist.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_key.h"
 #include "BKE_mesh.h"
 #include "BKE_particle.h"
-#include "BKE_utildefines.h"
 
 #include "ED_armature.h"
 #include "ED_mesh.h"
index 8bfcad4..80040f5 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index a845273..251aa1c 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "BLF_api.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 
 #include "BIF_gl.h"
index 61cb301..2148dd2 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-
 #include <string.h>
 #include <stdio.h>
 
-
-
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
 
 #include "ED_screen.h"
 
-
 #include "RNA_access.h"
 #include "RNA_define.h"
 
index 5c498a5..cda2aea 100644 (file)
@@ -33,6 +33,7 @@
 #include "DNA_actuator_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_main.h"
index d5450a1..c7b60f5 100644 (file)
@@ -45,6 +45,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 9a3cac0..a945af5 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index baab6ab..1e84bda 100644 (file)
@@ -33,6 +33,8 @@
 
 #include "DNA_anim_types.h"
 
+#include "BLI_utildefines.h"
+
 #include "MEM_guardedalloc.h"
 
 #include "BLI_math.h"
index 72c869c..2a03f00 100644 (file)
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
-
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_animsys.h"
 #include "BKE_nla.h"
index eebca82..43a64f0 100644 (file)
 #include "DNA_space_types.h"
 #include "DNA_windowmanager_types.h"
 
-
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
 #include "BLI_dlrbTree.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_fcurve.h"
 #include "BKE_nla.h"
index e04ef99..d1417d6 100644 (file)
@@ -38,6 +38,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_action.h"
 #include "BKE_fcurve.h"
index 814b7c0..db9255a 100644 (file)
@@ -37,6 +37,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
index 5ee2b17..85b5231 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_node_types.h"
 #include "DNA_material_types.h"
index 954018b..69a6029 100644 (file)
 #include <math.h>
 #include <float.h>
 
+#include "MEM_guardedalloc.h"
+
 #include "DNA_node_types.h"
 #include "DNA_scene_types.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_node.h"
 #include "BKE_screen.h"
 
-
 #include "WM_api.h"
 #include "WM_types.h"
 
index 9019b18..5028d1c 100644 (file)
@@ -40,6 +40,7 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
index ead3ecc..6a6c7c6 100644 (file)
 #include "DNA_node_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_storage_types.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
 #include "BKE_texture.h"
 #include "BKE_report.h"
 
-
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_storage_types.h"
-
 #include "RE_pipeline.h"
 
 #include "IMB_imbuf_types.h"
index d215dc5..147a082 100644 (file)
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
 #include "BKE_node.h"
 #include "BKE_main.h"
 
-
 #include "WM_api.h"
 #include "WM_types.h"
 
index 6173973..748ba84 100644 (file)
@@ -34,6 +34,7 @@
 #include "BKE_context.h"
 
 #include "BLI_rect.h"
+#include "BLI_utildefines.h"
 
 #include "ED_screen.h"
 #include "ED_types.h"
index cdb04ec..4f2f204 100644 (file)
 #include "DNA_node_types.h"
 #include "DNA_scene_types.h"
 
+#include "BLI_rect.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_context.h"
 #include "BKE_node.h"
 
-#include "BLI_rect.h"
-
 #include "ED_screen.h"
 
 #include "RNA_access.h"
index b6bd8df..eb8c34f 100644 (file)
@@ -39,6 +39,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index a443539..354643b 100644 (file)
@@ -51,6 +51,7 @@
 #include "DNA_object_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #if defined WIN32 && !defined _LIBC
 # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
index 8bb49b8..74c2dd5 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"
index ba51fd9..3da5b48 100644 (file)
@@ -29,9 +29,8 @@
 #include <string.h>
 #include <stdio.h>
 
-
-
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 
index 1159139..3e6ebe6 100644 (file)
@@ -29,9 +29,9 @@
 #include <string.h>
 #include <stdio.h>
 
-
-
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
+
 #include "BKE_utildefines.h"
 #include "BKE_context.h"
 
 #include "ED_types.h"
 #include "ED_util.h"
 
-
-
 #include "UI_interface.h"
 #include "UI_resources.h"
 #include "UI_view2d.h"
 
 #include "script_intern.h"
 
-
 /* ************************ header area region *********************** */
 
 static void do_viewmenu(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event))
index 106c79f..d0631f5 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_rand.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_context.h"
 #include "BKE_screen.h"