Proper fix for building without Bullet
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Dec 2018 11:37:04 +0000 (12:37 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Dec 2018 11:37:04 +0000 (12:37 +0100)
Stick to an existing way of dealing with disabled feature.

source/blender/blenkernel/intern/rigidbody.c
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/intern/versioning_280.c
source/blender/makesrna/intern/rna_rigidbody.c

index 2d035c271d2ad431c2d9389ee6371490b353016d..22fb863d8295ff161fab03a2ca67772db032aaff 100644 (file)
@@ -1772,6 +1772,8 @@ bool BKE_rigidbody_check_sim_running(RigidBodyWorld *rbw, float ctime) { return
 void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw) {}
 void BKE_rigidbody_rebuild_world(Depsgraph *depsgraph, Scene *scene, float ctime) {}
 void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, Scene *scene, float ctime) {}
+void BKE_rigidbody_objects_collection_validate(Scene *scene, RigidBodyWorld *rbw) {}
+void BKE_rigidbody_constraints_collection_validate(Scene *scene, RigidBodyWorld *rbw) {}
 
 #if defined(__GNUC__) || defined(__clang__)
 #  pragma GCC diagnostic pop
index 5edeb8ccbbbbd180946aeea6978945c2b099752b..49987cb860cc100ea7afd44746380f4375b3a184 100644 (file)
@@ -88,10 +88,6 @@ if(WITH_CODEC_FFMPEG)
        add_definitions(-DWITH_FFMPEG)
 endif()
 
-if(WITH_BULLET)
-       add_definitions(-DWITH_BULLET)
-endif()
-
 if(WITH_ALEMBIC)
        list(APPEND INC
                ../alembic
index d10d86de2bc24cfc106ceb604666bcbc745b3446..abf7c280996cd13e8a54fb735106ee7374937d6b 100644 (file)
@@ -2490,7 +2490,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
                        }
                }
 
-#ifdef WITH_BULLET
                /* Ensure we get valid rigidbody object/constraint data in relevant collections' objects. */
                for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
                        RigidBodyWorld *rbw = scene->rigidbody_world;
@@ -2502,7 +2501,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
                        BKE_rigidbody_objects_collection_validate(scene, rbw);
                        BKE_rigidbody_constraints_collection_validate(scene, rbw);
                }
-#endif
        }
 
        if (!MAIN_VERSION_ATLEAST(bmain, 280, 37)) {
index dfdbed0dafd1c40d02cd8c1ad492ffc934a545d1..98833390b0d907c668d0ff0791a92fe9d0f24f8f 100644 (file)
@@ -151,19 +151,15 @@ static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, bool value)
 
 static void rna_RigidBodyWorld_objects_collection_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
-#ifdef WITH_BULLET
        RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
        BKE_rigidbody_objects_collection_validate(scene, rbw);
-#endif
        rna_RigidBodyWorld_reset(bmain, scene, ptr);
 }
 
 static void rna_RigidBodyWorld_constraints_collection_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
-#ifdef WITH_BULLET
        RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
        BKE_rigidbody_constraints_collection_validate(scene, rbw);
-#endif
        rna_RigidBodyWorld_reset(bmain, scene, ptr);
 }