python - max property precision is showing unused digits. #112309

Closed
opened 2023-09-13 02:29:26 +02:00 by michael campbell · 3 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99

Blender Version
Broken: version: 3.6.3 Release Candidate, branch: blender-v3.6-release, commit date: 2023-09-05 15:07, hash: d371c3c09fa8

I'm not 100% sure this is a bug, but the user manual suggest a property's precision attribute is used to set the maximum number of digits that can be shown, however when specifying a property's precision value to 6 and then setting that value to 0.1 in the user interface, the display shows 0.100000 rather than the expected 0.1 (the necessary digits)

https://docs.blender.org/api/current/bpy.props.html#:~:text=precision)%20property%20definition.-,Parameters,-name%20(string

image

image

It takes up unnecessary space on sliders, obscuring the property name.

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99 **Blender Version** Broken: version: 3.6.3 Release Candidate, branch: blender-v3.6-release, commit date: 2023-09-05 15:07, hash: `d371c3c09fa8` I'm not 100% sure this is a bug, but the user manual suggest a property's precision attribute is used to set the maximum number of digits that can be shown, however when specifying a property's precision value to 6 and then setting that value to 0.1 in the user interface, the display shows 0.100000 rather than the expected 0.1 (the necessary digits) https://docs.blender.org/api/current/bpy.props.html#:~:text=precision)%20property%20definition.-,Parameters,-name%20(string ![image](/attachments/d3824b55-5be6-46f8-94a4-28735b04f74a) ![image](/attachments/8d0275a4-0ab0-481d-9a0b-0fa583b8b0c7) It takes up unnecessary space on sliders, obscuring the property name.
4.1 KiB
6.3 KiB
michael campbell added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-13 02:29:27 +02:00

On a side note. I notice when no precision is set, the number of decimal places shown behaves differently if you enter 0.0000001 than if you enter 0.1234567

entering:
image
shown:
image
editing:
image

different if there are no zeros before the first populated decimal place

entering:
image
shown:
image
editing:
image

On a side note. I notice when no precision is set, the number of decimal places shown behaves differently if you enter 0.0000001 than if you enter 0.1234567 entering: ![image](/attachments/c2d29b26-c794-4a29-9c50-512cc7297771) shown: ![image](/attachments/02acfceb-73ce-4e5d-8973-8ba95c6ea5b4) editing: ![image](/attachments/526f72f2-46ba-4ec7-931c-f222e0fc3e88) different if there are no zeros before the first populated decimal place entering: ![image](/attachments/577bb89d-9beb-4d5f-84b3-35678126f473) shown: ![image](/attachments/660bf8d5-eb36-487a-b7b4-7059e588c998) editing: ![image](/attachments/a5ba53b4-539c-4afd-941a-957a4f8fe5e3)

Thanks for the report, but this behavior is old, the code is about 12 years old.

You can see the history and changes involved in this area in these commits:
0d7b3ed39c (RNA: display exact integer values without fraction if step is integer)
d5c9b509ec (Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits)
152b06dc82 (use a better method for finding the precision to use for float buttons...)
06c3756db8 (smarter precision calculation, so 0.000001 isn't displayed as 0.00)

If the design really needs improvement, it would be necessary to start a discussion with the UI team.

Unfortunately, we cannot confirm this report, as it is a request for modified/improved behavior and not really a bug in current behavior. So closing as this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

If, after being communicated, the UI team decides that this is an area that needs to be reviewed, this report can be reopened.

Thanks for the report, but this behavior is old, the code is about 12 years old. You can see the history and changes involved in this area in these commits: 0d7b3ed39c (RNA: display exact integer values without fraction if step is integer) d5c9b509ec (Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits) 152b06dc82 (use a better method for finding the precision to use for float buttons...) 06c3756db8 (smarter precision calculation, so 0.000001 isn't displayed as 0.00) If the design really needs improvement, it would be necessary to start a discussion with the UI team. Unfortunately, we cannot confirm this report, as it is a request for modified/improved behavior and not really a bug in current behavior. So closing as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests If, after being communicated, the UI team decides that this is an area that needs to be reviewed, this report can be reopened.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-09-13 04:07:53 +02:00

Thanks 👍

Thanks 👍
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
2 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#112309
No description provided.