Skip to content

Commit

Permalink
Fall back to object property if UI setting for scale is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
joepal1976 committed Aug 1, 2022
1 parent d93ea82 commit 4dd898b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maketarget/saveprimarytarget.py
Expand Up @@ -38,6 +38,7 @@ def invoke(self, context,event):
def execute(self, context):

scaleFactor = 1.0
obj = context.active_object

if hasattr(bpy.context.scene, "MhScaleMode"):
scaleMode = str(bpy.context.scene.MhScaleMode)
Expand All @@ -47,8 +48,10 @@ def execute(self, context):

if scaleMode == "CENTIMETER":
scaleFactor = 0.1
else:
if hasattr(obj, "MhScaleFactor"):
scaleFactor = 1.0 / obj.MhScaleFactor

obj = context.active_object
sks = obj.data.shape_keys
primtarget = obj.MhPrimaryTargetName
bt = sks.key_blocks["Basis"]
Expand Down

0 comments on commit 4dd898b

Please sign in to comment.