Browse Source

Merge pull request #8061 from mhirsch/dev

blender exporter breaks when parent contains keyframe animation and child does not
Mr.doob 9 years ago
parent
commit
c1cd181a49
1 changed files with 4 additions and 0 deletions
  1. 4 0
      utils/exporters/blender/addons/io_three/exporter/api/object.py

+ 4 - 0
utils/exporters/blender/addons/io_three/exporter/api/object.py

@@ -174,9 +174,13 @@ EXPORTED_TRACKABLE_FIELDS = [ "location", "scale", "rotation_quaternion" ]
 
 
 @_object
 @_object
 def animated_xform(obj, options):
 def animated_xform(obj, options):
+    if obj.animation_data is None:
+        return []
     fcurves = obj.animation_data
     fcurves = obj.animation_data
     if not fcurves:
     if not fcurves:
         return []
         return []
+    if fcurves.action is None:
+        return []
     fcurves = fcurves.action.fcurves
     fcurves = fcurves.action.fcurves
 
 
     objName = obj.name
     objName = obj.name