Explorar o código

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

Willian Galvani %!s(int64=4) %!d(string=hai) anos
pai
achega
a14114c497
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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() @