FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
304 stars 28 forks source link

RuntimeError: Error: Nothing selected #516

Closed Eufalesio closed 2 months ago

Eufalesio commented 3 months ago

This error appears while some characters are loading and it refuses to apply the textures onto anything. Why is it telling me "Nothing selected"?

Captura de pantalla 2024-01-20 a las 1 54 39

Chika and other characters work flalessly...

Captura de pantalla 2024-01-19 a las 23 23 53

I used KKBP Porter Pack 6.0.0, Blender 3.3.15, inside Koikatsu with HF Patch 3.23. I tried using the latest KKBP with Blender 3.6.2 but with that setup, all characters end up with completely white hair and eyebrows and incredibly innacurate lighting/shaders.

Here is the log:

bpy.context.space_data.system_bookmarks_active = 5 Modules Installed (KK-Blender-Porter-Pack-V6-0-0) from '/Users/Eufalesio/Downloads/KK-Blender-Porter-Pack-V6.0.0.zip' into '/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons' bpy.data.window_managers["WinMan"].addon_search = "" bpy.data.window_managers["WinMan"].addon_search = "cat" Modules Installed (cats-blender-plugin-0-19-0) from '/Users/Eufalesio/Downloads/cats-blender-plugin-0-19-0.zip' into '/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons' bpy.context.space_data.system_bookmarks_active = 4 bpy.context.space_data.system_bookmarks_active = 5 bpy.context.space_data.system_bookmarks_active = 5 bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_add() bpy.ops.mmd_tools.import_model(filepath="/Users/Eufalesio/Downloads/20240120012841_Yáðu/model.pmx", files=[{"name":"/Users/Eufalesio/Downloads/20240120012841_Yáðu/model.pmx", "name":"/Users/Eufalesio/Downloads/20240120012841_Yáðu/model.pmx"}], directory="/Users/Eufalesio/Downloads/20240120012841_Yáðu/model.pmx", types={'MESH', 'ARMATURE', 'MORPHS'}, scale=1, log_level='WARNING') bpy.ops.mmd_tools.import_model(filepath="/Users/Eufalesio/Downloads/20240120012841_Yáðu/Outfit 00/model.pmx", files=[{"name":"/Users/Eufalesio/Downloads/20240120012841_Yáðu/Outfit 00/model.pmx", "name":"/Users/Eufalesio/Downloads/20240120012841_Yáðu/Outfit 00/model.pmx"}], directory="/Users/Eufalesio/Downloads/20240120012841_Yáðu/Outfit 00/model.pmx", types={'MESH'}, scale=1, log_level='WARNING') bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.posemode_toggle() bpy.ops.object.posemode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='INVERT') bpy.ops.armature.delete() bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='DESELECT') bpy.ops.armature.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.kkb.finalizepmx() bpy.ops.kkb.shapekeys() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.mesh.mark_freestyle_face(clear=False) bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.material_slot_remove_unused() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_assign() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.material_slot_remove_unused() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_move(direction='UP') bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.move_to_collection(collection_index=0, is_new=True, new_collection_name="Shadowcast Collection") bpy.ops.object.move_to_collection(collection_index=0, is_new=True, new_collection_name="Hitbox Collection") bpy.ops.object.editmode_toggle() bpy.ops.object.material_slot_select() bpy.ops.mesh.remove_doubles(threshold=1e-05) bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_select() bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.transform.translate(value=(0, 0.0445981, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, True, True), mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False) bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_move(type='TOP') bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_move(type='TOP') bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_move(type='TOP') bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.transform.translate(value=(0, -0.0445981, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, True, True), mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False) bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.transform.translate(value=(0, -0.0445981, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, True, True), mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False) bpy.ops.object.editmode_toggle() bpy.ops.object.shape_key_add(from_mix=False) bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.material_slot_select() bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.transform.translate(value=(0, -0.0445981, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, True, True), mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False) bpy.ops.object.editmode_toggle() bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.vertex_group_add() bpy.ops.mesh.select_all(action='SELECT') bpy.ops.object.editmode_toggle() bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='DESELECT') Python: Traceback (most recent call last): File "/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V6-0-0/importing/importbuttons.py", line 88, in execute bpy.ops.kkb.separatebody('INVOKE_DEFAULT'), File "/Applications/Blender 3.3.15.app/Contents/Resources/3.3/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 "/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V6-0-0/importing/separatebody.py", line 648, in execute make_tear_and_gag_shapekeys() File "/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V6-0-0/importing/separatebody.py", line 402, in make_tear_and_gag_shapekeys separate_materials(body, tearMats) File "/Users/Eufalesio/Library/Application Support/Blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V6-0-0/importing/separatebody.py", line 126, in separate_materials bpy.ops.mesh.separate(type='SELECTED') File "/Applications/Blender 3.3.15.app/Contents/Resources/3.3/scripts/modules/bpy/ops.py", line 113, in __call__ ret = _op_call(self.idname_py(), None, kw) RuntimeError: Error: Nothing selected bpy.ops.kkb.quickimport(filepath="/Users/Eufalesio/Downloads/20240120012841_Yáðu/model.pmx")

Eufalesio commented 2 months ago

Turns out, some particular plugins I have that allow me to put hair objects (from the Hair tab) in accessories break KKBP. Also, characters must have the Face Type 01 in order to import correctly, otherwise they break.

My only fully working version so far is KKBP 6.2.1, Blender 3.3.15, HF Patch 3.23, mmdtools 2.9 or 2.10. It imports textures almost correctly and fully lets me Rigify the characters for use in Blender.