Skip to content
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

Sort groups by Collection #21

Open
Jordan-64 opened this issue Jul 20, 2023 · 1 comment
Open

Sort groups by Collection #21

Jordan-64 opened this issue Jul 20, 2023 · 1 comment

Comments

@Jordan-64
Copy link

Jordan-64 commented Jul 20, 2023

Is it possible that the groups are sorted in the following order?

eg. I have 2 collections and want the groups of the 1st collection to be at the beginning and then the groups of the 2nd collection.

Scene Collection
____First Collection
________Mesh01
________Mesh02
____Second Collection
________Mesh01.001
________Mesh02.001

Currently the groups are sorted by their names
Mesh01
Mesh01.001
Mesh02
Mesh02.001

But I want them like this
Mesh01
Mesh02
Mesh01.001
Mesh02.001

Maybe this helps
https://blender.stackexchange.com/questions/144928/how-to-list-all-collections-and-their-objects

@BMCDad
Copy link
Owner

BMCDad commented Jul 25, 2023

Unfortunately, this does not appear to be as easy as I had hoped. Currently sorting is done based on an attribute of the object, either the 'Sort' property which the script adds (Sort Order) or the actual name of the object. You can then select how sorting works. I had hoped the collection an object belongs to could be treated the same, but that does not appear to be the case. Specifically, an object can belong to multiple collections, so treating the collection as a property of the object is not simple.

Another option I looked into was to output in the order that they appear in the outliner window. You still have the possibility of duplicates, but that could probably he handled. The bigger issue is that the outliner appears to be tied to the context. The script needs to be able to output all scenes regardless of the current context. I did not dig too deeply here, and I may come back to it, but depending on context becomes problematic.

So in short, this is not something that will happen soon. I am still personally interested in how collections can be used to make modelling for Orbiter cleaner, so I am not abandoning this. Just it won't be anything I implement in the near term.

Sorry.

I will leave the issue open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants