Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjian0 committed May 15, 2022
2 parents 72468b7 + c590c0d commit 08a7911
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion btools/utils/util_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,9 @@ def XYDir(vec):
def get_scaled_unit(value):
"""Mostly to scale prop values to current scene unit scale
"""
scale = bpy.context.scene.unit_settings.scale_length
try:
scale = bpy.context.scene.unit_settings.scale_length
except AttributeError:
# Addon Registration, context.scene is not available
scale = 1.0
return value / scale

0 comments on commit 08a7911

Please sign in to comment.