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

Experimental: Add SizeSort for Viewport Right Click Menu Sorting #398

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

r888800009
Copy link
Contributor

Summary

This PR introduces a new sorting method based on object size and sets in the viewport right-click menu.

Details

  • Heuristic: Prioritizing smaller objects makes it easier for users to select intricate items they are pointing at, while larger objects can still be selected by clicking elsewhere if needed.
  • Comparison:
    • Z sorting may produce unreliable results when objects contain a lot of alpha pixels.
    • Other solutions that use pixel or mesh-based intersection calculations can reduce performance and increase complexity. The SizeSort approach avoids these issues, offering a simpler alternative.
    • Combining SizeSort and ZSort to produce a composite sorting value is a potential enhancement. We can explore automatically adjusting to the optimal solution based on user feedback to further improve sorting accuracy and user experience.

Benefits

  • Enhanced usability when dealing with detailed or small components.
  • More intuitive selection process for users.

Demo

Zsort
image
size sort
image
Click the first item to toggle (zsort)
image

- Introduced SizeSort to the ViewporMenuSortMode for sorting by object size.
- Updated default sorting mode to SizeSort to facilitate easier selection of smaller, detailed objects.
@LunaTheFoxgirl
Copy link
Member

LGTM

@LunaTheFoxgirl LunaTheFoxgirl merged commit 4f9ccdb into Inochi2D:v0_8 Sep 11, 2024
1 check passed
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