FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
Other
375 stars 30 forks source link

KKBP 7.0.1 - Unable to Import Character #618

Open JohnnyStar324 opened 1 month ago

JohnnyStar324 commented 1 month ago

Hi, I'm running into a similar error that was claimed to have been fixed here #495 yet still persists in the latest version, in which the Blender import fails. Card linked below

`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\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 52, in execute self.replace_materials_for_body() File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 236, in replace_materials_for_body swap_body_material([self.body['SMR materials']['cf_O_tooth'][0] + '.001'],'KK Fangs (tooth.001)')


TypeError: only strings are allowed as keys of ID properties

Error: Traceback (most recent call last):
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 52, in execute
    self.replace_materials_for_body()
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 236, in replace_materials_for_body
    swap_body_material([self.body['SMR materials']['cf_O_tooth'][0] + '.001'],'KK Fangs (tooth.001)')
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: only strings are allowed as keys of ID properties

Traceback (most recent call last):
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\importbuttons.py", line 112, in execute
    function()
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\importbuttons.py", line 86, in <lambda>
    lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\Blender Stuff\Blender Launcher\stable\blender-4.2.2-stable.c03d7d98a413\4.2\scripts\modules\bpy\ops.py", line 107, in __call__
    ret = _op_call(self.idname_py(), kw, C_exec, C_undo)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 52, in execute
    self.replace_materials_for_body()
  File "C:\Users\john\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\kkbp\importing\modifymaterial.py", line 236, in replace_materials_for_body
    swap_body_material([self.body['SMR materials']['cf_O_tooth'][0] + '.001'],'KK Fangs (tooth.001)')
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: only strings are allowed as keys of ID properties`

![23  初音 ミク_coolcoffee](https://github.com/user-attachments/assets/80b7c1a1-7fef-446d-b617-57c32ad3ea84)
MoriMorinya commented 1 month ago

Might be because there are mods that the addon doesn't recognize to export/import properly, considering the errors are all about teeth the headmod might be the problem image

The other card that is in the issue that is fixed also had this image

JohnnyStar324 commented 1 month ago

Might be because there are mods that the addon doesn't recognize to export/import properly, considering the errors are all about teeth the headmod might be the problem image

The other card that is in the issue that is fixed also had this image

Yeah, I can confirm that removing the headmods does allow for both cards to at least finish the import but strangely enough, even with the relevant zipmods installed, both the Ruby Rose card from earlier and the Miku card I'm using still spit out the same TypeError. I'm not certain if the issue was properly fixed as it was claimed to be, unless the issue lies on my end

FlailingFog commented 3 weeks ago

I closed that issue because the import finished without any errors, but I just realized that it only did that because I didn't have the zipmod for that headmod, so it fell back to the base game head.

I tried another headmod and got the same error. The headmod you're using is likely missing one of the face materials. I will put in a few checks to allow the import to finish without errors, but even after that it probably won't look correct until you manually fix it

JohnnyStar324 commented 3 weeks ago

Can confirm that the typeerror is still occurring on the latest 7.1 release. I've attached the relevant zipmods for the card I uploaded in the original post. They're all for Sunshine by the way. zipmods.zip