FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
310 stars 29 forks source link

Import shaders and textures error for male body #58

Closed ghost closed 2 years ago

ghost commented 2 years ago
Python: Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-96f66e8414a9f8452b6a31000f44d5efdb461dd3\importing\importeverything.py", line 770, in execute
    texture_error = get_and_load_textures(directory)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-96f66e8414a9f8452b6a31000f44d5efdb461dd3\importing\importeverything.py", line 383, in get_and_load_textures
    imageLoad('Template Body', 'Gentex', 'BodyMC', 'cf_m_body_ColorMask.png')
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-96f66e8414a9f8452b6a31000f44d5efdb461dd3\importing\importeverything.py", line 373, in imageLoad
    currentObj.material_slots[mat].material.node_tree.nodes[group].node_tree.nodes[node].image = bpy.data.images[image]
KeyError: 'bpy_prop_collection[key]: key "Template Body" not found'

location: <unknown location>:-1
FlailingFog commented 2 years ago

Is there something like a cf_m_body_00.002 material when you import the .pmx file? And does it accidentally get put on the Clothes object when you get to the hair separation part?

ghost commented 2 years ago

Yes, cm_m_body -28400 does get moved to the clothes objects. body body2

ghost commented 2 years ago
Python: Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 781, in execute
    texture_error = get_and_load_textures(directory)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 392, in get_and_load_textures
    imageLoad('Template Body', 'Gentex', 'BodyMC', 'cf_m_body_ColorMask.png')
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 381, in imageLoad
    currentObj.material_slots[mat].material.node_tree.nodes[group].node_tree.nodes[node].image = bpy.data.images[image]
KeyError: 'bpy_prop_collection[key]: key "Template Body" not found'

location: <unknown location>:-1

f848408

ghost commented 2 years ago
Python: Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 790, in execute
    texture_error = get_and_load_textures(directory)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 392, in get_and_load_textures
    imageLoad('Template Body', 'Gentex', 'BodyMC', 'cf_m_body_ColorMask.png')
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\KK-Blender-Shader-Pack-5-merger\importing\importeverything.py", line 381, in imageLoad
    currentObj.material_slots[mat].material.node_tree.nodes[group].node_tree.nodes[node].image = bpy.data.images[image]
KeyError: 'bpy_prop_collection[key]: key "Template Body" not found'

location: <unknown location>:-1

9901a03

FlailingFog commented 2 years ago

This is happening because the cm_m_body material and the c_m_shadowcast material are getting the '-####' tags added onto the material name / image files.

@MediaMoots Could you remove the tags for these two materials in the exporter?

MediaMoots commented 2 years ago

ok

MediaMoots commented 2 years ago

wait, the plugin already excludes the "c_m_shadowcast" material, is it a different name that needs to be excluded?

MediaMoots commented 2 years ago

nvm, found the issue

MediaMoots commented 2 years ago

PR #79 should fix the material issues. Please let me know if it doesn't.

ghost commented 2 years ago

Just tested and working perfectly. Thank you very much.