diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-30 22:20:45 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-30 22:20:45 +0300 |
commit | 3dc2ed11c05de63d2d98b9914f5f1e1b25db8f6f (patch) | |
tree | cd6e14c98e7348ed39f4a4f6322ba33433afee6c /io_scene_fbx | |
parent | 14f1db7ed82124e84d505f889f5fae9e6cd18097 (diff) |
Fix T49197: all virtual leaf bones had same uuid.
Kinda odd nobody noticed this so far :/
Also, cleanup: do not loop over key/value of a dict when you only need the keys...
Diffstat (limited to 'io_scene_fbx')
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 4979dfc3..250b9516 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -1822,8 +1822,8 @@ def fbx_skeleton_from_armature(scene, settings, arm_obj, objects, data_meshes, def fbx_generate_leaf_bones(settings, data_bones): # find which bons have no children - child_count = {bo: 0 for bo, _bo_key in data_bones.items()} - for bo, _bo_key in data_bones.items(): + child_count = {bo: 0 for bo in data_bones.keys()} + for bo in data_bones.keys(): if bo.parent and bo.parent.is_bone: child_count[bo.parent] += 1 @@ -1835,8 +1835,9 @@ def fbx_generate_leaf_bones(settings, data_bones): for parent in leaf_parents: node_name = parent.name + "_end" parent_uuid = parent.fbx_uuid - node_uuid = get_fbx_uuid_from_key(node_name + "_node") - attr_uuid = get_fbx_uuid_from_key(node_name + "_nodeattr") + parent_key = parent.key + node_uuid = get_fbx_uuid_from_key(parent_key + "_end_node") + attr_uuid = get_fbx_uuid_from_key(parent_key + "_end_nodeattr") hide = parent.hide size = parent.bdata.head_radius * bone_radius_scale |