FlailingFog / KK-Blender-Porter-Pack

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

KKUTS Materials Cause The Import To Fail (Any Card) #456

Closed MoriMorinya closed 7 months ago

MoriMorinya commented 9 months ago

Blender 3.6.1, Latest version downloaded from the latest commit

Error: Unknown python error occurred Traceback (most recent call last): File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 757, in update_shaders shadow_color} UnboundLocalError: local variable 'shadow_color' referenced before assignment

Error: Traceback (most recent call last): File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 757, in update_shaders shadow_color} UnboundLocalError: local variable 'shadow_color' referenced before assignment

Traceback (most recent call last): File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importbuttons.py", line 111, in execute bpy.ops.kkb.importcolors('EXEC_DEFAULT'), File "E:\Steam\steamapps\common\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 "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 757, in update_shaders shadow_color} UnboundLocalError: local variable 'shadow_color' referenced before assignment

REFRESH JIGGLE LIST GENERATING BONES FOR: Armature post 1 1

another card has a slightly different error (this one I changed a model's face and body material to KKUTS without any edits)

Error: Unknown python error occurred Traceback (most recent call last): File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 648, in update_shaders face_colors.append(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\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 648, in update_shaders face_colors.append(color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick KeyError: '_overcolor1 Color 1'

Traceback (most recent call last): File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importbuttons.py", line 111, in execute bpy.ops.kkb.importcolors('EXEC_DEFAULT'), File "E:\Steam\steamapps\common\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 "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 944, in execute load_json_colors(directory, lut_light, lut_dark, lut_selection) File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 559, in load_json_colors update_shaders(json_color_data, lut_selection, lut_light, light = True) # Set light colors File "C:\Users\WindowsUser\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\KK-Blender-Porter-Pack-master\importing\importcolors.py", line 648, in update_shaders face_colors.append(color_to_KK(to_255(colors["_overcolor1 Color 1"]), active_lut)) #lipstick KeyError: '_overcolor1 Color 1'

I thought of looking into previous versions if this is a new error but the only old exports I have do not have the shaders applied to the hair/body/face, anything else (like accessories) having a different shader imports perfectly fine from any version of the exporter, although without the correct colors.

FlailingFog commented 7 months ago

Changing the face, body and top of the default model to KKUTS on the latest commit seems to import correctly now image