unit settings ?

i can get the unit with

print (‘UnitSettings.system =’, bpy.context.scene.unit_settings)

but this does not tell me what the units are!

how do you get if it is in blender metric or imperial units ?

thanks

To get the system


bpy.context.scene.unit_settings.system

A property will be in displayed with these units if it has unit attribute LENGTH or VELOCITY or another unit that uses length.


>>> C.object
bpy.data.objects['Cube']

>>> prop  = C.object.bl_rna.properties.get('location')
>>> prop
<bpy_struct, FloatProperty("location")>

>>> prop.unit
'LENGTH'
 

this works now

print (‘UnitSettings.system =’, bpy.context.scene.unit_settings.system)
print (‘UnitSettings.system rotation =’, bpy.context.scene.unit_settings.system_rotation)

thanks