浏览代码

Check if object has parent instead of checking if parent is None

Willian Galvani 4 年之前
父节点
当前提交
a14114c497
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      io_scene_godot/export_godot.py

+ 1 - 1
io_scene_godot/export_godot.py

@@ -133,7 +133,7 @@ class GodotExporter:
         # CollisionShape node has different direction in blender
         # and godot, so it has a -90 rotation around X axis,
         # here rotate its children back
-        if (exported_node.parent is not None and
+        if (hasattr(exported_node, "parent") and
                 exported_node.parent.get_type() == 'CollisionShape'):
             exported_node['transform'] = (
                 _AXIS_CORRECT.inverted() @