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:
authorSergey Sharybin <sergey@blender.org>2022-11-02 16:41:49 +0300
committerSergey Sharybin <sergey@blender.org>2022-11-02 17:42:23 +0300
commit38c7fd36ff7a6eb4522a688d38faa086a6313ae6 (patch)
treeea1136a788b1d3db9d46f9a19900c396e30ce3f1 /source/blender/editors/object/object_transform.cc
parent0fc958a174192b2b25c4187c170ec4a394dc308a (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/editors/object/object_transform.cc')
-rw-r--r--source/blender/editors/object/object_transform.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc
index a863e9ac324..0c2aca8b97b 100644
--- a/source/blender/editors/object/object_transform.cc
+++ b/source/blender/editors/object/object_transform.cc
@@ -1274,8 +1274,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
- invert_m4_m4(obedit->imat, obedit->object_to_world);
- mul_m4_v3(obedit->imat, cent);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_m4_v3(obedit->world_to_object, cent);
}
else {
if (around == V3D_AROUND_CENTER_BOUNDS) {
@@ -1342,8 +1342,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
- invert_m4_m4(ob->imat, ob->object_to_world);
- mul_m4_v3(ob->imat, cent);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, cent);
}
if (ob->data == nullptr) {
@@ -1363,8 +1363,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
INIT_MINMAX(min, max);
BKE_object_minmax_dupli(depsgraph, scene, ob, min, max, true);
mid_v3_v3v3(cent, min, max);
- invert_m4_m4(ob->imat, ob->object_to_world);
- mul_m4_v3(ob->imat, cent);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, cent);
}
add_v3_v3(ob->instance_collection->instance_offset, cent);