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

feat: sorted formation objects #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thomas-advantitge
Copy link
Contributor

This helps to have a configurable order when using objects with vertex groups in order to use formation_index more easily.

@ntamas
Copy link
Member

ntamas commented May 16, 2024

This PR would also affect the behaviour of get_selected_objects_from_collection() because that uses get_selected_objects() internally. Furthermore, it would contradict the documentation of get_selected_objects_from_collection() because the documentation states that get_selected_objects_from_collection() returns the objects in the same order as they appear in context.selected_objects, which is not true anymore after this modification.

Can I suggest adding a sort: bool = False keyword argment to get_selected_objects() instead? You could then do the sort only when sort = True, and call get_selected_objects() with sort = True if needed. Sorry for being picky, I just don't see clearly what additional implications it would have to pre-sort the objects automatically and I don't want to break any existing behaviour.

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

Successfully merging this pull request may close these issues.

2 participants