diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-05 03:50:36 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-05 03:50:36 +0400 |
commit | ace88b6962427944bd6851c1174f020ef769a4b7 (patch) | |
tree | 6145b9a95baba34053564f66d120653aedba0b54 /source/blender/blenkernel | |
parent | 9d8ec8b30f5d07155912b76127e44df5da8c27b6 (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/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 4 |
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); + } } /* --------------------- */ |