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/object.cc | |
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/object.cc')
-rw-r--r-- | source/blender/blenkernel/intern/object.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 53e6d47860f..6d1b7caeea6 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -1336,8 +1336,8 @@ void BKE_object_modifier_hook_reset(Object *ob, HookModifierData *hmd) mul_m4_m4m4(hmd->parentinv, imat, ob->object_to_world); } else { - invert_m4_m4(hmd->object->imat, hmd->object->object_to_world); - mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->object_to_world); + invert_m4_m4(hmd->object->world_to_object, hmd->object->object_to_world); + mul_m4_m4m4(hmd->parentinv, hmd->object->world_to_object, ob->object_to_world); } } } @@ -1361,8 +1361,8 @@ void BKE_object_modifier_gpencil_hook_reset(Object *ob, HookGpencilModifierData mul_m4_m4m4(hmd->parentinv, imat, ob->object_to_world); } else { - invert_m4_m4(hmd->object->imat, hmd->object->object_to_world); - mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->object_to_world); + invert_m4_m4(hmd->object->world_to_object, hmd->object->object_to_world); + mul_m4_m4m4(hmd->parentinv, hmd->object->world_to_object, ob->object_to_world); } } @@ -4241,7 +4241,7 @@ void *BKE_object_tfm_backup(Object *ob) copy_m4_m4(obtfm->obmat, ob->object_to_world); copy_m4_m4(obtfm->parentinv, ob->parentinv); copy_m4_m4(obtfm->constinv, ob->constinv); - copy_m4_m4(obtfm->imat, ob->imat); + copy_m4_m4(obtfm->imat, ob->world_to_object); return (void *)obtfm; } @@ -4264,7 +4264,7 @@ void BKE_object_tfm_restore(Object *ob, void *obtfm_pt) copy_m4_m4(ob->object_to_world, obtfm->obmat); copy_m4_m4(ob->parentinv, obtfm->parentinv); copy_m4_m4(ob->constinv, obtfm->constinv); - copy_m4_m4(ob->imat, obtfm->imat); + copy_m4_m4(ob->world_to_object, obtfm->imat); } /** \} */ |