make bullet optional again
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 07:26:39 +0000 (07:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 07:26:39 +0000 (07:26 +0000)
30 files changed:
source/blender/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/rigidbody.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/physics/rigidbody_world.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_rigidbody.c
source/blender/modifiers/intern/MOD_boolean.c
source/creator/CMakeLists.txt
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_SoftBodyDeformer.cpp
source/gameengine/Converter/SConscript
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_BulletPhysicsController.h
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Bullet/SConscript

index db3132132dabe6633a0f9411bed96bffa771b542..36b05fd31f43bca2102ae99d62b90ebfea8d63d0 100644 (file)
@@ -106,7 +106,10 @@ add_subdirectory(nodes)
 add_subdirectory(modifiers)
 add_subdirectory(makesdna)
 add_subdirectory(makesrna)
-add_subdirectory(rigidbody)
+
+if(WITH_BULLET)
+       add_subdirectory(rigidbody)
+endif()
 
 if(WITH_COMPOSITOR)
        add_subdirectory(opencl)  # later on this may be used more generally
index 846ed8a9bb447e9a553c44b744e178a925c22a15..fefd4c89fbe330b5b16afad33a46b1590c95f3da 100644 (file)
@@ -37,7 +37,6 @@ set(INC
        ../modifiers
        ../nodes
        ../render/extern/include
-       ../rigidbody
        ../../../intern/guardedalloc
        ../../../intern/iksolver/extern
        ../../../intern/memutil
@@ -264,7 +263,10 @@ if(WITH_BULLET)
        list(APPEND INC_SYS
                ${BULLET_INCLUDE_DIRS}
        )
-       add_definitions(-DUSE_BULLET)
+       list(APPEND INC
+               ../rigidbody
+       )
+       add_definitions(-DWITH_BULLET)
 endif()
 
 #if(WITH_MOD_CLOTH_ELTOPO)
index b146235d63c5b0912e52eee1f3f446efe1b44418..e53e4724071e765344b40522dc3305fbd39e2f41 100644 (file)
@@ -111,7 +111,7 @@ if env['WITH_BF_QUICKTIME']:
     incs += ' ' + env['BF_QUICKTIME_INC']
 
 if env['WITH_BF_BULLET']:
-    defs.append('USE_BULLET')
+    defs.append('WITH_BULLET')
 
 if env['OURPLATFORM'] == 'darwin':
     if env['WITH_BF_OPENMP']:
index 60bf67e19e36eadbc238fe5320808f6b11ea8a49..061657c8f2d7ef51710a4abbb3f40dffb6948647 100644 (file)
@@ -59,7 +59,7 @@
 #include "BKE_modifier.h"
 
 #include "BKE_DerivedMesh.h"
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "Bullet-C-Api.h"
 #endif
 #include "BLI_kdopbvh.h"
@@ -385,7 +385,7 @@ static CollPair* cloth_collision(ModifierData *md1, ModifierData *md2,
        CollisionModifierData *collmd = (CollisionModifierData *) md2;
        /* Cloth *cloth = clmd->clothObject; */ /* UNUSED */
        MFace *face1=NULL, *face2 = NULL;
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        ClothVertex *verts1 = clmd->clothObject->verts;
 #endif
        double distance = 0;
@@ -458,7 +458,7 @@ static CollPair* cloth_collision(ModifierData *md1, ModifierData *md2,
                        }
                }
                
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                // calc distance + normal
                distance = plNearestPoints (
                        verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa, collpair->pb, collpair->vector );
index 1670389566e1b6bf4d0affc3201ef69f43e2f055..ef096adc7a7aa5db29db5f082747f94c6eb48ffa 100644 (file)
@@ -73,7 +73,9 @@
 
 #include "BIK_api.h"
 
-#include "RBI_api.h"
+#ifdef WITH_BULLET
+#  include "RBI_api.h"
+#endif
 
 /* both in intern */
 #ifdef WITH_SMOKE
@@ -883,10 +885,10 @@ static int  ptcache_rigidbody_write(int index, void *rb_v, void **data, int UNUS
                RigidBodyOb *rbo = ob->rigidbody_object;
                
                if (rbo->type == RBO_TYPE_ACTIVE) {
-                       
+#ifdef WITH_BULLET
                        RB_body_get_position(rbo->physics_object, rbo->pos);
                        RB_body_get_orientation(rbo->physics_object, rbo->orn);
-                       
+#endif
                        PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, rbo->pos);
                        PTCACHE_DATA_FROM(data, BPHYS_DATA_ROTATION, rbo->orn);
                }
index 4f154bce0716601dee3b2f35d6535b495df5ebbe..9feb6d43bcedd9830b5f3e0e25db67d305754866 100644 (file)
@@ -42,7 +42,9 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 
-#include "RBI_api.h"
+#ifdef WITH_BULLET
+#  include "RBI_api.h"
+#endif
 
 #include "DNA_anim_types.h"
 #include "DNA_group_types.h"
@@ -66,6 +68,8 @@
 
 #include "RNA_access.h"
 
+#ifdef WITH_BULLET
+
 /* ************************************** */
 /* Memory Management */
 
@@ -1210,3 +1214,36 @@ void BKE_rigidbody_do_simulation(Scene *scene, float ctime)
        }
 }
 /* ************************************** */
