move pbvh into BKE, it used many BKE bad level includes.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2012 15:59:25 +0000 (15:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2012 15:59:25 +0000 (15:59 +0000)
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.

37 files changed:
source/blender/blenkernel/BKE_pbvh.h [moved from source/blender/blenlib/BLI_pbvh.h with 100% similarity]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pbvh.c [moved from source/blender/blenlib/intern/pbvh.c with 99% similarity]
source/blender/blenkernel/intern/speaker.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/endian_switch.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/winstuff.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_mask.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_intern.h
source/blender/makesrna/intern/rna_sculpt_paint.c

index 57996630c286e5d287e7162b1d0beac2c95f8fda..b350cb718c83c7690f4a92933fc6afb849c1e6ee 100644 (file)
@@ -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
index 1f4cc9bc5c2bc3c676e6cfd9a8be03445a283f5d..6b8baf423183041283ad53bd00d2b26fde6a3dc5 100644 (file)
 #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"
index 5da4f05321a5648f69b5bb2cff857e75ce785f6c..83d1538ecbe51977a5e2bf976ac027e6a8cbaf03 100644 (file)
@@ -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"
index e8dfe027bd7b39dfcd76b16163a066912525ce6a..9155d67dc364c559eb81bb7bb227a2b3f2466187 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
index a46a3879dc8736602e533d1b40252083db68ef7f..42634e6e700fb47339c990fc7bdd55d0da9a6180 100644 (file)
@@ -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"
index 9f51dddb4fc88449bef596364fea65e511eda176..24b13b062f37e7827cf0a8c017e5abc50a2e2ac8 100644 (file)
@@ -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;
index 7bcb9b45b231b07ed44a259c2c7c5882df4f6a9e..405b1efb25daf8826e368ababbb0f6f3d5265d13 100644 (file)
@@ -46,7 +46,6 @@
 
 #include "RNA_access.h"
 
-#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_rand.h"
index 54bbe4bf4956f4ed8ab9fdb033e16798965ddbc9..34adeb4fefbac9afbb23728245fcc3bfa2ea5383 100644 (file)
 #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"
index c9f084a9297226d6cc3d4438d11698eb97692bc0..1d199cdf1e2ffa2dde594a399c431ed560cc7de5 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BKE_bpath.h"
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
index 73320c963158b5816f3b0231584ba1ff0b68fe37..bb8df834d0fab09d86f94a530828f4adcf485077 100644 (file)
@@ -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"
index f1f9667c3d05904d49f4dd1cfb75fe0bd45df88c..7f0475cf15548f809e6b1ee7fd3c689abbd8ef76 100644 (file)
@@ -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"
index 7f3e43c40ff8ab19c1cf10a6cfb22a0a1088b015..d98188d8a6f0acbbecf6cac6bcb9eb25a9a0f51b 100644 (file)
@@ -37,7 +37,6 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
-#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
index e4a938e7152ca9a866e07470e2a26c1f619c5f0f..a3dcda7069af771bc190de3e3ebdfaac5c9376ca 100644 (file)
@@ -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"
index fdd0c504dacbe8d020e85458cde270769861c736..5c882fd97d6f58e30eace7e6d438c3d817946359 100644 (file)
@@ -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"
index e12c3bc22605a67c45cac77d5d8e0bfcb08154ea..55cf2743bfa5ada1df3bc56b0bd691d36ef61e60 100644 (file)
@@ -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"
index c737dccc5d2901a47b81d9a8ee929c90f765068b..06d7cf55d49bf429644eb566ed2b8cff8617ad3f 100644 (file)
@@ -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"
index 85ad718613284d7fcbbd50a82a614a23230e7c7b..c705e226f45e1b7ed029de3e6727ab903f6ecd24 100644 (file)
 #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"
index 000545d936f5aed15a9b030eeed66445818764d4..b2851962b497cb94f55db943536b32c3a8c1e0cc 100644 (file)
@@ -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"
similarity index 99%
rename from source/blender/blenlib/intern/pbvh.c
rename to source/blender/blenkernel/intern/pbvh.c
index 6fa6d86589f365c6d962b19d03133ba1d3fe3bb9..3a4e8afca76443ac06e40f93684d53116ca78cb5 100644 (file)
@@ -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 */
index 4594445dec01c31799d827319fa8a26ee0caa611..f6599cc9648392640f314630b69b4358fe6c10ca 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
-#include "BKE_bpath.h"
 
 #include "BKE_animsys.h"
 #include "BKE_global.h"
index be8b572417e42f4f7467e5bc6bb8dddd23570054..fdd115617de8daffdee84988862e5c0f689cec45 100644 (file)
@@ -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"
index b78d23c543787fae713684c8b4c008ed4512099e..149842bc03831edea59e4e973e3d80657ac519f4 100644 (file)
@@ -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"
index ef5ad43503762ea8268b9b6067d67f9a5579d90e..ad101c41dc5ca960797e6fc71fabb6df9babf13d 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "BLI_listbase.h"
 #include "BLI_utildefines.h"
-#include "BKE_bpath.h"
 
 #include "BKE_animsys.h"
 #include "BKE_global.h"
index f1f70a79202fe03ba82c956a41e2dfbce835d97a..6644c58611fa426afb6e067ceb5cf6a28e944ccd 100644 (file)
@@ -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
index e53f622a5c4ca179bd9db466256b9fbbcc59b819..e42c43566fca9f203620e87a8458c12fd1b59841 100644 (file)
@@ -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']
index 8767a9ac14c50bfd77abda863d009a3fa076bd13..7d2fc38272de4483aa3e311f117696f236569aa6 100644 (file)
@@ -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[] = {
index b9b18136863345236675e6dd69282313dbb93170..e3ed88b6f8d37d5050a80baaf5e8853d2d8e8b73 100644 (file)
@@ -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"
 
index 883cdfde4269914a9352b3353f3e6000b1a4ca58..0f42fca9f1207cb1022ff0c920cb0b1d0006e803 100644 (file)
@@ -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". 
index 0a87316aa8129219744e71178363311898157ab0..353b73a6403452da1d5410d1b919bead718adc94 100644 (file)
@@ -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"
index 444daf8817c6bb6bf3bcc30fffa4ff48218dd036..7c1842b10f25735db1cab04ec2d51a0796e8a60b 100644 (file)
@@ -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"
 
index 68d9d74cca47ba5f513850370143a80a93d9f4a4..65fb490b218e15dfb8c854255c59fc4f91dd28a1 100644 (file)
@@ -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"
index bdd73cd6db34bfcdbba3c57f3dc4d697d81fa23a..36fe4715fc0f92bc750114bc2034fed1ebf3d6d0 100644 (file)
@@ -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"
index 697d7c63d1f41a0517f2c78963ef699e3801e02f..9fe7fc1d3ac327bb592eab8b08c717a21b409eab 100644 (file)
@@ -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"
index e2ed7776b7e249ed5e800e404c0bc5546b1e2aee..8325b47beab86aadc6271bf570414504b7f683d7 100644 (file)
@@ -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"
index acb906e4a91c7490e3fb9dab60e3923286a640c7..44068122b897d322686b548c9eaf0e9344bc51d4 100644 (file)
@@ -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;
index 84e76fae89664f83e91d4f93c4fbd699734fe789..f717c83075a98bbfd53107c519e302ffb4d36fb6 100644 (file)
@@ -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"