Check if nothing selected before applying anim

This commit is contained in:
Will 2022-01-18 15:46:30 -05:00 committed by GitHub
parent dce3f4e498
commit 58e229f6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ def extract_and_apply_anim(filename : str, scene : Scene):
arma = bpy.context.view_layer.objects.active
if arma.type != 'ARMATURE':
if not arma or arma.type != 'ARMATURE':
raise Exception("Select an armature to attach the imported animation to!")
if scene.animation is None: