diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-11 09:19:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-11 09:22:30 +0300 |
commit | f34a2af4b37cc9f90ab5739f97796d3e6a273def (patch) | |
tree | b4a1cfe4c3b7a1b0f081b6c8c4a16346e432c40d /source/blender/editors | |
parent | 45af6b61d9e2760409d642ddc19b51e6aa42481d (diff) |
Fix scale cage tool never using object boundbox
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_3d.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 049fd143a26..55093a1c163 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -57,6 +57,7 @@ #include "BKE_gpencil.h" #include "BKE_scene.h" #include "BKE_workspace.h" +#include "BKE_object.h" #include "BIF_gl.h" @@ -1067,13 +1068,19 @@ int ED_transform_calc_gizmo_stats( if (ob == NULL) { ob = base->object; } - if (params->use_only_center || base->object->bb == NULL) { + + /* Get the boundbox out of the evaluated object. */ + if (params->use_only_center == false) { + bb = BKE_object_boundbox_get(base->object); + } + + if (params->use_only_center || (bb == NULL)) { calc_tw_center(tbounds, base->object->obmat[3]); } else { for (uint j = 0; j < 8; j++) { float co[3]; - mul_v3_m4v3(co, base->object->obmat, base->object->bb->vec[j]); + mul_v3_m4v3(co, base->object->obmat, bb->vec[j]); calc_tw_center(tbounds, co); } } |