瀏覽代碼

Merge pull request #8061 from mhirsch/dev

blender exporter breaks when parent contains keyframe animation and child does not
Mr.doob 9 年之前
父節點
當前提交
c1cd181a49
共有 1 個文件被更改,包括 4 次插入0 次删除
  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
 def animated_xform(obj, options):
+    if obj.animation_data is None:
+        return []
     fcurves = obj.animation_data
     if not fcurves:
         return []
+    if fcurves.action is None:
+        return []
     fcurves = fcurves.action.fcurves
 
     objName = obj.name