Commit: f648191432a997a85d9c34f6f4c7f73baa9f69f5
Author: Cian Jinks
Date:   Fri Aug 13 12:38:52 2021 +0100
Branches: soc-2021-knife-tools
https://developer.blender.org/rBf648191432a997a85d9c34f6f4c7f73baa9f69f5

Knife: Enter angle snapping increment with numpad multiple times

Entering a value for angle snapping increment using the numpad was only allowed 
once.
To re-enter a value angle snapping had to be toggled off and back on.
Now you can repeatedly re-enter values, except values cannot have decimal 
points.
If a more precise angle is required, the knife tool settings exposes the angle 
snapping increment.

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

M       source/blender/editors/mesh/editmesh_knife.c

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

diff --git a/source/blender/editors/mesh/editmesh_knife.c 
b/source/blender/editors/mesh/editmesh_knife.c
index 95e048564ca..c3f00fdf002 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -4479,6 +4479,9 @@ static int knifetool_modal(bContext *C, wmOperator *op, 
const wmEvent *event)
   float snapping_increment_temp;
 
   if (kcd->angle_snapping) {
+    if (kcd->num.str_cur >= 2) {
+      knife_reset_snap_angle_input(kcd);
+    }
     knife_update_header(C, op, kcd); /* Update the angle multiple. */
     /* Modal numinput active, try to handle numeric inputs first... */
     if (event->val == KM_PRESS && hasNumInput(&kcd->num) && handleNumInput(C, 
&kcd->num, event)) {
@@ -4729,6 +4732,9 @@ static int knifetool_modal(bContext *C, wmOperator *op, 
const wmEvent *event)
   }
 
   if (kcd->angle_snapping) {
+    if (kcd->num.str_cur >= 2) {
+      knife_reset_snap_angle_input(kcd);
+    }
     /* Modal numinput inactive, try to handle numeric inputs last... */
     if (!handled && event->val == KM_PRESS && handleNumInput(C, &kcd->num, 
event)) {
       applyNumInput(&kcd->num, &snapping_increment_temp);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to