[Bf-blender-cvs] [5946ea938a0] master: D14975: Voxel Remesh Size Edit - Constant Size by default

Ramil Roosileht noreply at git.blender.org
Wed Jun 22 10:37:25 CEST 2022


Commit: 5946ea938a07bf95c7682af919ee33c715e1fa42
Author: Ramil Roosileht
Date:   Wed Jun 22 01:36:13 2022 -0700
Branches: master
https://developer.blender.org/rB5946ea938a07bf95c7682af919ee33c715e1fa42

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

===================================================================

M	source/blender/editors/object/object_remesh.cc

===================================================================

diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc
index 71b757b66ff..8a7138b25ac 100644
--- a/source/blender/editors/object/object_remesh.cc
+++ b/source/blender/editors/object/object_remesh.cc
@@ -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;



More information about the Bf-blender-cvs mailing list