Add MMD Texture Error #359
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#359
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?
Log:
Python: Traceback (most recent call last):
File "C:\Users\mylun\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\operators\material.py", line 141, in execute
fnMat.create_texture(self.filepath)
File "C:\Users\mylun\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\core\material.py", line 224, in create_texture
texture = self.__create_texture_node("mmd_base_tex", filepath, (-4, -1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mylun\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\core\material.py", line 322, in __create_texture_node
self.__update_shader_nodes()
File "C:\Users\mylun\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\cats_blender_plugin\extern_tools\mmd_tools_local\core\material.py", line 547, in __update_shader_nodes
if not (node_shader.outputs["Shader"].is_linked or node_shader.outputs["Color"].is_linked or node_shader.outputs["Alpha"].is_linked):
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "Color" not found'
===== > < =====
Blender Version:
4.5.1
Cats Version:
4.5.1.3
I am unable to re-produce this error, please can tell me what steps your took to get this?
Thanks
I imported the model's FBX and tried to click "Add MMD Texture," and this error occurred.
I'm not sure if it's because of an old shader node from the model or if the .blend file doesn't have the Color of Alpha, which is causing the error.
More>
https://streamable.com/fdtt81
First of all this is not a Cats issue it's a MMD Tools issue however mmd tools is not designed for your use case. It's designed for PMX (MMD) models.
FBX files typically come with standard Blender materials (Principled BSDF, etc.) that don't have the "Color" and "Alpha" outputs that MMD Tools expects.
the "Add MMD Texture" function is designed for PMX workflows, It's trying to work with MMD specific material nodes that don't exist in FBX imports.
This is why i could not re-produce the issue because your trying to do something the tool is not designed for.
But all that being said, i think you can just change the shader to the MMD one and that should fix the issue.
Ah it appears the shader only appears if you import a MMD (PMX) model in your scene most likely because it only gets created when you import an PMX model. Again MMD Tools is not made for your use case.
But if you import a PMX model into your scene and then remove it, you should see the shader which you can change your model materials too, this should solve this error.
Also why are you using that to add textures when that model is clearly not a MMD model you should be doing this (When you click on the folder icon like the one in the video it should allow you to pick your texture, the popup just didn't record.)
https://github.com/user-attachments/assets/29abbbdb-dc8f-4fca-873c-be079c76fb77
Okay, I'll give it a try, but it worked before, so I think it's the right thing to do. Thank you very much.
MMD Tools devs might of changed how it works (I swear it used to create the shader when you opened blender) but that's on the MMD Tool devs not the Cats Devs,
We keep MMD Tools up to date and i know there made alot of changes in the last few months. Also it could be because the Blender Devs are getting more stricter on how code works, so the original code could of been a problem but blender wasn't catching it before and now it is.
There a bunch of reasons why this could be happening now but it's nothing to do with Cats it self.
I can add a check which could solve the error, but i am not sure if any more checks need to be added for this and not sure if the end result of adding the texture would look crappy or not.