[Bf-extensions-cvs] [a423135] master: FBX export: Do not write skinning weights/indices if empty.

Bastien Montagne noreply at git.blender.org
Tue May 19 12:50:54 CEST 2015


Commit: a4231350950136996af8981bceebb8180110756f
Author: Bastien Montagne
Date:   Tue May 19 12:50:22 2015 +0200
Branches: master
https://developer.blender.org/rBAa4231350950136996af8981bceebb8180110756f

FBX export: Do not write skinning weights/indices if empty.

===================================================================

M	io_scene_fbx/export_fbx_bin.py

===================================================================

diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 8f9f53c..62926f4 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -1465,8 +1465,9 @@ def fbx_data_armature_elements(root, arm_obj, scene_data):
                 # No idea what that user data might be...
                 fbx_userdata = elem_data_single_string(fbx_clstr, b"UserData", b"")
                 fbx_userdata.add_string(b"")
-                elem_data_single_int32_array(fbx_clstr, b"Indexes", indices)
-                elem_data_single_float64_array(fbx_clstr, b"Weights", weights)
+                if indices:
+                    elem_data_single_int32_array(fbx_clstr, b"Indexes", indices)
+                    elem_data_single_float64_array(fbx_clstr, b"Weights", weights)
                 # Transform, TransformLink and TransformAssociateModel matrices...
                 # They seem to be doublons of BindPose ones??? Have armature (associatemodel) in addition, though.
                 # WARNING! Even though official FBX API presents Transform in global space,



More information about the Bf-extensions-cvs mailing list