Browse Source

fix bug - we should only export the animations associated with this object.

Ben Houston 9 years ago
parent
commit
7812b25cd8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      utils/exporters/blender/addons/io_three/exporter/api/animation.py

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

@@ -7,7 +7,6 @@ import mathutils
 from bpy import data, context
 from .. import constants, logger
 
-
 def pose_animation(armature, options):
     """Query armature animation using pose bones
 
@@ -47,9 +46,10 @@ def _parse_action(func, armature, options):
     animations = []
     logger.info("Parsing %d actions", len(data.actions))
     for action in data.actions:
-        logger.info("Parsing action %s", action.name)
-        animation = func(action, armature, options)
-        animations.append(animation)
+        if action == armature.animation_data.action:
+            logger.info("Parsing action %s", action.name)
+            animation = func(action, armature, options)
+            animations.append(animation)
     return animations