← All ideas
  • Published 25 May 2023

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.

Screenshot 2023-05-25 092057.png

Screenshot 2023-05-25 092032.png

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 Screenshot 2023-05-25 091953.png

0%

Development Status: Done

Upvote 0 Downvote 0
andrej730
25 May 2023

1 Comment

pablovazquez

This is already available in Blender 3.6 Beta .

subtype

3