+
+#else  /* WITH_BULLET */
+
+/* stubs */
+#ifdef __GNUC__
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+void BKE_rigidbody_free_world(RigidBodyWorld *rbw) {}
+void BKE_rigidbody_free_object(Object *ob) {}
+void BKE_rigidbody_free_constraint(Object *ob) {}
+struct RigidBodyOb *BKE_rigidbody_copy_object(Object *ob) { return NULL; }
+struct RigidBodyCon *BKE_rigidbody_copy_constraint(Object *ob) { return NULL; }
+void BKE_rigidbody_validate_sim_shape(Object *ob, short rebuild) {}
+void BKE_rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, short rebuild) {}
+void BKE_rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, short rebuild) {}
+void BKE_rigidbody_validate_sim_world(Scene *scene, RigidBodyWorld *rbw, short rebuild) {}
+struct RigidBodyWorld *BKE_rigidbody_create_world(Scene *scene) { return NULL; }
+struct RigidBodyOb *BKE_rigidbody_create_object(Scene *scene, Object *ob, short type) { return NULL; }
+struct RigidBodyCon *BKE_rigidbody_create_constraint(Scene *scene, Object *ob, short type) { return NULL; }
+struct RigidBodyWorld *BKE_rigidbody_get_world(Scene *scene) { return NULL; }
+void BKE_rigidbody_remove_object(Scene *scene, Object *ob) {}
+void BKE_rigidbody_remove_constraint(Scene *scene, Object *ob) {}
+void BKE_rigidbody_sync_transforms(Scene *scene, Object *ob, float ctime) {}
+void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw) {}
+void BKE_rigidbody_do_simulation(Scene *scene, float ctime) {}
+
+#ifdef __GNUC__
+#  pragma GCC diagnostic pop
+#endif
+
+#endif  /* WITH_BULLET */
index 70a367256eddc44ec5159f6572be9db17d13d1f8..bdff02c15513f04932b408f6bbe65d965797fc83 100644 (file)
@@ -1606,7 +1606,7 @@ void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, const char *propname)
        RNAUpdateCb *cb;
        uiBlock *block;
        uiBut *but;
-       rctf rect;
+//     rctf rect;  /* UNUSED */
        int icon;
        
        if (!prop || RNA_property_type(prop) != PROP_ENUM)
@@ -1618,8 +1618,8 @@ void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, const char *propname)
        cb->ptr = *ptr;
        cb->prop = prop;
        
-       rect.xmin = 0; rect.xmax = 10.0f * UI_UNIT_X;
-       rect.ymin = 0; rect.ymax = 10.0f * UI_UNIT_X;
+//     rect.xmin = 0; rect.xmax = 10.0f * UI_UNIT_X;
+//     rect.ymin = 0; rect.ymax = 10.0f * UI_UNIT_X;
        
        block = uiLayoutAbsoluteBlock(layout);
 
index 7f3eaa892d0b35dccb7e9fd79aa5ff9723246858..435327319aa1f90fc780d6bd81186047d56a4a8a 100644 (file)
@@ -27,7 +27,6 @@ set(INC
        ../../makesdna
        ../../makesrna
        ../../windowmanager
-       ../../rigidbody
        ../../../../intern/elbeem/extern
        ../../../../intern/guardedalloc
 )
@@ -63,4 +62,11 @@ if(WITH_INTERNATIONAL)
        add_definitions(-DWITH_INTERNATIONAL)
 endif()
 
+if(WITH_BULLET)
+       list(APPEND INC
+               ../../rigidbody
+       )
+       add_definitions(-DWITH_BULLET)
+endif()
+
 blender_add_lib(bf_editor_physics "${SRC}" "${INC}" "${INC_SYS}")
index 068f8decef5936bad2d1d65ca5c7f3ca5cac7536..5ab8e7697c5bc91d6d720a8a2908c7730473f333 100644 (file)
@@ -40,7 +40,9 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 
-#include "RBI_api.h"
+#ifdef WITH_BULLET
+#  include "RBI_api.h"
+#endif
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
@@ -170,8 +172,9 @@ static int rigidbody_world_export_exec(bContext *C, wmOperator *op)
        }
 
        RNA_string_get(op->ptr, "filepath", path);
+#ifdef WITH_BULLET
        RB_dworld_export(rbw->physics_world, path);
-
+#endif
        return OPERATOR_FINISHED;
 }
 
index 83e7a19572d73c8e1cdb7a93145cf7703769700c..210857a4690260d1f4b20c4b38bd399dad623a54 100644 (file)
@@ -238,6 +238,13 @@ if(WITH_INTERNATIONAL)
        add_definitions(-DWITH_INTERNATIONAL)
 endif()
 
