Small fix in polytool with angle input when working with millimeters units

This commit is contained in:
Bruno Perdigão
2024-08-25 19:13:27 -03:00
parent 51018177cd
commit 6c47baf0de
+2 -2
View File
@@ -601,6 +601,8 @@ class Snap(bonsai.core.tool.Snap):
else:
parser = Lark(grammar_metric)
factor = 1
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
factor = 0.001
if input_type == 'A':
parser = Lark(grammar_metric)
@@ -610,8 +612,6 @@ class Snap(bonsai.core.tool.Snap):
transformer = InputTransform()
result = transformer.transform(parse_tree)
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
result /= 1000
return True, str(result)
except:
return False, "0"