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

Import Error #21

Open
ninetalescommander opened this issue Sep 3, 2024 · 2 comments
Open

Import Error #21

ninetalescommander opened this issue Sep 3, 2024 · 2 comments

Comments

@ninetalescommander
Copy link

Python: Traceback (most recent call last):
File "C:\Users\maste\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_md5_28.py", line 1066, in execute
read_md5mesh(self.filepath, correctionMatrix, self.mergeVerticesCM * 0.01, self.boneLayer-1)
File "C:\Users\maste\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_md5_28.py", line 94, in read_md5mesh
arm_o, ms = do_joints(md5mesh, j_re, e_re, matrix,meshName,collection,boneLayer)
File "C:\Users\maste\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_md5_28.py", line 200, in do_joints
b.layers[bl] = True
AttributeError: 'Bone' object has no attribute 'layers'

I keep getting this error on importing, how do I fix it?

@kjhyhy6765
Copy link

kjhyhy6765 commented Oct 19, 2024

heres the fix:
so go to your C:\Users\ pick the name \AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons and find io_scene_md5_28.py right click it and edit with notepad or whatever other software. Now CTRL+F and find the line b.layers[bl] = True and replace it with b.select = True
Now the object should import but the animations will still not work
CTRL+F again and find return btb(None, [b for b in arm.bones if b.layers[bl]]) you may need to delete some letters for it to find it and replace it with return btb(None, arm.bones) # Pass all bones
Again, CTRL+F and find the last line if armature.animation_data.action.name == actionName: and replace it with if armature.animation_data and armature.animation_data.action and armature.animation_data.action.name == actionName: save the .py and it should work for both importing a object + animation.

Note that I'm using the newest version of blender 4.2.3

@LWSS
Copy link

LWSS commented Dec 25, 2024

the meshes are still fubar. I just downgraded to blender 2.8 for now. Some sort of API problem going on here.

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

3 participants