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:
authorBastien Montagne <b.mont29@gmail.com>2020-02-28 12:45:29 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-02-28 12:45:29 +0300
commiteb043d44f26bc8c245f2a3ad42d65ab5626003e4 (patch)
tree40c355a26858d81296da08a06c2a8ec502f55297 /source/blender/blenkernel/intern/rigidbody.c
parent88e1152d4acc2852bb45f0726e27f507a502fbeb (diff)
parent9cac5fa681c55edcf6e856e59e07e90e2ae25965 (diff)
Merge branch 'master' into id-ensure-unique-memory-addressid-ensure-unique-memory-address
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index c2180e50b74..494c5e21613 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -332,22 +332,24 @@ void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src
/* get the appropriate evaluated mesh based on rigid body mesh source */
static Mesh *rigidbody_get_mesh(Object *ob)
{
+ BLI_assert(ob->type == OB_MESH);
+
switch (ob->rigidbody_object->mesh_source) {
case RBO_MESH_DEFORM:
return ob->runtime.mesh_deform_eval;
case RBO_MESH_FINAL:
- return ob->runtime.mesh_eval;
+ return BKE_object_get_evaluated_mesh(ob);
case RBO_MESH_BASE:
/* 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->runtime.mesh_orig;
+ return (Mesh *)ob->runtime.data_orig;
}
/* Just return something sensible so that at least Blender won't crash. */
BLI_assert(!"Unknown mesh source");
- return ob->runtime.mesh_eval;
+ return BKE_object_get_evaluated_mesh(ob);
}
/* create collision shape of mesh - convex hull */