Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'bpy_prop_collection[key]: key "m_avg_Pelvis" not found' #135

Open
lucasjinreal opened this issue Jan 1, 2022 · 4 comments
Open

Comments

@lucasjinreal
Copy link

Hi, brother, I run convert blender fbx script got this error:

KeyError: 'bpy_prop_collection[key]: key "m_avg_Pelvis" not found'

why this error happens?

@lucasjinreal
Copy link
Author

image

the error comes from here

@lucasjinreal
Copy link
Author

@Arthur151 I changed gender to female, same error happens:

convert_fbx.py", line 299, in process_poses
KeyError: 'bpy_prop_collection[key]: key "f_avg_Pelvis" not found'
错误: Python 脚本失败,请检查系统控制台中的消息

@lucasjinreal
Copy link
Author

@Arthur151 it turns out my blender loaded more than one Armature, but still got this error even I logged out all bone names:

  armature = bpy.data.armatures[0]
    ob = bpy.data.objects['Armature.001']
    armature = ob.data
    print(armature.bones.keys())
    print(armature.name)
    bpy.ops.object.mode_set(mode='EDIT')
    # get specific bone name 'Bone'
    pelvis_bone = armature.edit_bones[bone_name_from_index[0]]
FBX version: 7400
['m_avg_root', 'm_avg_Pelvis', 'm_avg_L_Hip', 'm_avg_L_Knee', 'm_avg_L_Ankle', 'm_avg_L_Foot', 'm_avg_R_Hip', 'm_avg_R_Knee', 'm_avg_R_Ankle', 'm_avg_R_Foot', 'm_avg_Spine1', 'm_avg_Spine2', 'm_avg_Spine3', 'm_avg_Neck', 'm_avg_Head', 'm_avg_L_Collar', 'm_avg_L_Shoulder', 'm_avg_L_Elbow', 'm_avg_L_Wrist', 'm_avg_L_Hand', 'm_avg_R_Collar', 'm_avg_R_Shoulder', 'm_avg_R_Elbow', 'm_avg_R_Wrist', 'm_avg_R_Hand']
Armature.001

the bone names obvisouly have that key. why?

@lucasjinreal
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant