Fix for the export error when there is no Shape Keys available

This commit is contained in:
khreathor 2019-01-19 05:10:21 +01:00 committed by Bill Currie
parent 36da80c0d0
commit 11e5f39fdc

View file

@ -193,9 +193,10 @@ def make_frame(mesh, vertmap, idx):
frame = MDL.Frame()
frame.name = "frame" + str(idx)
shape_keys_amount = len(bpy.context.object.data.shape_keys.key_blocks)
if shape_keys_amount > idx:
frame.name = bpy.context.object.data.shape_keys.key_blocks[idx].name
if bpy.context.object.data.shape_keys:
shape_keys_amount = len(bpy.context.object.data.shape_keys.key_blocks)
if shape_keys_amount > idx:
frame.name = bpy.context.object.data.shape_keys.key_blocks[idx].name
for v in vertmap:
mv = mesh.vertices[v]