+if(WITH_BULLET)
+       list(APPEND INC
+               ../../rigidbody
+       )
+       add_definitions(-DWITH_BULLET)
+endif()
+
 # Build makesrna executable
 blender_include_dirs(
        .
@@ -254,7 +261,6 @@ blender_include_dirs(
        ../../windowmanager
        ../../editors/include
        ../../render/extern/include
-       ../../rigidbody
        ../../../../intern/audaspace/intern
        ../../../../intern/cycles/blender
        ../../../../intern/guardedalloc
index 2c8eafb4aac29579c094e4240514d7a0ad453e38..7f487a646ebf2b6ede0a827b913fef469af571a5 100644 (file)
@@ -73,7 +73,9 @@ EnumPropertyItem rigidbody_con_type_items[] = {
 
 #ifdef RNA_RUNTIME
 
-#include "RBI_api.h"
+#ifdef WITH_BULLET
+#  include "RBI_api.h"
+#endif
 
 #include "BKE_depsgraph.h"
 #include "BKE_rigidbody.h"
@@ -105,9 +107,12 @@ static void rna_RigidBodyWorld_num_solver_iterations_set(PointerRNA *ptr, int va
        RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
        
        rbw->num_solver_iterations = value;
-       
-       if (rbw->physics_world)
+
+#ifdef WITH_BULLET
+       if (rbw->physics_world) {
                RB_dworld_set_solver_iterations(rbw->physics_world, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, int value)
@@ -115,9 +120,12 @@ static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, int value)
        RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
        
        RB_FLAG_SET(rbw->flag, value, RBW_FLAG_USE_SPLIT_IMPULSE);
-       
-       if (rbw->physics_world)
+
+#ifdef WITH_BULLET
+       if (rbw->physics_world) {
                RB_dworld_set_split_impulse(rbw->physics_world, value);
+       }
+#endif
 }
 
 /* ******************************** */
@@ -152,9 +160,12 @@ static void rna_RigidBodyOb_type_set(PointerRNA *ptr, int value)
        rbo->type = value;
        rbo->flag |= RBO_FLAG_NEEDS_VALIDATE;
        
+#ifdef WITH_BULLET
        /* do physics sim updates */
-       if (rbo->physics_object)
+       if (rbo->physics_object) {
                RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, int value)
@@ -162,13 +173,15 @@ static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, int value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        RB_FLAG_SET(rbo->flag, !value, RBO_FLAG_DISABLED);
-       
+
+#ifdef WITH_BULLET
        /* update kinematic state if necessary - only needed for active bodies */
        if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
                RB_body_set_kinematic_state(rbo->physics_object, !value);
                rbo->flag |= RBO_FLAG_NEEDS_VALIDATE;
        }
+#endif
 }
 
 static void rna_RigidBodyOb_shape_set(PointerRNA *ptr, int value)
@@ -180,10 +193,13 @@ static void rna_RigidBodyOb_shape_set(PointerRNA *ptr, int value)
        
        /* force creation of new collision shape reflecting this */
        BKE_rigidbody_validate_sim_shape(ob, TRUE);
-       
+
+#ifdef WITH_BULLET
        /* now tell RB sim about it */
-       if (rbo->physics_object && rbo->physics_shape)
+       if (rbo->physics_object && rbo->physics_shape) {
                RB_body_set_collision_shape(rbo->physics_object, rbo->physics_shape);
+       }
+#endif
 }
 
 
@@ -192,10 +208,13 @@ static void rna_RigidBodyOb_mass_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->mass = value;
-       
+
+#ifdef WITH_BULLET
        /* only active bodies need mass update */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_friction_set(PointerRNA *ptr, float value)
