From 58e229f6ad3c922d33f5e8a28b269ea4c8c50df5 Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 18 Jan 2022 15:46:30 -0500 Subject: [PATCH] Check if nothing selected before applying anim --- addons/io_scene_swbf_msh/msh_to_blend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/io_scene_swbf_msh/msh_to_blend.py b/addons/io_scene_swbf_msh/msh_to_blend.py index 6814fb7..f814332 100644 --- a/addons/io_scene_swbf_msh/msh_to_blend.py +++ b/addons/io_scene_swbf_msh/msh_to_blend.py @@ -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: