diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-25 12:19:34 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-25 12:20:06 +0300 |
commit | eb56ca3119f5c2a0d949c01982f793345a1e334d (patch) | |
tree | d53620e91a81f1b112c0f4749c6f3d837c8883d1 | |
parent | 1099ac1ed9d8e48cb36c4dc28a0e6d9520658de2 (diff) |
Rigid body: compute looptris on original mesh instead of CoW copy
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index ffabdb2e77d..1fcac5db97f 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -246,8 +246,11 @@ static Mesh *rigidbody_get_mesh(Object *ob) return ob->runtime.mesh_eval; } else { + /* This mesh may be used for computing looptris, which should be done + * on the original; otherwise every time the CoW is recreated it will + * have to be recomputed. */ BLI_assert(ob->rigidbody_object->mesh_source == RBO_MESH_BASE); - return ob->data; + return DEG_get_original_object(ob)->data; } } |