diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-24 14:22:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-24 14:23:04 +0300 |
commit | 8b806b8e64115d231841d9bf203b254263b33b96 (patch) | |
tree | ad5decfebff08060d277f29fd6f955751b6d9598 /source/blender/editors | |
parent | d9d1c6880987f59c8398ad1342f16d2af74a6bf6 (diff) |
Fix object origin transform with vertex snapping
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index b2bfdce28ee..b29edcb00de 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -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) { |