FlailingFog / KK-Blender-Porter-Pack

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

Cannot prep a model that was automatically categorized #381

Closed FrankV724 closed 1 year ago

FrankV724 commented 1 year ago

As the title says, I selected 'Automatically Categorize' in the import options because it makes it easier for me in the shading stage to put each piece of clothing in a collection of tops, bottoms, accessories, etc. However, now that I'm ready to prep the character for the next step, this is what happens after clicking the button:

Prepping for export...
Moving unused objects to their own collection...
Removing object outline modifier...

Error:          Unknown python error occurred
Traceback (most recent call last):
  File "C:\Users\Frank\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\KK-Blender-Porter-Pack-641\exporting\exportprep.py", line 251, in execute
    main(prep_type, simp_type)
  File "C:\Users\Frank\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\KK-Blender-Porter-Pack-641\exporting\exportprep.py", line 47, in main
    if ob.type == 'MESH' and ob in bpy.context.view_layer.objects:
TypeError: bpy_prop_collection.__contains__: expected a string or a tuple of strings

I loaded the character again in a new project from scratch, and the issue appears right after importing, meaning that, somehow, setting 'Automatically Categorize' is the source of the issue.

Koikatu_F_20220915150434826_Key Key_key

Thanks for the help!

BlueScreenofDeath201 commented 1 year ago

I get the same thing trying to prep with the default "dont pause" option as well. Simply cannot prep for target application at all without getting this error.

firemonkey2 commented 1 year ago

i also got the same error

BlueScreenofDeath201 commented 1 year ago

Temporary Fix: Utilize Blender 3.3.3 with KKBP 6.2.1(With appropriate exporter of course) and prep target there. Then open the file in Blender 3.4+ with the new KKBP and you can still use all the new features of baking and finalizing.

nizhuan-jjr commented 1 year ago

Here are my two edits to the exportprep.py; the prep works for me now. 0 1 The code could still be improved though, especially the second part, I'm not sure my edit is an optimized one.

FrankV724 commented 1 year ago

Temporary Fix: Utilize Blender 3.3.3 with KKBP 6.2.1(With appropriate exporter of course) and prep target there. Then open the file in Blender 3.4+ with the new KKBP and you can still use all the new features of baking and finalizing.

@BlueScreenofDeath201 I've already done a bunch of mesh editing and texture fixing on my current save in blender 3.4, and I don't want to do aaaaall that again 😭 Still, thank you for the temp fix!

FrankV724 commented 1 year ago

@nizhuan-jjr it took forever, but it worked! Thanks a lot for your edit!

nizhuan-jjr commented 1 year ago

@nizhuan-jjr it took forever, but it worked! Thanks a lot for your edit!

You don't need to close this issue too soon. The main contributors of KKBP should be informed. @FlailingFog @MediaMoots @castbohea

FlailingFog commented 1 year ago

Oops, I changed this line but didn't test it because I did not want to wait for it to process. It should work in the master branch now.