me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
2 changed files with 6 additions and 12 deletions
Showing only changes of commit d5c60fb685 - Show all commits

View File

@ -1141,12 +1141,9 @@ static int gizmo_cage2d_modal(bContext *C,
}
}
if (delta_orig < 0) {
scale[i] = -delta_curr / (pivot[i] + 0.5f);
}
else {
scale[i] = delta_curr / (0.5f - pivot[i]);
}
/* Original cursor position does not exactly lie on the cage boundary due to margin. */
const float delta_boundary = signf(delta_orig) * 0.5f - pivot[i];
scale[i] = delta_curr / delta_boundary;
}
}

View File

@ -539,12 +539,9 @@ static int gizmo_cage3d_modal(bContext *C,
}
}
if (delta_orig < 0) {
scale[i] = -delta_curr / (pivot[i] + 0.5f);
}
else {
scale[i] = delta_curr / (0.5f - pivot[i]);
}
/* Original cursor position does not exactly lie on the cage boundary due to margin. */
const float delta_boundary = signf(delta_orig) * 0.5f - pivot[i];
scale[i] = delta_curr / delta_boundary;
}
}