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
path: root/source
diff options
context:
space:
mode:
authorSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:36 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:36 +0400
commitace88b6962427944bd6851c1174f020ef769a4b7 (patch)
tree6145b9a95baba34053564f66d120653aedba0b54 /source
parent9d8ec8b30f5d07155912b76127e44df5da8c27b6 (diff)
rigidbody: Fix [#34108] Rigid body with no polygons crashes blender
Fall back to using box shape in case creating shape from mesh fails.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index bbcb77ef191..3ed6d0dfc8f 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -416,6 +416,10 @@ void BKE_rigidbody_validate_sim_shape(Object *ob, short rebuild)
rbo->physics_shape = new_shape;
RB_shape_set_margin(rbo->physics_shape, RBO_GET_MARGIN(rbo));
}
+ else { /* otherwise fall back to box shape */
+ rbo->shape = RB_SHAPE_BOX;
+ BKE_rigidbody_validate_sim_shape(ob, true);
+ }
}
/* --------------------- */