Import of PMX failed #31
Labels
No labels
Added
Avatar Toolkit Idea (Won't be added to Cats)
Cleanup
Fixed
Further Info Needed
In Progress
Might Add
Release Candidate
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Kneelawk/Cats-Blender-Plugin#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am just a user and I don't know why there is such a problem
I downloaded mmd tools separately and did not encounter this issue when using them
ERROR:root:Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\extern_tools\mmd_tools_local\operators\fileio.py", line 194, in _do_execute
importer_cls().execute(
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\extern_tools\mmd_tools_local\core\pmx\importer.py", line 845, in execute
self.__createObjects()
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\extern_tools\mmd_tools_local\core\pmx\importer.py", line 80, in __createObjects
self.__rig = Model.create(pmxModel.name, pmxModel.name_e, self.__scale, obj_name)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\extern_tools\mmd_tools_local\core\model.py", line 518, in create
FnBone.setup_special_bone_collections(armObj)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\extern_tools\mmd_tools_local\core\bone.py", line 105, in setup_special_bone_collections
bone_collections = armature.collections
AttributeError: 'Armature' object has no attribute 'collections'
Hi
I try and look into this later today however it is the Christmas period so might take a bit. But it might be an issue with the version of mmd tools I am using. We currently using the blender 4.0 version which is still in early development and could be buggy or break things for 3.6.
I look into it as soon as I can.
After some looking into this it appears that MMD tools is basically completely changing therefor I decided to separate the cats 4.0 version from 3.6.
I will update with a new release soon for blender 3.6.
Well, I'm having trouble using it again.
Using the official plugin did not encounter
Operation: Optimization - Materials - Mix Same Materials
Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\material.py", line 250, in execute
self.copy_textures(image_textures, target_material)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\material.py", line 222, in copy_textures
new_texture_node = target_material.node_tree.nodes.new(type='ShaderNodeTexImage')
AttributeError: 'NoneType' object has no attribute 'nodes'
閿欒: Python: Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\material.py", line 250, in execute
self.copy_textures(image_textures, target_material)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\material.py", line 222, in copy_textures
new_texture_node = target_material.node_tree.nodes.new(type='ShaderNodeTexImage')
AttributeError: 'NoneType' object has no attribute 'nodes'
Hi there,
I reopened this issue so it can be tracked.
I can't seem to re-produce your issue, please if possible can you give me more details on how to re-produce this issue. Please also make sure that the material combiner is up to date. Also please explain what shader the model is using as this could be a factor in this issue. for example is it using the MMDShader, cats export shader or etc.
Also make sure you are using the latest version for blender 3.6: https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/releases/tag/3.6.1 (Ensure you download Cats-Blender-Plugin-Unofficial3.6.1-.zip).
The issue could be because I updated the plugin to work on blender 4.0, but blender 4.0 has change stuff when it comes to shader nodes which I did add into checks for which version of blender you are using, however I most likely missed something.
I don't know what's going on either
You can take a look at the video I recorded
https://mega.nz/file/VKVEwBoJ#8evXlPH20Bl3XVzRxj8JeR4durQP0jYR2VyDQk_XzPw
Hi,
Honestly am a little stumped on why you are having this issue, I have tested 10 different models of my own and just can not re-produce the issue. I have noticed however you are using 0.19.0 of the official cats which isn't the development version which is 0.19.1, kinda amazed 0.19.0 still works on blender 3.6.
Could you try the dev version of the official cats to see if you get the same issue https://github.com/absolute-quantum/cats-blender-plugin/tree/development (This is the latest version of the official cats, due to issues with the original owner there can't update the main branch or release new versions).
In the meantime I going to see if I can get some additional mmd models to see if I can re-produce the issue and re-look at the code.
I am using the development branch
So the official cats dev branch only changes the description
If you need to obtain the same model as me, you can download it here
https://www.aplaybox.com/details/model/r3dPy7G7rFqv
Hi there, thanks for the model, this helped.
I believe I have fixed the issue and it's live on the 3.6 branch, if there are no further issues I will push a new version out. let me know.
As I thought it seems there was a missing check for a model not having a node tree's which I somehow missed.
This screenshot is taken after running "Mix Same Materials"
There's a question,You can see the material I circled in red
These several shaders use the same mmd texture, but they are not mixed
You can use the official development version of Cats to view normal results
Finally:
❅Merry Christmas❅
Oh yes, happy Christmas to you
Hi I got a fix in the works for this as well as I also noticed this issue, I hoping to have it out soon.
And yes happy christmas!
I have made some changes, which has fixed the issue, however I can't commit yet as I now having issues with pmx models and the fix button. Even though I not touched that part of the plugin.
I think this fix will have to come after Christmas so I can investigate what is going on with the pmx files, so happy Christmas.
I'm not in a hurry, you can take your time
I am waiting for your good news
Ok the latest update to the 3.6 branch should of fixed your issue.
However due to a long standing bug in cats which I did fix, but that fix was causing the issue i was having with pmx files for some odd reason. (Also this bug is in the standard cats) sometimes when you import a PMX file for the first time you may get an error, you can safely ignore this error and import again and it should just work fine. (Just using the normal import button doesn't seem to throw this error for some reason).
I tested the material combiner and etc and it seems to be working just as well as it used to.
If there is any issue let me know, if not please feel free to close and I will push out a main release for 3.6.
Thank you, it looks like there's no problem now
Thanks.
I will push out a release now with this fix.
I also noticed using the combine same materials checkmark in the fix model button does nothing at all, this seems to be the same in the normal cats. Also if you fix your model first then try using the material combiner it does not work. This is an issue in the normal cats and my version of cats but i will open a new issue for this so I can track myself.
When I enter posture mode

I found that the menu no longer displays three options directly as before
I need to actively click on stop and then enter posture mode again in order to display the three options directly
To switch modes using Blender, you need to click on the menu twice
To switch modes using the menu, you need to click 3 times
When the opened file has already performed the above operation: switching modes again doesn't require multiple clicks
This may be a bug, if not, forget it
Hi, just in the future please open a new issue as if you don't I may miss anything you post. I have re-opened this issue this time.
I'm a little confused on what you mean by the three options, please either provide me with a better description with screenshots (Highlight the areas on what you mean) or video on what you mean if possible.
Thanks!
Oh, thank you. I will pay attention next time
https://mega.nz/file/MG8nRAxK#2gujnp-Fz7XB4M6VTwlnkWUxUyFLwQoijUNm8fCD6mI
I think it should be like before, automatically displaying three options when entering posture mode,Because sometimes I forget to click the menu button twice
Oh that's interesting, ok wonder when that bug got introduced, I take a look later today if I can and see if I can fix it. It's most likely a check I removed by accident.
This seems to be an issue both on blender 3.6 and 4.0 versions.
This issue should now be fixed in the latest version, please confirm this and if it is please close this issue.
Thanks!
It looks fine now, thank you for your effort
I'm very sorry to disturb you, But I seem to have discovered a small problem

Did you know that when importing pmx, a collection-like icon is created?
When this similar collection exists, using the 'Custom Model Creation' feature to merge skeletons will send an error
Python: Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\armature_custom.py", line 80, in execute
merge_armatures(base_armature_name, merge_armature_name, False, merge_same_bones=context.scene.merge_same_bones)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\armature_custom.py", line 198, in merge_armatures
meshes_base = Common.get_meshes_objects(armature_name=base_armature_name)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\scripts\addons\Cats_Unofficial\tools\common.py", line 690, in get_meshes_objects
if ob.type == 'MESH':
AttributeError: 'NoneType' object has no attribute 'type'
Of course, if you delete such a set, no error occurs.
This is just a small mistake, you can consider fixing it in a few days
Hi, thanks for the report.
Should be fix in the latest dev version for 3.6.
It will be pushed to release later on today/ tomorrow when I get chance.
The above issue has been fixed in version 3.6.5.2 for blender 3.6 and version 4.0.3.2 for Blender 4.0, please confirm and close this issue.
Please start an new issue for any future issues as this one is getting a little long unless it relates to one of the issue in this thread.
Thanks!
Thanks, I'll start a new thread if I have a problem next time.