Vertex Transformation, Number Rounding Problem, versions 2.79 and above! #61298

Open
opened 2019-02-07 23:17:19 +01:00 by Somebody · 19 comments

System Information
Operating system: Windows 7 x64 Ultimate SP1
Graphics card: onboard Intel HD 4600

Blender Version
Broken:
2.79 (latest) AND 2.80 latest beta

Worked: (optional)
2.77a works correctly!

Short description of error

This problem is happening on blender versions 2.79 and 2.80! It is NOT present in 2.77a.
How to replicate: Selecting a vertex and clicking on its axis transformation on the right pane (N), for example on the Y-axis, enter the number 47.15426 for example.
So far, so good. But after clicking on that same field again (to edit or just copy the value to the clipboard), it gets automatically rounded off (just by clicking on it) to 47.1543 for no reason.
Basically, when I want to select the coordinate of that vertex (47.15426 is its correct value) and just copy it to my clipboard so I can paste it into another program, that number gets changed automatically to 47.1543 inside Blender and it stays that way after de-selecting the Y-axis number field in the Transformation tab!

In 2.77a version, no such thing can happen, I have been using it since 2016 and there weren't any problems with that.
I have tested both the 32-bit and 64-bit versions of the affected 2.79 and 2.80 releases, all have this issue.

Exact steps for others to reproduce the error
Open the attached .blend file: vertex_coordinate_rounding_problem.blend
The vertex is already selected. Just navigate with your mouse to the Y: axis transformation and click on the field with the number. It will change from 47.15426 to 47.1543 (which literally lowers the precision of the float by a decimal point). If you try that in Blender 2.77a, this will not happen.

**System Information** Operating system: Windows 7 x64 Ultimate SP1 Graphics card: onboard Intel HD 4600 **Blender Version** Broken: 2.79 (latest) AND 2.80 latest beta Worked: (optional) 2.77a works correctly! **Short description of error** This problem is happening on blender versions 2.79 and 2.80! It is NOT present in 2.77a. How to replicate: Selecting a vertex and clicking on its axis transformation on the right pane (N), for example on the Y-axis, enter the number 47.15426 for example. So far, so good. But after clicking on that same field again (to edit or just copy the value to the clipboard), it gets automatically rounded off (just by clicking on it) to 47.1543 for no reason. Basically, when I want to select the coordinate of that vertex (47.15426 is its correct value) and just copy it to my clipboard so I can paste it into another program, that number gets changed automatically to 47.1543 inside Blender and it stays that way after de-selecting the Y-axis number field in the Transformation tab! In 2.77a version, no such thing can happen, I have been using it since 2016 and there weren't any problems with that. I have tested both the 32-bit and 64-bit versions of the affected 2.79 and 2.80 releases, all have this issue. **Exact steps for others to reproduce the error** Open the attached .blend file: [vertex_coordinate_rounding_problem.blend](https://archive.blender.org/developer/F6542977/vertex_coordinate_rounding_problem.blend) The vertex is already selected. Just navigate with your mouse to the Y: axis transformation and click on the field with the number. It will change from 47.15426 to 47.1543 (which literally lowers the precision of the float by a decimal point). If you try that in Blender 2.77a, this will not happen.
Author

Added subscriber: @trashcontainer

Added subscriber: @trashcontainer

This issue was referenced by blender/blender-staging@dc6fcb8ecf

This issue was referenced by blender/blender-staging@dc6fcb8ecff41e61fbf31462b068b2ec790760d4

Added subscriber: @DragMZ

Added subscriber: @DragMZ

The reason for this is: UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues. used in interface_handlers.c:3052:

