Преглед на файлове

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