@@ -203,9 +222,12 @@ static void rna_RigidBodyOb_friction_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->friction = value;
-       
-       if (rbo->physics_object)
+
+#ifdef WITH_BULLET
+       if (rbo->physics_object) {
                RB_body_set_friction(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_restitution_set(PointerRNA *ptr, float value)
@@ -213,9 +235,11 @@ static void rna_RigidBodyOb_restitution_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->restitution = value;
-       
-       if (rbo->physics_object)
+#ifdef WITH_BULLET
+       if (rbo->physics_object) {
                RB_body_set_restitution(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_collision_margin_set(PointerRNA *ptr, float value)
@@ -223,9 +247,12 @@ static void rna_RigidBodyOb_collision_margin_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->margin = value;
-       
-       if (rbo->physics_shape)
+
+#ifdef WITH_BULLET
+       if (rbo->physics_shape) {
                RB_shape_set_margin(rbo->physics_shape, RBO_GET_MARGIN(rbo));
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, int value)
@@ -233,13 +260,15 @@ static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, int value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        RB_FLAG_SET(rbo->flag, value, RBO_FLAG_KINEMATIC);
-       
+
+#ifdef WITH_BULLET
        /* update kinematic state if necessary */
        if (rbo->physics_object) {
                RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
                RB_body_set_kinematic_state(rbo->physics_object, value);
                rbo->flag |= RBO_FLAG_NEEDS_VALIDATE;
        }
+#endif
 }
 
 static void rna_RigidBodyOb_activation_state_set(PointerRNA *ptr, int value)
@@ -247,10 +276,13 @@ static void rna_RigidBodyOb_activation_state_set(PointerRNA *ptr, int value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        RB_FLAG_SET(rbo->flag, value, RBO_FLAG_USE_DEACTIVATION);
-       
+
+#ifdef WITH_BULLET
        /* update activation state if necessary - only active bodies can be deactivated */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_activation_state(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_linear_sleepThresh_set(PointerRNA *ptr, float value)
@@ -258,10 +290,13 @@ static void rna_RigidBodyOb_linear_sleepThresh_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->lin_sleep_thresh = value;
-       
+
+#ifdef WITH_BULLET
        /* only active bodies need sleep threshold update */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_linear_sleep_thresh(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_angular_sleepThresh_set(PointerRNA *ptr, float value)
@@ -269,10 +304,13 @@ static void rna_RigidBodyOb_angular_sleepThresh_set(PointerRNA *ptr, float value
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->ang_sleep_thresh = value;
-       
+
+#ifdef WITH_BULLET
        /* only active bodies need sleep threshold update */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_angular_sleep_thresh(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_linear_damping_set(PointerRNA *ptr, float value)
@@ -280,10 +318,13 @@ static void rna_RigidBodyOb_linear_damping_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->lin_damping = value;
-       
+
+#ifdef WITH_BULLET
        /* only active bodies need damping update */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_linear_damping(rbo->physics_object, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyOb_angular_damping_set(PointerRNA *ptr, float value)
@@ -291,10 +332,13 @@ static void rna_RigidBodyOb_angular_damping_set(PointerRNA *ptr, float value)
        RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
        
        rbo->ang_damping = value;
-       
+
+#ifdef WITH_BULLET
        /* only active bodies need damping update */
-       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE))
+       if ((rbo->physics_object) && (rbo->type == RBO_TYPE_ACTIVE)) {
                RB_body_set_angular_damping(rbo->physics_object, value);
+       }
+#endif
 }
 
 static char *rna_RigidBodyCon_path(PointerRNA *ptr)
@@ -317,8 +361,11 @@ static void rna_RigidBodyCon_enabled_set(PointerRNA *ptr, int value)
 
        RB_FLAG_SET(rbc->flag, value, RBC_FLAG_ENABLED);
 
-       if (rbc->physics_constraint)
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint) {
                RB_constraint_set_enabled(rbc->physics_constraint, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_disable_collisions_set(PointerRNA *ptr, int value)
@@ -336,13 +383,19 @@ static void rna_RigidBodyCon_use_breaking_set(PointerRNA *ptr, int value)
 
        if (value) {
                rbc->flag |= RBC_FLAG_USE_BREAKING;
-               if (rbc->physics_constraint)
+#ifdef WITH_BULLET
+               if (rbc->physics_constraint) {
                        RB_constraint_set_breaking_threshold(rbc->physics_constraint, rbc->breaking_threshold);
+               }
+#endif
        }
        else {
                rbc->flag &= ~RBC_FLAG_USE_BREAKING;
-               if (rbc->physics_constraint)
+#ifdef WITH_BULLET
+               if (rbc->physics_constraint) {
                        RB_constraint_set_breaking_threshold(rbc->physics_constraint, FLT_MAX);
+               }
+#endif
        }
 }
 
@@ -352,8 +405,11 @@ static void rna_RigidBodyCon_breaking_threshold_set(PointerRNA *ptr, float value
 
        rbc->breaking_threshold = value;
 
-       if (rbc->physics_constraint && (rbc->flag & RBC_FLAG_USE_BREAKING))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && (rbc->flag & RBC_FLAG_USE_BREAKING)) {
                RB_constraint_set_breaking_threshold(rbc->physics_constraint, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_override_solver_iterations_set(PointerRNA *ptr, int value)
@@ -362,13 +418,19 @@ static void rna_RigidBodyCon_override_solver_iterations_set(PointerRNA *ptr, int
 
        if (value) {
                rbc->flag |= RBC_FLAG_OVERRIDE_SOLVER_ITERATIONS;
-               if (rbc->physics_constraint)
+#ifdef WITH_BULLET
+               if (rbc->physics_constraint) {
                        RB_constraint_set_solver_iterations(rbc->physics_constraint, rbc->num_solver_iterations);
+               }
+#endif
        }
        else {
                rbc->flag &= ~RBC_FLAG_OVERRIDE_SOLVER_ITERATIONS;
-               if (rbc->physics_constraint)
+#ifdef WITH_BULLET
+               if (rbc->physics_constraint) {
                        RB_constraint_set_solver_iterations(rbc->physics_constraint, -1);
+               }
+#endif
        }
 }
 
@@ -378,8 +440,11 @@ static void rna_RigidBodyCon_num_solver_iterations_set(PointerRNA *ptr, int valu
 
        rbc->num_solver_iterations = value;
 
-       if (rbc->physics_constraint && (rbc->flag & RBC_FLAG_OVERRIDE_SOLVER_ITERATIONS))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && (rbc->flag & RBC_FLAG_OVERRIDE_SOLVER_ITERATIONS)) {
                RB_constraint_set_solver_iterations(rbc->physics_constraint, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_stiffness_x_set(PointerRNA *ptr, float value)
@@ -388,8 +453,11 @@ static void rna_RigidBodyCon_spring_stiffness_x_set(PointerRNA *ptr, float value
 
        rbc->spring_stiffness_x = value;
 
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_X))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_X)) {
                RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_stiffness_y_set(PointerRNA *ptr, float value)
@@ -398,8 +466,11 @@ static void rna_RigidBodyCon_spring_stiffness_y_set(PointerRNA *ptr, float value
 
        rbc->spring_stiffness_y = value;
 
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Y))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Y)) {
                RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_stiffness_z_set(PointerRNA *ptr, float value)
@@ -408,8 +479,11 @@ static void rna_RigidBodyCon_spring_stiffness_z_set(PointerRNA *ptr, float value
 
        rbc->spring_stiffness_z = value;
 
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Z))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Z)) {
                RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_damping_x_set(PointerRNA *ptr, float value)
@@ -418,8 +492,11 @@ static void rna_RigidBodyCon_spring_damping_x_set(PointerRNA *ptr, float value)
 
        rbc->spring_damping_x = value;
 
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_X))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_X)) {
                RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_damping_y_set(PointerRNA *ptr, float value)
@@ -427,9 +504,11 @@ static void rna_RigidBodyCon_spring_damping_y_set(PointerRNA *ptr, float value)
        RigidBodyCon *rbc = (RigidBodyCon *)ptr->data;
 
        rbc->spring_damping_y = value;
-
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Y))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Y)) {
                RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, value);
