WIP: uv-simple-select #1

Closed
Chris Blackbourn wants to merge 182 commits from uv-simple-select into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 6 additions and 12 deletions
Showing only changes of commit e71650920a - Show all commits

View File

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

View File

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