move pbvh into BKE, it used many BKE bad level includes.

now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
This commit is contained in:
Campbell Barton 2012-12-15 15:59:25 +00:00
parent 21a9fa9089
commit a6bee579e9
37 changed files with 26 additions and 49 deletions

@ -122,6 +122,7 @@ set(SRC
intern/paint.c
intern/particle.c
intern/particle_system.c
intern/pbvh.c
intern/pointcache.c
intern/property.c
intern/report.c
@ -149,7 +150,6 @@ set(SRC
intern/writeavi.c
intern/writeframeserver.c
BKE_DerivedMesh.h
BKE_action.h
BKE_anim.h
@ -161,6 +161,7 @@ set(SRC
BKE_bmfont_types.h
BKE_boids.h
BKE_booleanops_mesh.h
BKE_bpath.h
BKE_brush.h
BKE_bullet.h
BKE_bvhutils.h
@ -211,6 +212,7 @@ set(SRC
BKE_packedFile.h
BKE_paint.h
BKE_particle.h
BKE_pbvh.h
BKE_pointcache.h
BKE_property.h
BKE_report.h
@ -236,7 +238,6 @@ set(SRC
BKE_world.h
BKE_writeavi.h
BKE_writeframeserver.h
BKE_bpath.h
depsgraph_private.h
nla_private.h

@ -47,10 +47,10 @@
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_array.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_pbvh.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_displist.h"
#include "BKE_key.h"

@ -43,7 +43,6 @@
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"

@ -37,7 +37,6 @@
#include "MEM_guardedalloc.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"

@ -56,7 +56,6 @@
#include "DNA_sound_types.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
@ -65,6 +64,7 @@
#include "IMB_moviecache.h"
#include "BKE_blender.h"
#include "BKE_bpath.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"

@ -72,7 +72,6 @@
#include "DNA_smoke_types.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_utildefines.h"
#include "BKE_font.h"
@ -83,6 +82,8 @@
#include "BKE_sequencer.h"
#include "BKE_image.h" /* so we can check the image's type */
#include "BKE_bpath.h" /* own include */
static int checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), const char *path_src)
{
ReportList *reports = (ReportList *)userdata;

@ -46,7 +46,6 @@
#include "RNA_access.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_rand.h"

@ -40,12 +40,12 @@
#include "BLI_blenlib.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_pbvh.h"
#include "BLI_array.h"
#include "BLI_smallhash.h"
#include "BLI_utildefines.h"
#include "BLI_scanfill.h"
#include "BKE_pbvh.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"

@ -36,7 +36,6 @@
#include "MEM_guardedalloc.h"
#include "BKE_bpath.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"

@ -39,8 +39,8 @@
#include "BLI_blenlib.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"

@ -68,7 +68,6 @@
#include "BLI_blenlib.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "BKE_bmfont.h"
#include "BKE_colortools.h"

@ -37,7 +37,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"

@ -52,7 +52,6 @@
#include "BLI_math.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "BLI_string.h"
#include "BKE_animsys.h"

@ -50,8 +50,6 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "BKE_global.h"
#include "BKE_main.h"

@ -46,7 +46,6 @@
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_scanfill.h"

@ -43,9 +43,9 @@
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_mesh.h"

@ -59,12 +59,11 @@
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BKE_bpath.h"
#include "BLI_math.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_pbvh.h"
#include "BKE_main.h"
#include "BKE_global.h"
#include "BKE_idprop.h"

@ -55,7 +55,6 @@
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_linklist.h"
#include "BKE_bpath.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"

@ -22,8 +22,6 @@
* \ingroup bli
*/
#include "DNA_meshdata_types.h"
#include "MEM_guardedalloc.h"
@ -32,8 +30,8 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_DerivedMesh.h"
#include "BKE_mesh.h" /* for BKE_mesh_calc_normals */

@ -35,7 +35,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "BKE_animsys.h"
#include "BKE_global.h"

@ -50,8 +50,8 @@
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"

@ -42,7 +42,6 @@
#include "BLI_math.h"
#include "BLI_kdopbvh.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"

@ -40,7 +40,6 @@
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_bpath.h"
#include "BKE_animsys.h"
#include "BKE_global.h"

@ -25,9 +25,7 @@
set(INC
.
../blenkernel
../blenloader
../gpu
# ../blenkernel # dont add this back!
../makesdna
../../../intern/ghost
../../../intern/guardedalloc
@ -77,7 +75,6 @@ set(SRC
intern/md5.c
intern/noise.c
intern/path_util.c
intern/pbvh.c
intern/quadric.c
intern/rand.c
intern/rct.c
@ -135,7 +132,6 @@ set(SRC
BLI_mempool.h
BLI_noise.h
BLI_path_util.h
BLI_pbvh.h
BLI_quadric.h
BLI_rand.h
BLI_rect.h

@ -4,8 +4,8 @@ Import ('env')
sources = env.Glob('intern/*.c')
cflags=''
incs = '. ../makesdna ../blenkernel #/intern/guardedalloc #/intern/ghost ../editors/include ../gpu ../blenloader'
incs += ' ../windowmanager ../bmesh #/extern/glew/include'
# don't add ../blenkernel back!
incs = '. ../makesdna #/intern/guardedalloc #/intern/ghost'
incs += ' ' + env['BF_FREETYPE_INC']
incs += ' ' + env['BF_ZLIB_INC']

@ -39,7 +39,7 @@
#include "BLI_mempool.h"
#include "BLI_ghash.h"
#include "BLO_sys_types.h" // for intptr_t support
#include "MEM_sys_types.h" /* for intptr_t support */
/***/
unsigned int hashsizes[] = {

@ -24,7 +24,7 @@
* \ingroup bli
*/
#include "BLO_sys_types.h"
#include "MEM_sys_types.h"
#include "BLI_utildefines.h"
#include "BLI_endian_switch.h"

@ -63,7 +63,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLO_sys_types.h" // for intptr_t support
#include "MEM_sys_types.h" // for intptr_t support
/* gzip the file in from and write it to "to".

@ -52,8 +52,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_font.h"
#include "DNA_vfont_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_curve_types.h"

@ -47,7 +47,7 @@
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h" /* BLENDER_VERSION */
#include "../blenkernel/BKE_blender.h" /* BLENDER_VERSION, bad level include (no function call) */
#include "GHOST_Path-api.h"

@ -41,7 +41,7 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BKE_global.h"
#include "../blenkernel/BKE_global.h" /* G.background, bad level include (no function calls) */
#define WIN32_SKIP_HKEY_PROTECTION // need to use HKEY
#include "BLI_winstuff.h"

@ -37,7 +37,6 @@
#include "BLI_bitmap.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "DNA_mesh_types.h"
@ -45,6 +44,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_context.h"
#include "BKE_DerivedMesh.h"

@ -38,8 +38,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
#include "BKE_context.h"
#include "BKE_DerivedMesh.h"

@ -40,7 +40,6 @@
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
#include "BLI_pbvh.h"
#include "BLI_threads.h"
#include "BLI_rand.h"
@ -51,6 +50,7 @@
#include "DNA_scene_types.h"
#include "DNA_brush_types.h"
#include "BKE_pbvh.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_cdderivedmesh.h"

@ -38,7 +38,7 @@
#include "DNA_key_types.h"
#include "BLI_bitmap.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
struct bContext;
struct Brush;

@ -59,8 +59,7 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = {
#include "BKE_pointcache.h"
#include "BKE_particle.h"
#include "BKE_depsgraph.h"
#include "BLI_pbvh.h"
#include "BKE_pbvh.h"
#include "ED_particle.h"