D14975: Voxel Remesh Size Edit - Constant Size by default

This patch makes constant size a default for size edit operator of voxel remesh.
In turn, pressing CTRL now enables relative scale, the old default.

Patch also changes workspace status text entry with new additions. Note that it is a simple text and not an array of keymaps (for that further changes are needed)

{F13082567}

Reviewed By: Julien Kaspar & Joseph Eagar
Differential Revision: https://developer.blender.org/D14975
Ref D14975
This commit is contained in:
Ramil Roosileht 2022-06-22 01:36:13 -07:00 committed by Joseph Eagar
parent f4d8382c86
commit 5946ea938a
Notes: blender-bot 2023-02-14 06:42:54 +01:00
Referenced by issue #98150, Voxel Remesher resizing improvments
1 changed files with 6 additions and 5 deletions

View File

@ -415,15 +415,15 @@ static int voxel_size_edit_modal(bContext *C, wmOperator *op, const wmEvent *eve
}
if (event->modifier & KM_CTRL) {
/* Linear mode, enables jumping to any voxel size. */
d = d * 0.0005f;
}
else {
/* Multiply d by the initial voxel size to prevent uncontrollable speeds when using low voxel
* sizes. */
/* When the voxel size is slower, it needs more precision. */
d = d * min_ff(pow2f(cd->init_voxel_size), 0.1f) * 0.05f;
}
else {
/* Linear mode, enables jumping to any voxel size. */
d = d * 0.0005f;
}
if (cd->slow_mode) {
cd->voxel_size = cd->slow_voxel_size + d * 0.05f;
}
@ -592,7 +592,8 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
ED_region_tag_redraw(region);
const char *status_str = TIP_(
"Move the mouse to change the voxel size. LMB: confirm size, ESC/RMB: cancel");
"Move the mouse to change the voxel size. CTRL: Relative Scale, SHIFT: Precision Mode, "
"ENTER/LMB: Confirm Size, ESC/RMB: Cancel");
ED_workspace_status_text(C, status_str);
return OPERATOR_RUNNING_MODAL;