Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-08-28 16:27:16 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-08-28 16:28:15 +0300
commit0ed7aedc71378ac451c4ae411711e58d8a2dbce0 (patch)
tree6e67706d6f74839637649a0dc7a5a1c3a814133f /source/blender/blenkernel/intern
parentb4a608c11c8a5a5cd6b72e292e1075858ae6c828 (diff)
Fix building without bullet support
The new BKE_rigidbody_is_affected_by_simulation function was in side the WITH_BULLET ifdef guard.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 13c791ffa85..95a8b3b3c15 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -229,6 +229,23 @@ void BKE_rigidbody_free_constraint(Object *ob)
ob->rigidbody_constraint = NULL;
}
+bool BKE_rigidbody_is_affected_by_simulation(Object *ob)
+{
+ /* Check if the object will have its transform changed by the rigidbody simulation. */
+
+ /* True if the shape of this object's parent is of type compound */
+ bool obCompoundParent = (ob->parent != NULL && ob->parent->rigidbody_object != NULL &&
+ ob->parent->rigidbody_object->shape == RB_SHAPE_COMPOUND);
+
+ RigidBodyOb *rbo = ob->rigidbody_object;
+ if (rbo == NULL || rbo->flag & RBO_FLAG_KINEMATIC || rbo->type == RBO_TYPE_PASSIVE ||
+ obCompoundParent) {
+ return false;
+ }
+
+ return true;
+}
+
#ifdef WITH_BULLET
/* Copying Methods --------------------- */
@@ -1901,23 +1918,6 @@ bool BKE_rigidbody_check_sim_running(RigidBodyWorld *rbw, float ctime)
return (rbw && (rbw->flag & RBW_FLAG_MUTED) == 0 && ctime > rbw->shared->pointcache->startframe);
}
-bool BKE_rigidbody_is_affected_by_simulation(Object *ob)
-{
- /* Check if the object will have its transform changed by the rigidbody simulation. */
-
- /* True if the shape of this object's parent is of type compound */
- bool obCompoundParent = (ob->parent != NULL && ob->parent->rigidbody_object != NULL &&
- ob->parent->rigidbody_object->shape == RB_SHAPE_COMPOUND);
-
- RigidBodyOb *rbo = ob->rigidbody_object;
- if (rbo == NULL || rbo->flag & RBO_FLAG_KINEMATIC || rbo->type == RBO_TYPE_PASSIVE ||
- obCompoundParent) {
- return false;
- }
-
- return true;
-}
-
/* Sync rigid body and object transformations */
void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime)
{