Is there a way to properly set a distance value for an input property of a geometry nodes group with python without loosing the value's unit type?
I have a Geometry Nodes group with various input properties. One of them has a distance type value, hence indicating cm/m (whatever the current system unit is).
Setting the value manually of course isn't a problem. But when setting the value from python the unit type gets lost, meaning the unit indicator (cm/m) is missing and even the number gets converted.
Converted means that if my system units are set to cm the new value gets interpreted as m, because this is the default unit in Blender. Entering 0.1 is then interpreted as 10 cm and not as 0.1 cm as intended.
Setting all other numerical inputs is no problem, as long as they don't represent any specific units (like degrees).
The simplified python command is:
bpy.context.active_object.modifiers[-1]["Input_3"] = 0.1
So far I haven't found any reference to that issue as it seems to work fine with regular properties on standard objects. But with input properties of node groups it seems to be different.