Unexpected non integer values #52222

Closed
opened 2017-07-29 22:46:30 +02:00 by Serge Lyatin · 15 comments

System Information
Win7 64bit

Blender Version
Broken: 2.78c hash fb1cd76

Short description of error
Noninteger.jpg

Exact steps for others to reproduce the error
Load default scene, go to Autosmooth and click left mouse button as on screenshot. Also appears in modifiers

**System Information** Win7 64bit **Blender Version** Broken: 2.78c hash fb1cd76 **Short description of error** ![Noninteger.jpg](https://archive.blender.org/developer/F685691/Noninteger.jpg) **Exact steps for others to reproduce the error** Load default scene, go to Autosmooth and click left mouse button as on screenshot. Also appears in modifiers
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @SergeL

Added subscriber: @SergeL

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-07-30 17:03:51 +02:00

Thanks for the report, but not a bug, just how floats work in computers (and a trade-off between precise manual editing of values, and nice-to-the-eye rounding of them).

Thanks for the report, but not a bug, just how floats work in computers (and a trade-off between precise manual editing of values, and nice-to-the-eye rounding of them).
Author

Hm, but there were nice integers in build 2.78c 29ec0b1, for example

Hm, but there were nice integers in build 2.78c 29ec0b1, for example

Yep, and when you were entering e.g. 4.9999 you’d get 5.0 when editing the value again, which was clearly much more annoying (preventing any really precise value editing, being limited at the 4th digit at best) than having a glitchy 7th digit popping up in some cases…

Yep, and when you were entering e.g. 4.9999 you’d get 5.0 when editing the value again, which was clearly much more annoying (preventing any really precise value editing, being limited at the 4th digit at best) than having a glitchy 7th digit popping up in some cases…

Added subscriber: @brecht

Added subscriber: @brecht

I expect we'll get a lot of reports about this change. I think the old behavior made a better trade-off to be honest, as far as I know it would still store the more exact value, just not display it.

I expect we'll get a lot of reports about this change. I think the old behavior made a better trade-off to be honest, as far as I know it would still store the more exact value, just not display it.

I don’t understand what is the issue here - this is not general drawing, this is only when you manually edit a value. Imho, you want maximum precision in that case, not 'cute' over-rounded value.

I don’t understand what is the issue here - this is not general drawing, this is only when you manually edit a value. Imho, you want maximum precision in that case, not 'cute' over-rounded value.

Feel free to revert if you like though, tbh I’m more than tired spending time on that kind of things, there is no good solution anyway, only better trade off or not.

Feel free to revert if you like though, tbh I’m more than tired spending time on that kind of things, there is no good solution anyway, only better trade off or not.

I think the right behavior would be to show a number matching the one the user typed in, up to as many digits as we can preserve. The old code seems to round even 4.999 to 5.0, but we can keep up to 6 digits for floats, so 4.99999 can still work safely.

On the other hand the new code shows 180.000005 which is 9 digits with the 8th and 9th digits being essentially random and not useful information to show. The code seems to assume the 6-7 significant digits are right after the decimal point, which is wrong.

So we can improve things here before we get to the trade-offs, but it's too close to the release for that now. I think we should revert ecb5b55d7f in the meantime.

I think the right behavior would be to show a number matching the one the user typed in, up to as many digits as we can preserve. The old code seems to round even 4.999 to 5.0, but we can keep up to 6 digits for floats, so 4.99999 can still work safely. On the other hand the new code shows 180.000005 which is 9 digits with the 8th and 9th digits being essentially random and not useful information to show. The code seems to assume the 6-7 significant digits are right after the decimal point, which is wrong. So we can improve things here before we get to the trade-offs, but it's too close to the release for that now. I think we should revert ecb5b55d7f in the meantime.

Eeeeh, angle buttons is actually an issue! Those go through the 'unit' path, which handles precision in the old, weird way - with max precision value :/
will fix that, should not be too hard…

Eeeeh, angle buttons is actually an issue! Those go through the 'unit' path, which handles precision in the old, weird way - with max precision value :/ will fix that, should not be too hard…

Ah, it seems to be an issue with display of units in general. I'd still suggest to cap the number of digits shown at 6 instead of 7, that last digit being +-1 off from the value the user typed in is confusing.

Ah, it seems to be an issue with display of units in general. I'd still suggest to cap the number of digits shown at 6 instead of 7, that last digit being +-1 off from the value the user typed in is confusing.

@brecht agree, actually that’s what I did in dc6fcb8ecf… But forgot about units cases (especially angles, which are somewhat in the middle btween 'regular' and 'units' number drawing :/ ). Shall be OK now though.

@brecht agree, actually that’s what I did in dc6fcb8ecf… But forgot about units cases (especially angles, which are somewhat in the middle btween 'regular' and 'units' number drawing :/ ). Shall be OK now though.
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
3 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#52222
No description provided.