Manipulator: correct pivot w/ non 1:1 aspect

This commit is contained in:
Campbell Barton
2017-08-31 03:07:05 +10:00
parent eafe96a718
commit cc830e2586

View File

@@ -580,6 +580,15 @@ static int manipulator_rect_transform_modal(
if (transform_flag & ED_MANIPULATOR_CAGE2D_XFORM_FLAG_TRANSLATE) {
manipulator_rect_pivot_from_scale_part(mpr->highlight_part, pivot, constrain_axis);
/* Move pivot to boundary edges w/ non square aspect. */
if (dims[0] < dims[1]) {
pivot[0] /= dims[1];
}
else {
pivot[1] /= dims[0];
}
}
else {
zero_v2(pivot);