Some property subtypes not working (no unit suffix), precision=0 not supported #34875
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#34875
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%--- Operating System, Graphics card ---
Windows 7
Blender 2.66.5
Property subtypes like 'ANGLE' don't seem to work, a FloatProp shows as 10.00 instead of 10.00° (missing degrees-symbol)
'FACTOR' and 'PERCENTAGE' do add a suffix, °-symbol works for FloatVectorProp 'TRANSLATION' for instance
precision=0 for a FloatProp acts like if precision=2, this kind of restriction isn't necessary IMO
Script attached, paste and run, Viewport > Spacebar menu > Simple Operator --> see Tools panel (Redo)%%%
Changed status to: 'Open'
%%%The float property seems to show the ° symbol ok here with the attached script, using 2.66.5 revision 55793. There is no ° symbol for integer properties but that's expected I think. The angle subtype assumes the values to be stored in radians and displayed in degrees, and so storing radians as integers is useless.
I'm also not seeing any ° symbol with TRANSLATION, which I also wouldn't expect there? Probably I'm misunderstanding something?
Precision 0 means fallback to some default precision value, which is 2 in this case. That doesn't seem to be documented but it was intentionally implemented this way a long time ago, perhaps for the python API this could be changed.%%%
%%%I see, then 'ANGLE' for IntProps isn't that useful - but why does it accept this subtype then? Shouldn't silently fail!
FloatProp shows ° correctly, that's right, i added it to the script to show that precision=0 doesn't work
Since IntProps can't use subtype='ANGLE', it would be useful to allow precision=0, and precision=-1 should let it fall back to default of 2
TRANSLATION doesn't show °, that's right and intended, my fault! It adds prefixes just fine ("X: ..."), the one with ° was e.g. 'EULER'%%%
%%%I think this is an edge case - using the api in a way we didn't predict or support. Leave it to brecht give final answer and/or close though.%%%
%%%I've made precision=0 work now as you might expect. I'm not going to fix the subtype thing, it's just metadata that the interface may or may not use and I'd rather not have script errors or prints for that kind of thing.%%%
Changed status from 'Open' to: 'Resolved'
%%%Thanks Brecht for fixing! :)%%%