Fix object origin transform with vertex snapping

This commit is contained in:
Campbell Barton 2019-08-24 21:22:30 +10:00
parent d9d1c68809
commit 8b806b8e64
Notes: blender-bot 2023-02-14 11:29:52 +01:00
Referenced by issue #69110, Pivot point "affect only: Origin" and Snap
1 changed files with 5 additions and 1 deletions

View File

@ -1241,7 +1241,11 @@ static void TargetSnapClosest(TransInfo *t)
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (td = tc->data, i = 0; i < tc->data_len && td->flag & TD_SELECTED; i++, td++) {
struct BoundBox *bb = BKE_object_boundbox_get(td->ob);
const BoundBox *bb = NULL;
if ((t->flag & T_OBJECT_DATA_IN_OBJECT_MODE) == 0) {
bb = BKE_object_boundbox_get(td->ob);
}
/* use boundbox if possible */
if (bb) {