Commit: eb56ca3119f5c2a0d949c01982f793345a1e334d
Author: Sybren A. Stüvel
Date:   Mon Jun 25 11:19:34 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBeb56ca3119f5c2a0d949c01982f793345a1e334d

Rigid body: compute looptris on original mesh instead of CoW copy

===================================================================

M       source/blender/blenkernel/intern/rigidbody.c

===================================================================

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;
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to