Replacing logic for 'hide_unused_objects' code block due to unrecognized keyword #5
Labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kkbp-dev/KKBP_Importer#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First off, I'm so glad this project is finally alive again! I was checking the last youtube video every few days for an update, and I'm so happy that the project is back up!
Anyway, using Blender 5.0, the new beta for KKBP, and on MMDTools 4.5.2, I exported a default Chika with Variations and All Outfits, and I got this error block during import:
Following that trace to line 85, I saw this:
Extremely confusing indeed. And after going to ChatGPT for some assistance, it told me that
bpy.ops.object.move_to_collection()does not supportcollection_index, which is odd since it's on the project for a reason. This is a source it gave me.After fixing THAT issue, I got another error for the last line in the
for index, id in enumerate(outfit_ids):block:Looking at the project after the error, it completely failed to create the extra Alt collections other than the 00 and move it inside the Outfit collection, while the meshes were just sitting inside the rig.
So after some back and forth, GPT ended up giving me this replacement for the entire
for index, id in enumerate(outfit_ids):block:I tried it, and it looks like it worked well. No error was raised this time, and every Alt collection for each outfit went into their respective Outfit collection, and it all was properly disabled except for Outfit 00.
Not sure how much credit I can take, since I simply asked GPT for help on those error messages and asked for corrections, but I hope this is a fair replacement.
Oh I've also noticed this issue several days ago, and I tried to fix it myself by editing L65~88 to
It works on exporting just one outfit, however I've not test it on multiple outfits.
@Windy_D
I've only tested the one I got with multiple outfits, and it settles onto Outfit 00 with the Alt 00 collection inside it, same with Outfit 01 - > Alt 01, Outfit 02 - > Alt 02, and so on. I haven't tested it with just one outfit or without alts.
Thanks guys, I decided to just replace the line with "c.move_and_hide_collection(...". It should be fixed in the latest beta release. I know it puts the alts on the outside of the outfit collections, but I think I like it better that way anyway because you don't have to have the clothes collections expanded to show / hide the alts.