FlailingFog / KK-Blender-Porter-Pack

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

Error when importing #471

Closed ghost closed 7 months ago

ghost commented 7 months ago
Error:          Unknown python error occurred. 
          Make sure the default model imports correctly before troubleshooting on this model!
Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'

Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'

Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/importbuttons.py", line 85, in execute
    function()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/importbuttons.py", line 62, in <lambda>
    lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'),
  File "/home/desktop/Documents/blender/3.6/scripts/modules/bpy/ops.py", line 111, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-V660/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'

kks card.zip

FlailingFog commented 7 months ago

I believe I fixed that error in this updated version. Let me know if it's still not working in that version.

ghost commented 7 months ago

Sadly still isn't working :(

[Error:          Unknown python error occurred. 
          Make sure the default model imports correctly before troubleshooting on this model!
Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'

Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'

Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/importbuttons.py", line 85, in execute
    function()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/importbuttons.py", line 62, in <lambda>
    lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'),
  File "/home/desktop/Documents/blender/3.6/scripts/modules/bpy/ops.py", line 111, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 73, in execute
    self.load_json_colors()
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 993, in load_json_colors
    self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors
  File "/home/desktop/.config/blender/3.6/scripts/addons/KK-Blender-Porter-Pack-master/importing/modifymaterial.py", line 1475, in update_shaders
    face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick
KeyError: '_overcolor1 Color 1'
maidemao commented 7 months ago

I have the same issue `Error: Unknown python error occurred. Make sure the default model imports correctly before troubleshooting on this model! Traceback (most recent call last): File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 73, in execute self.load_json_colors() File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 993, in load_json_colors self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 1475, in update_shaders face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick KeyError: '_overcolor1 Color 1'

Error: Traceback (most recent call last): File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 73, in execute self.load_json_colors() File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 993, in load_json_colors self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 1475, in update_shaders face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick KeyError: '_overcolor1 Color 1'

Traceback (most recent call last): File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importbuttons.py", line 85, in execute function() File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importbuttons.py", line 70, in lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'), File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 111, in call ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo) RuntimeError: Error: Traceback (most recent call last): File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 73, in execute self.load_json_colors() File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 993, in load_json_colors self.update_shaders(json_color_data, self.lut_selection, self.lut_light, light = True) # Set light colors File "C:\Users\computer\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\modifymaterial.py", line 1475, in update_shaders face_colors.append(self.color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick KeyError: '_overcolor1 Color 1' `

Vesperindustrial commented 7 months ago

adding another that this error occurs for me as well (whether with the master link in your previous comment or with the official latest) with the same errors shown in the previous example logs. I have tried adding an overtex1 where it wasnt there, also adding a lipstick which i thought it might be the case as well and neither changes the error. Have also tried using different lut options to no avail either. It does not seem to actually occur on all cards but have not managed to pinpoint what is causing the issue for the one that does throw the error

EDIT: Seems its when the face is using koikano/main_skin shader instead of the usual shader forge default one that throws the error, if i change it to the latter i can import fine. It also seems to be ONLY with the face as the body remains with the former shader.

FlailingFog commented 7 months ago

Sadly still isn't working :(

Did you reload blender after installing the updated version?

EDIT: Seems its when the face is using koikano/main_skin shader instead of the usual shader forge default one that throws the error, if i change it to the latter i can import fine. It also seems to be ONLY with the face as the body remains with the former shader.

Yes, it looks like the koikano shader is not supported by the KKBP Exporter right now. This card does import to blender on the version I linked above, but no color information from koikano shader is available in the exported json file. You can just set these missing colors manually though. image

ghost commented 7 months ago

Did you reload blender after installing the updated version?

I did

FlailingFog commented 7 months ago

I'm not sure why it isn't at least importing then...

ghost commented 7 months ago

I reinstalled everything and it kind of imports but I don't think this is correct.

Using blender 3.6.4. Not sure if linux makes a difference but blender uses python so it should be platform agnostic.

Screenshot_20231002_184115-1

maidemao commented 7 months ago

In my case, the script will run pretty far, but then hit the error and stop. So some part got imported, but I can tell the conversion didn't go though all the way, as the rig is incompele compare to other model I imported with older version. So I get the mesh, and part of the rig, and the color is off.

FlailingFog commented 7 months ago

I'm sorry, I apparently made the update with the fix to the wrong branch. Can you try the latest master version again? https://github.com/FlailingFog/KK-Blender-Porter-Pack/archive/refs/heads/master.zip

ghost commented 7 months ago

Can you try the latest master version again?

Just tried and it and now it looks like the image you posted where the colors are wrong but imported correctly.

Thank you so much, fixing the colors is easy so no issue.