[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33369] trunk/blender/release/scripts/op/ io_scene_fbx/export_fbx.py: bugfix [#24947] Animations data replaced by the first animation (fbx exporter)

Campbell Barton ideasman42 at gmail.com
Mon Nov 29 00:07:50 CET 2010


Revision: 33369
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33369
Author:   campbellbarton
Date:     2010-11-29 00:07:49 +0100 (Mon, 29 Nov 2010)

Log Message:
-----------
bugfix [#24947] Animations data replaced by the first animation (fbx exporter)
this feature was ported from 2.5x but not tested, referring to the wrong object when assigning actions.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/io_scene_fbx/export_fbx.py

Modified: trunk/blender/release/scripts/op/io_scene_fbx/export_fbx.py
===================================================================
--- trunk/blender/release/scripts/op/io_scene_fbx/export_fbx.py	2010-11-28 18:54:43 UTC (rev 33368)
+++ trunk/blender/release/scripts/op/io_scene_fbx/export_fbx.py	2010-11-28 23:07:49 UTC (rev 33369)
@@ -2639,10 +2639,10 @@
                 act_end = int(act_end)
 
                 # Set the action active
-                for my_bone in ob_arms:
-                    if ob.animation_data and blenAction in my_bone.blenActionList:
-                        ob.animation_data.action = blenAction
-                        # print '\t\tSetting Action!', blenAction
+                for my_arm in ob_arms:
+                    if my_arm.blenObject.animation_data and blenAction in my_arm.blenActionList:
+                        my_arm.blenObject.animation_data.action = blenAction
+                        # print('\t\tSetting Action!', blenAction)
                 # scene.update(1)
 
             file.write('\n\t\tFileName: "Default_Take.tak"') # ??? - not sure why this is needed
@@ -2801,9 +2801,9 @@
 
             # end action loop. set original actions
             # do this after every loop incase actions effect eachother.
-            for my_bone in ob_arms:
-                if my_bone.blenObject.animation_data:
-                    my_bone.blenObject.animation_data.action = my_bone.blenAction
+            for my_arm in ob_arms:
+                if my_arm.blenObject.animation_data:
+                    my_arm.blenObject.animation_data.action = my_arm.blenAction
 
         file.write('\n}')
 
@@ -2871,10 +2871,12 @@
     file.write('\n}')
     file.write('\n')
 
-    # Incase sombody imports this, clean up by clearing global dicts
+    # XXX, shouldnt be global!
     sane_name_mapping_ob.clear()
     sane_name_mapping_mat.clear()
     sane_name_mapping_tex.clear()
+    sane_name_mapping_take.clear()
+    sane_name_mapping_group.clear()
 
     ob_arms[:] =	[]
     ob_bones[:] =	[]





More information about the Bf-blender-cvs mailing list