diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-11-02 16:41:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-11-02 17:42:23 +0300 |
commit | 38c7fd36ff7a6eb4522a688d38faa086a6313ae6 (patch) | |
tree | ea1136a788b1d3db9d46f9a19900c396e30ce3f1 /source/blender/blenkernel/intern/softbody.c | |
parent | 0fc958a174192b2b25c4187c170ec4a394dc308a (diff) |
Refactor: Rename Object->imat to Object->world_to_object
The goal is to improve clarity and readability, without
introducing big design changes.
Follows the recent obmat to object_to_world refactor: the
similar naming is used, and it is a run-time only rename,
meaning, there is no affect on .blend files.
This patch does not touch the redundant inversions. Those
can be removed in almost (if not all) cases, but it would
be the best to do it as a separate change.
Differential Revision: https://developer.blender.org/D16367
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 4147999bef8..efe423ccfc5 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3073,12 +3073,13 @@ static void softbody_to_object(Object *ob, float (*vertexCos)[3], int numVerts, SB_estimate_transform(ob, sb->lcom, sb->lrot, sb->lscale); } /* Inverse matrix is not up to date. */ - invert_m4_m4(ob->imat, ob->object_to_world); + invert_m4_m4(ob->world_to_object, ob->object_to_world); for (a = 0; a < numVerts; a++, bp++) { copy_v3_v3(vertexCos[a], bp->pos); if (local == 0) { - mul_m4_v3(ob->imat, vertexCos[a]); /* softbody is in global coords, baked optionally not */ + mul_m4_v3(ob->world_to_object, + vertexCos[a]); /* softbody is in global coords, baked optionally not */ } } } |