From 3dc2ed11c05de63d2d98b9914f5f1e1b25db8f6f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 30 Aug 2016 21:20:45 +0200 Subject: 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... --- io_scene_fbx/export_fbx_bin.py | 9 +++++---- 1 file 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 -- cgit v1.2.3