From ba7c9c16f36375cca1f3665775859ba3d6c6486d Mon Sep 17 00:00:00 2001 From: SE2Dev Date: Fri, 2 Nov 2018 15:33:36 -0400 Subject: [PATCH] Fix #16 --- io_scene_cod/export_xmodel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io_scene_cod/export_xmodel.py b/io_scene_cod/export_xmodel.py index 0d225cc..d534ae4 100644 --- a/io_scene_cod/export_xmodel.py +++ b/io_scene_cod/export_xmodel.py @@ -129,7 +129,7 @@ def test_armature_filter(object): obs.append(ob) # Fallback to exporting only the selected object if we couldn't find any - if armature is not None: + if armature is None: if len(obs) == 0 and context.active_object is not None: if ob.type == 'MESH': obs = [context.active_object] @@ -353,6 +353,8 @@ def save(self, context, filepath, use_armature, quiet=False) + # If we were unable to detect any valid rigged objects + # we'll use the selected mesh. if len(objects) == 0: return "There are no objects to export"