bevel numeric input not working correctly with scene units #66204

Closed
opened 2019-06-28 09:42:52 +02:00 by Christian Vogel · 5 comments

System Information
Operating system: Windows 10 1903
Graphics card: RTX2060

Blender Version
Broken: blender-2.80-155c62b070a9-win64
Worked: -

Short description of error
bevel does not use correct numeric input when units are switched

Exact steps for others to reproduce the error

choosing cm in scene > units > length does not map correctly when using numeric input with beveling (ctrl+e in edit mode): pressing 1 on keyboard results in 100 cm

This problem does not exist with inset and other operations afaik

**System Information** Operating system: Windows 10 1903 Graphics card: RTX2060 **Blender Version** Broken: blender-2.80-155c62b070a9-win64 Worked: - **Short description of error** bevel does not use correct numeric input when units are switched **Exact steps for others to reproduce the error** choosing cm in scene > units > length does not map correctly when using numeric input with beveling (ctrl+e in edit mode): pressing 1 on keyboard results in 100 cm This problem does not exist with inset and other operations afaik

Added subscriber: @akaChris

Added subscriber: @akaChris
Jacques Lucke was assigned by Brecht Van Lommel 2019-06-28 15:19:57 +02:00
Member

Added subscriber: @howardt

Added subscriber: @howardt
Member

@howardt This can be fixed with the following change. Is the same unit used for other properties as well (haven't checked the code in detail). Feel free to commit the fix when it is correct.

diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 78b4cfe38d4..10fadc6a1b3 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -270,7 +270,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal)
       opdata->num_input[i].unit_sys = scene->unit.system;
     }
     /* Not sure this is a factor or a unit? */
-    opdata->num_input[i].unit_type[0] = B_UNIT_NONE;
+    opdata->num_input[i].unit_type[0] = B_UNIT_LENGTH;
   }
 
   /* avoid the cost of allocating a bm copy */
@howardt This can be fixed with the following change. Is the same unit used for other properties as well (haven't checked the code in detail). Feel free to commit the fix when it is correct. ``` diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 78b4cfe38d4..10fadc6a1b3 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -270,7 +270,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal) opdata->num_input[i].unit_sys = scene->unit.system; } /* Not sure this is a factor or a unit? */ - opdata->num_input[i].unit_type[0] = B_UNIT_NONE; + opdata->num_input[i].unit_type[0] = B_UNIT_LENGTH; } /* avoid the cost of allocating a bm copy */ ```

This issue was referenced by 7c8bf77e13

This issue was referenced by 7c8bf77e1351f5e44b28cb930c3b4c46589bc5ae
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#66204
No description provided.