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:
authorCampbell Barton <ideasman42@gmail.com>2020-04-23 11:38:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-04-23 11:38:41 +0300
commit68cfce1519ed63dc0a231c7de81c26f3f9c810f1 (patch)
tree93ad94854decfd0abc28c3ffa3de1b6d5546feef /source/blender/editors/object/object_transform.c
parent6c0ddf11101061b30c58ae6dde8e1f628f1a38d5 (diff)
parent8dedbb17478316ff44e739b68ff5d03d36b7ab40 (diff)
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 1eede3e5197..e7626562b6b 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1728,7 +1728,7 @@ static void object_apply_location(Object *ob, const float loc[3])
copy_v3_v3(ob->loc, mat[3]);
}
-static void object_orient_to_location(Object *ob,
+static bool object_orient_to_location(Object *ob,
const float rot_orig[3][3],
const float axis[3],
const float location[3],
@@ -1750,9 +1750,10 @@ static void object_orient_to_location(Object *ob,
object_apply_rotation(ob, final_rot);
- DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
+ return true;
}
}
+ return false;
}
static void object_transform_axis_target_cancel(bContext *C, wmOperator *op)
@@ -1986,6 +1987,8 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
object_orient_to_location(
item->ob, item->rot_mat, item->rot_mat[2], location_world, item->is_z_flip);
+
+ DEG_id_tag_update(&item->ob->id, ID_RECALC_TRANSFORM);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, item->ob);
}
if (normal_found) {
@@ -1997,9 +2000,11 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
else {
struct XFormAxisItem *item = xfd->object_data;
for (int i = 0; i < xfd->object_data_len; i++, item++) {
- object_orient_to_location(
- item->ob, item->rot_mat, item->rot_mat[2], location_world, item->is_z_flip);
- WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, item->ob);
+ if (object_orient_to_location(
+ item->ob, item->rot_mat, item->rot_mat[2], location_world, item->is_z_flip)) {
+ DEG_id_tag_update(&item->ob->id, ID_RECALC_TRANSFORM);
+ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, item->ob);
+ }
}
xfd->prev.is_normal_valid = false;
}