+       }
+#endif
 }
 
 static void rna_RigidBodyCon_spring_damping_z_set(PointerRNA *ptr, float value)
@@ -437,9 +516,11 @@ static void rna_RigidBodyCon_spring_damping_z_set(PointerRNA *ptr, float value)
        RigidBodyCon *rbc = (RigidBodyCon *)ptr->data;
 
        rbc->spring_damping_z = value;
-
-       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Z))
+#ifdef WITH_BULLET
+       if (rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING && (rbc->flag & RBC_FLAG_USE_SPRING_Z)) {
                RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, value);
+       }
+#endif
 }
 
 #else
index a97ca2f924316cffcf01f5db48556e9000bf10f9..04198d9feb955b730756e3e0b4603209ff0cba19 100644 (file)
@@ -136,7 +136,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
         * in other scenes when compositing */
        if (bmd->object != ob) {
                /* weak! - but we can too easy end up with circular dep crash otherwise */
-               if (modifiers_findByType(bmd->object, eModifierType_Boolean) == false) {
+               if (modifiers_findByType(bmd->object, eModifierType_Boolean) == NULL) {
                        dm = mesh_get_derived_final(md->scene, bmd->object, CD_MASK_MESH);
                }
                else {
index 7362745f412dbf3ac2a8cd0fefb2ace2368a0d03..2115b2a5ff66a6f2d6c43a56b035e3c28352d40b 100644 (file)
@@ -856,7 +856,6 @@ endif()
                bf_modifiers
                bf_bmesh
                bf_blenkernel
-               bf_rigidbody
                bf_nodes
                bf_gpu
                bf_blenloader
@@ -971,6 +970,10 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
        endif()
 
+       if(WITH_BULLET)
+               list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_rigidbody")
+       endif()
+
        if(WITH_BULLET AND NOT WITH_BULLET_SYSTEM)
                list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
        endif()
index d833534605bd0d394d7274b9c7be4520358cab39..32efc5bde21997591267d5b4c7f17e4610282171 100644 (file)
@@ -73,7 +73,7 @@ if(WITH_BULLET)
        list(APPEND INC_SYS
                ${BULLET_INCLUDE_DIRS}
        )
-       add_definitions(-DUSE_BULLET)
+       add_definitions(-DWITH_BULLET)
 endif()
 
 
index 9267b2b9fed004795d4f0b18e38d466cea2987d7..409a3bfec8f401109e7ac1c440191d2c1001c641 100644 (file)
@@ -164,7 +164,7 @@ extern Material defmaterial;        /* material.c */
 #include "SG_Tree.h"
 
 #include "KX_ConvertPhysicsObject.h"
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "CcdPhysicsEnvironment.h"
 #include "CcdGraphicController.h"
 #endif
@@ -1526,7 +1526,7 @@ static void BL_CreateGraphicObjectNew(KX_GameObject* gameobj,
        {
                switch (physics_engine)
                {
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                case UseBullet:
                        {
                                CcdPhysicsEnvironment* env = (CcdPhysicsEnvironment*)kxscene->GetPhysicsEnvironment();
@@ -1829,7 +1829,7 @@ static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
        
        switch (physics_engine)
        {
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                case UseBullet:
                        KX_ConvertBulletObject(gameobj, meshobj, dm, kxscene, shapeprops, smmaterial, &objprop);
                        break;
@@ -1980,7 +1980,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                bool bHasDvert = mesh->dvert != NULL && ob->defbase.first;
                bool bHasArmature = (BL_ModifierDeformer::HasArmatureDeformer(ob) && ob->parent && ob->parent->type == OB_ARMATURE && bHasDvert);
                bool bHasModifier = BL_ModifierDeformer::HasCompatibleDeformer(ob);
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                bool bHasSoftBody = (!ob->parent && (ob->gameflag & OB_SOFT_BODY));
 #endif
                if (bHasModifier) {
@@ -2007,7 +2007,7 @@ static KX_GameObject *gameobject_from_blenderobject(
                        BL_MeshDeformer *dcont = new BL_MeshDeformer((BL_DeformableGameObject*)gameobj,
                                                                                                                  ob, meshobj);
                        ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont);
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                } else if (bHasSoftBody) {
                        KX_SoftBodyDeformer *dcont = new KX_SoftBodyDeformer(meshobj, (BL_DeformableGameObject*)gameobj);
                        ((BL_DeformableGameObject*)gameobj)->SetDeformer(dcont);
index 8ac9e523d5ddbb0a6dcbbc42cb6c43dcb709aaae..38c0d71d24d736120cf8ebb469e065c77a64a8f8 100644 (file)
@@ -114,7 +114,7 @@ if(WITH_BULLET)
        list(APPEND INC_SYS
                ${BULLET_INCLUDE_DIRS}
        )
-       add_definitions(-DUSE_BULLET)
+       add_definitions(-DWITH_BULLET)
 endif()
 
 if(WITH_AUDASPACE)
index 5524612f7070240f580c180db1efde00004685c6..376f75959edf994b93e6523888aa57c226874453 100644 (file)
@@ -55,7 +55,7 @@
 
 #include "KX_ConvertPhysicsObject.h"
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "CcdPhysicsEnvironment.h"
 #endif
 
@@ -193,7 +193,7 @@ KX_BlenderSceneConverter::~KX_BlenderSceneConverter()
                itm++;
        }
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        KX_ClearBulletSharedShapes();
 #endif
 
@@ -254,7 +254,7 @@ Scene *KX_BlenderSceneConverter::GetBlenderSceneForName(const STR_String& name)
 }
 #include "KX_PythonInit.h"
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 
 #include "LinearMath/btIDebugDraw.h"
 
@@ -348,7 +348,7 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
 
        switch (physics_engine)
        {
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                case UseBullet:
                        {
                                CcdPhysicsEnvironment* ccdPhysEnv = new CcdPhysicsEnvironment(useDbvtCulling);
@@ -398,7 +398,7 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
        //that would result from this is fixed in RemoveScene()
        m_map_mesh_to_gamemesh.clear();
 
-#ifndef USE_BULLET
+#ifndef WITH_BULLET
        /* quiet compiler warning */
        (void)useDbvtCulling;
 #endif
index 72d0c8733f220f6705a8d405d6f0b6af2dc4e457..d860b2ee6943702e242da255b7c4b8c0c5625f26 100644 (file)
@@ -42,7 +42,7 @@
 #include "CTR_Map.h"
 #include "CTR_HashedPtr.h"
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 
 #include "CcdPhysicsEnvironment.h"
 #include "CcdPhysicsController.h"
index 28ad742545eb5aab4cc64850dcd5785744e8b4cf..ef546ce1b19c1a85e2e2d94900cfe9e793e24033 100644 (file)
@@ -64,7 +64,7 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
 
 if env['WITH_BF_BULLET']:
-    defs.append('USE_BULLET')
+    defs.append('WITH_BULLET')
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
index e42c2a74a8ea57e68353b33fec802786e6c0217b..fc322d80cd0e397ce171de8cb0c64c6b54cef742 100644 (file)
@@ -254,7 +254,7 @@ if(WITH_BULLET)
        list(APPEND INC
                ${BULLET_INCLUDE_DIRS}
        )
-       add_definitions(-DUSE_BULLET)
+       add_definitions(-DWITH_BULLET)
 endif()
 
 blender_add_lib(ge_logic_ketsji "${SRC}" "${INC}" "${INC_SYS}")
index 20c41b95dd357aaaa778b877b8346fcf8176452d..6ef0aed9fe2db1250f269822646c259b175d6d5f 100644 (file)
@@ -4,7 +4,7 @@
 //under visual studio the #define in KX_ConvertPhysicsObject.h is quicker for recompilation
 #include "KX_ConvertPhysicsObject.h"
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 
 #include "KX_BulletPhysicsController.h"
 
@@ -536,4 +536,4 @@ const char* KX_BulletPhysicsController::getName()
        return 0;
 }
 
-#endif // USE_BULLET
+#endif // WITH_BULLET
index 4813b39a34e5a2bdcadccff98d65ee64edcc836c..aa42bf61a7890c99d89b1b7c4ef114ff6c1e98eb 100644 (file)
@@ -8,7 +8,7 @@
 
 
 #include "KX_IPhysicsController.h"
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "CcdPhysicsController.h"
 #endif
 
@@ -25,7 +25,7 @@ private:
        btCollisionShape* m_bulletChildShape;
 
 public:
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        KX_BulletPhysicsController (const CcdConstructionInfo& ci, bool dyna, bool sensor, bool character, bool compound);
        virtual ~KX_BulletPhysicsController ();
 #endif
index e71037d08a090234ed2e86c5accc87c6d300888e..903966b79be2ab3e5deeda95b4a79c51b4282f71 100644 (file)
@@ -145,7 +145,7 @@ void        KX_ConvertDynamoObject(KX_GameObject* gameobj,
        struct  KX_ObjectProperties*    objprop);
 
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 
 void   KX_ConvertBulletObject( class   KX_GameObject* gameobj,
        class   RAS_MeshObject* meshobj,
index ff3c46cb8abb2c697624835b0de1a92cde613d9d..4a5a1704979668f10d293f49d881d56de585cc01 100644 (file)
@@ -58,7 +58,7 @@ extern "C"{
        #include "BKE_DerivedMesh.h"
 }
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "BulletSoftBody/btSoftBody.h"
 
 #include "CcdPhysicsEnvironment.h"
@@ -574,4 +574,4 @@ bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *fro
        spc->ReplaceControllerShape(bm);
        return true;
 }
-#endif // USE_BULLET
+#endif // WITH_BULLET
index eec45669e0460431cae94dd6e8e3973b06032845..63854c6aebdf20ab4da5bf6731a1e35db1e9cdd9 100644 (file)
@@ -1777,7 +1777,7 @@ PyObject *KX_GameObject::PyReinstancePhysicsMesh(PyObject *args)
                ) {
                return NULL;
        }
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        /* gameobj and mesh can be NULL */
        if (KX_ReInstanceBulletShapeFromMesh(this, gameobj, mesh))
                Py_RETURN_TRUE;
index 9bb09d56de6134e7111c83f5c1f4d780233e6a91..2e9b988dff1f23fc287cdc0bd4d6d082724356de 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "PyObjectPlus.h" 
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #  include "LinearMath/btIDebugDraw.h"
 #endif
 
@@ -716,7 +716,7 @@ PyObject *initPythonConstraintBinding()
        PyDict_SetItemString(d, "error", ErrorObject);
        Py_DECREF(ErrorObject);
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        //Debug Modes constants to be used with setDebugMode() python function
        KX_MACRO_addTypesToDict(d, DBG_NODEBUG, btIDebugDraw::DBG_NoDebug);
        KX_MACRO_addTypesToDict(d, DBG_DRAWWIREFRAME, btIDebugDraw::DBG_DrawWireframe);
@@ -732,7 +732,7 @@ PyObject *initPythonConstraintBinding()
        KX_MACRO_addTypesToDict(d, DBG_DRAWCONSTRAINTS, btIDebugDraw::DBG_DrawConstraints);
        KX_MACRO_addTypesToDict(d, DBG_DRAWCONSTRAINTLIMITS, btIDebugDraw::DBG_DrawConstraintLimits);
        KX_MACRO_addTypesToDict(d, DBG_FASTWIREFRAME, btIDebugDraw::DBG_FastWireframe);
-#endif // USE_BULLET
+#endif // WITH_BULLET
 
        //Constraint types to be used with createConstraint() python function
        KX_MACRO_addTypesToDict(d, POINTTOPOINT_CONSTRAINT, PHY_POINT2POINT_CONSTRAINT);
index 55c9ff5307fd16183da5984c68560ea28382c786..bb2f9a8354a0b3d58668e73d88560b1ecf10a8b3 100644 (file)
@@ -88,7 +88,7 @@
 #include "BL_DeformableGameObject.h"
 #include "KX_ObstacleSimulation.h"
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "KX_SoftBodyDeformer.h"
 #include "KX_ConvertPhysicsObject.h"
 #include "CcdPhysicsEnvironment.h"
@@ -1131,7 +1131,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u
                                blendobj->parent &&                                                     // original object had armature (not sure this test is needed)
                                blendobj->parent->type == OB_ARMATURE &&
                                blendmesh->dvert!=NULL;                                         // mesh has vertex group
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                        bool bHasSoftBody = (!parentobj && (blendobj->gameflag & OB_SOFT_BODY));
 #endif
                        bool releaseParent = true;
@@ -1222,7 +1222,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u
                                );
                                newobj->SetDeformer(meshdeformer);
                        }
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                        else if (bHasSoftBody)
                        {
                                KX_SoftBodyDeformer *softdeformer = new KX_SoftBodyDeformer(mesh, newobj);
@@ -1239,7 +1239,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u
        gameobj->AddMeshUser();
        }
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        if (use_phys) { /* update the new assigned mesh with the physics mesh */
                KX_ReInstanceBulletShapeFromMesh(gameobj, NULL, use_gfx?NULL:mesh);
        }
@@ -1756,7 +1756,7 @@ short KX_Scene::GetAnimationFPS()
        return m_blenderScene->r.frs_sec;
 }
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "KX_BulletPhysicsController.h"
 #endif
 
@@ -1768,7 +1768,7 @@ static void MergeScene_LogicBrick(SCA_ILogicBrick* brick, KX_Scene *to)
        brick->Replace_NetworkScene(to->GetNetworkScene());
 
        /* near sensors have physics controllers */
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        KX_TouchSensor *touch_sensor = dynamic_cast<class KX_TouchSensor *>(brick);
        if (touch_sensor) {
                touch_sensor->GetPhysicsController()->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
@@ -1789,7 +1789,7 @@ static void MergeScene_LogicBrick(SCA_ILogicBrick* brick, KX_Scene *to)
        }
 }
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
 #include "CcdGraphicController.h" // XXX  ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
 #include "CcdPhysicsEnvironment.h" // XXX  ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
 #include "KX_BulletPhysicsController.h"
@@ -1858,7 +1858,7 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
                        for (int i=0; i<children.size(); i++)
                                        children[i]->SetSGClientInfo(to);
                }
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
                SGControllerList::iterator contit;
                SGControllerList& controllers = sg->GetSGControllerList();
                for (contit = controllers.begin();contit!=controllers.end();++contit)
@@ -1867,7 +1867,7 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
                        if (phys_ctrl)
                                phys_ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
                }
-#endif // USE_BULLET
+#endif // WITH_BULLET
        }
        /* If the object is a light, update it's scene */
        if (gameobj->GetGameObjectType() == SCA_IObject::OBJ_LIGHT)
