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) {
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;
}
}