Check if nothing selected before applying anim
This commit is contained in:
parent
dce3f4e498
commit
58e229f6ad
|
@ -26,7 +26,7 @@ def extract_and_apply_anim(filename : str, scene : Scene):
|
||||||
|
|
||||||
arma = bpy.context.view_layer.objects.active
|
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!")
|
raise Exception("Select an armature to attach the imported animation to!")
|
||||||
|
|
||||||
if scene.animation is None:
|
if scene.animation is None:
|
||||||
|
|
Loading…
Reference in New Issue