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...
This commit is contained in:
parent
14f1db7ed8
commit
3dc2ed11c0
Notes:
blender-bot
2023-02-14 19:45:26 +01:00
Referenced by issue #49197, fbx exporter, Blender 2.77a reports a same node (357572814) several times
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue