Props subtypes in nodes and custom properties (and elsewhere?)
In Blender Python API it's possible to add subtypes to the properties.
For example you can use subtype "DISTANCE" and it's allowing you type in units in human way like "5m" will be interpeted as "5000mm" automatically and displayed with current project units. Which is definitely a big deal for people working in imperial system. The trick is internally all data is still handled in meters so it's easy to reuse it.
Same with "ANGLE" subtype. It's displayed as user friendly good old degrees angle but internally it stored in radians which are good for calculations.
Would be nice also to have option to use subtypes in the geometry nodes (maybe elsewhere?) but allowing them to be used atleast in custom properties would be a good start - users will be able to connect to them with drivers and reuse their values in geo nodes.
Implementing this would also help solve those:
blender.community/c/rightclickselect/LTgbbc/
blender.community/c/rightclickselect/x6W3/
Reference for float subtypes from Python API:
docs.blender.org/api/current/bpy_types_enum_items/property_subtype_number_items.html
1 Comment
This is already available in Blender 3.6 Beta .