Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-08-30 22:20:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-08-30 22:20:45 +0300
commit3dc2ed11c05de63d2d98b9914f5f1e1b25db8f6f (patch)
treecd6e14c98e7348ed39f4a4f6322ba33433afee6c
parent14f1db7ed82124e84d505f889f5fae9e6cd18097 (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...
-rw-r--r--io_scene_fbx/export_fbx_bin.py9
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