-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SM64] Sort Level Objects Alphabetically #336
Conversation
Is there any reason whirlpools and mario starts don't have a separate list like specials, macros, puppy cam volumes, etc? |
I don't believe there is any special reason, I think it just categorically was grouped as part of the |
wait really? I checked the hacker implementation and they don't create any objects, ao I guess that's hacker specific? sorry about that aha, if that is the case then this looks perfect already, I will do a level export later today and then if everything is correct I will get this merged |
It seems objects are getting sorted correctly by blender which I don´t remember being the case? In fact this pr broke correct order by putting capitalized names first, if the objective is to have the same types of objects be placed in order then why not sort by model and behavior and presets (for macros) |
What I meant is for grouping. Mario start and whirlpools aren't objects, but they're chunked together in the same lists as objects in the area level script, so that's why I believe it was coded that way. There's no actual reason it has to be. |
The goal was to allow the user to sort the objects. I don't know if that is always by model or by behavior. I think the original reason this was brought up was due to some kaze thing where he needed stuff in a specific order. I also closed by accident I didn't know deleting a comment closed the PR lol |
at least in blender 4.1 it seems objects are getting sorted in the UI and in the actual data. |
I'd prefer to sort by what the UI has, that's the most intuitive. I'll have to add an ignore case to the sort to fix it. |
I really tried understanding how this works but I'm having a really hard time understanding the blender source code |
Ok from what I did understand the order in the UI isn't achieved with any form of conventional name sorting specifically, and we should not rely on the order of bpy.data.objects, your original implementation is consistent and that's good |
My experience from 3.X is the order always matched string ordering. Capital letters First, then lowers, alphabetical order in those sets. It always did this as far as I'm aware, but maybe in some versions past 3.6 it didn't, but I don't use those. This is the same way python sorts strings. |
added sorting to object exports in sm64. Actors are sorted alphabetically. This will generally make it so the same type of object all export in a row since these will have names like: coin, coin.001, coin.002 etc.