Import of PMX failed #31

Closed
opened 2023-12-22 07:23:48 +00:00 by Ghost · 25 comments
Ghost commented 2023-12-22 07:23:48 +00:00 (Migrated from git.disroot.org)

屏幕截图 2023-12-22 151203
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'

![屏幕截图 2023-12-22 151203](https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/assets/76981036/e9cd736c-6058-4c00-a352-b5aca28323f5) 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'
Ghost commented 2023-12-22 10:17:20 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2023-12-22 16:03:46 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2023-12-24 17:33:00 +00:00 (Migrated from git.disroot.org)

经过一番研究后,MMD 工具似乎基本上完全改变了,因此我决定将猫 4.0 版本与 3.6 分开。

我将很快更新 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'

> 经过一番研究后,MMD 工具似乎基本上完全改变了,因此我决定将猫 4.0 版本与 3.6 分开。 > > 我将很快更新 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'
Ghost commented 2023-12-24 18:42:54 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2023-12-24 20:13:24 +00:00 (Migrated from git.disroot.org)

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

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
Ghost commented 2023-12-24 20:26:32 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2023-12-24 20:39:06 +00:00 (Migrated from git.disroot.org)

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

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
Ghost commented 2023-12-24 21:01:00 +00:00 (Migrated from git.disroot.org)

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.

Hi there, thanks for the model, this helped. I believe I have fixed the issue and it's live on the [3.6 branch](https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/tree/blender-36), 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.
Ghost commented 2023-12-24 21:18:43 +00:00 (Migrated from git.disroot.org)

屏幕截图 2023-12-25 050526
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

![屏幕截图 2023-12-25 050526](https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/assets/76981036/074d1c8c-a33a-408f-85b3-32cd235e4cd4) 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
Ghost commented 2023-12-24 21:26:33 +00:00 (Migrated from git.disroot.org)

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!

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!
Ghost commented 2023-12-24 22:55:16 +00:00 (Migrated from git.disroot.org)

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 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.
Ghost commented 2023-12-25 04:20:29 +00:00 (Migrated from git.disroot.org)

I'm not in a hurry, you can take your time
I am waiting for your good news

I'm not in a hurry, you can take your time I am waiting for your good news
Ghost commented 2023-12-28 19:07:25 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2023-12-28 19:23:11 +00:00 (Migrated from git.disroot.org)

Thank you, it looks like there's no problem now

Thank you, it looks like there's no problem now
Ghost commented 2023-12-28 19:24:32 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2024-02-01 05:51:27 +00:00 (Migrated from git.disroot.org)

When I enter posture mode
I found that the menu no longer displays three options directly as before
image
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

When I enter posture mode I found that the menu no longer displays three options directly as before ![image](https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/assets/76981036/b529e307-3f7b-4c43-a032-bc013f6ff538) 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
Ghost commented 2024-02-01 13:21:58 +00:00 (Migrated from git.disroot.org)

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!

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!
Ghost commented 2024-02-01 13:37:18 +00:00 (Migrated from git.disroot.org)

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, 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
Ghost commented 2024-02-01 13:44:00 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2024-02-01 18:52:25 +00:00 (Migrated from git.disroot.org)

This issue should now be fixed in the latest version, please confirm this and if it is please close this issue.

Thanks!

This issue should now be fixed in the latest version, please confirm this and if it is please close this issue. Thanks!
Ghost commented 2024-02-01 18:55:43 +00:00 (Migrated from git.disroot.org)

It looks fine now, thank you for your effort

It looks fine now, thank you for your effort
Ghost commented 2024-02-02 14:39:19 +00:00 (Migrated from git.disroot.org)

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?
屏幕截图 2024-02-02 223328
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

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? ![屏幕截图 2024-02-02 223328](https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/assets/76981036/98edc2b9-2513-4a83-9c19-8bacb929f52d) 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
Ghost commented 2024-02-02 16:27:38 +00:00 (Migrated from git.disroot.org)

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.

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.
Ghost commented 2024-02-03 14:32:20 +00:00 (Migrated from git.disroot.org)

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!

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!
Ghost commented 2024-02-03 14:41:54 +00:00 (Migrated from git.disroot.org)

Thanks, I'll start a new thread if I have a problem next time.

Thanks, I'll start a new thread if I have a problem next time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Kneelawk/Cats-Blender-Plugin#31
No description provided.