ui_but_string_get_ex(but, data->str, data->maxlen, UI_PRECISION_FLOAT_MAX, true, &no_zero_strip);
The reason for this is: [UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues. ](https://developer.blender.org/rBSdc6fcb8ecff41e61fbf31462b068b2ec790760d4) used in interface_handlers.c:3052: ``` ui_but_string_get_ex(but, data->str, data->maxlen, UI_PRECISION_FLOAT_MAX, true, &no_zero_strip); ```

Added subscribers: @mont29, @ZedDB

Added subscribers: @mont29, @ZedDB

@mont29 is there anything to do here as this seems to be a intended change?

@mont29 is there anything to do here as this seems to be a intended change?
Author

What was the reasoning for this? Version 2.77 didn't do that, what prompted the change?
Me, personally, I'd be thrilled to have an option to turn that feature off, I don't want it to round off things on its own.
Maybe put it as an option (toggleable on/off) for people who want to round off their vertex coordinates by X amount of decimals?

What was the reasoning for this? Version 2.77 didn't do that, what prompted the change? Me, personally, I'd be thrilled to have an option to turn that feature off, I don't want it to round off things on its own. Maybe put it as an option (toggleable on/off) for people who want to round off their vertex coordinates by X amount of decimals?
Bastien Montagne self-assigned this 2019-02-08 19:40:54 +01:00

Issue is due to bug in code generating string for edited numeric button. Tried a quick fix, but there are actually more issues in our handling of float precision in UI code, so will check further to properly unify/fix the whole mess.

Issue is due to bug in code generating string for edited numeric button. Tried a quick fix, but there are actually more issues in our handling of float precision in UI code, so will check further to properly unify/fix the whole mess.
Author

Edit: Any ETA on a fix for this?

Edit: Any ETA on a fix for this?
Author

Any news on whether this has been fixed?

Any news on whether this has been fixed?
Bastien Montagne was unassigned by Dalai Felinto 2019-12-23 16:35:14 +01:00

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

I have re-triaged this report and can not reproduce it.
Can you please check if this is still an issue in latest build?
https://builder.blender.org/download/

I have re-triaged this report and can not reproduce it. Can you please check if this is still an issue in latest build? https://builder.blender.org/download/
Author

@iss Just tested on 2.81.16

For testing, I used the OP posted value of X: 47.15426 for a vertex on a starting box.
Here is what happens - the value is now correctly written in the coordinate field menu (N), but it rounds up to 47.1543 when you select the value in the Transform Vertex menu.

What needs to change (in my opinion) is that this rounding up is not needed (there is simply no reason for a value to change just because you selected the numbers in the N vertex transform menu).

After the value changes, if you hit ESC, it will revert back to the correct 47.15426. But if you de-select the field with the auto-changed value (when you select it, it goes from 47.15426 to 47.1543) then it will remain 47.1543, which essentialy moves your vertex for no apparent reason. This became an issue since blender 2.78 up to this day with the newest versions. Last known version that doesn't have this is 2.77a

Hope you guys can make it so that this auto-switching with values just stops happening, thanks for your hard work!

P.S this happens in 2.82 Alpha too

@iss Just tested on 2.81.16 For testing, I used the OP posted value of X: 47.15426 for a vertex on a starting box. Here is what happens - the value is now correctly written in the coordinate field menu (N), but it rounds up to 47.1543 when you select the value in the Transform Vertex menu. What needs to change (in my opinion) is that this rounding up is not needed (there is simply no reason for a value to change just because you selected the numbers in the N vertex transform menu). After the value changes, if you hit ESC, it will revert back to the correct 47.15426. But if you de-select the field with the auto-changed value (when you select it, it goes from 47.15426 to 47.1543) then it will remain 47.1543, which essentialy moves your vertex for no apparent reason. This became an issue since blender 2.78 up to this day with the newest versions. Last known version that doesn't have this is 2.77a Hope you guys can make it so that this auto-switching with values just stops happening, thanks for your hard work! P.S this happens in 2.82 Alpha too

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

Isn’t 6 digits of precision exactly what is expected from our floats? Put in a number with 6 digits of precision or less and get the exact number out. Try using more precision and you will lose some.

Isn’t 6 digits of precision exactly what is expected from our floats? Put in a number with 6 digits of precision or less and get the exact number out. Try using more precision and you will lose some.
Author

@Harley the issue is not with the 6-digits of precision, it's with the interface code that "rounds up" just because you selected that field (you manually input something, hit enter - its correct, but if you then select the same field you did the manual input to, it rounds up and you have to hit ESC or else the vertex will move to the rounded up value)

@Harley the issue is not with the 6-digits of precision, it's with the interface code that "rounds up" just because you selected that field (you manually input something, hit enter - its correct, but if you then select the same field you did the manual input to, it rounds up and you have to hit ESC or else the vertex will move to the rounded up value)
Author

Hi guys, any chance this gets patched in for the 2.83 final release? Thanks, hope it's not too much work to get that resolved

Hi guys, any chance this gets patched in for the 2.83 final release? Thanks, hope it's not too much work to get that resolved
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:25:55 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#61298
No description provided.