@@ -1886,7 +1886,7 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
 
 bool KX_Scene::MergeScene(KX_Scene *other)
 {
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        CcdPhysicsEnvironment *env=                     dynamic_cast<CcdPhysicsEnvironment *>(this->GetPhysicsEnvironment());
        CcdPhysicsEnvironment *env_other=       dynamic_cast<CcdPhysicsEnvironment *>(other->GetPhysicsEnvironment());
 
@@ -1896,7 +1896,7 @@ bool KX_Scene::MergeScene(KX_Scene *other)
                printf("\tsource %d, terget %d\n", (int)(env!=NULL), (int)(env_other!=NULL));
                return false;
        }
-#endif // USE_BULLET
+#endif // WITH_BULLET
 
        if (GetSceneConverter() != other->GetSceneConverter()) {
                printf("KX_Scene::MergeScene: converters differ, aborting\n");
@@ -1939,7 +1939,7 @@ bool KX_Scene::MergeScene(KX_Scene *other)
        GetLightList()->MergeList(other->GetLightList());
        other->GetLightList()->ReleaseAndRemoveAll();
 
-#ifdef USE_BULLET
+#ifdef WITH_BULLET
        if (env) /* bullet scene? - dummy scenes don't need touching */
                env->MergeEnvironment(env_other);
 #endif
index da1a72b475880bfa0fcd4476d707d0ab29c9acde..0690bdd6538e2d9a9f5e207c24b41cbb6fb3f9ea 100644 (file)
@@ -71,7 +71,7 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
 
 if env['WITH_BF_BULLET']:
-    defs.append('USE_BULLET')
+    defs.append('WITH_BULLET')
     incs += ' #source/gameengine/Physics/Bullet'
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
index afb166eee574fd9fc6e574d63144cad9cb304af9..c5b601361d946a2df947e7a3cd39a1152c99730f 100644 (file)
@@ -62,7 +62,7 @@ if(WITH_BULLET)
        list(APPEND INC
                ${BULLET_INCLUDE_DIRS}
        )
-       add_definitions(-DUSE_BULLET)
+       add_definitions(-DWITH_BULLET)
 endif()
 
 blender_add_lib(ge_phys_bullet "${SRC}" "${INC}" "${INC_SYS}")
index 83239cf979a05fac9d5f1e00bed5f887efa516d9..6ef2750e8d6374786cb1c08d5fd944fc2cf14f43 100644 (file)
@@ -56,6 +56,6 @@ if env['WITH_BF_CXX_GUARDEDALLOC']:
     defs.append('WITH_CXX_GUARDEDALLOC')
 
 if env['WITH_BF_BULLET']:
-    defs.append('USE_BULLET')
+    defs.append('WITH_BULLET')
 
 env.BlenderLib ( 'ge_phys_bullet', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])