New selection transformation system - #1245
Merged
OverloadedOrama merged 64 commits intoMay 23, 2025
Merged
Conversation
The idea is to remove all transformation-related code from Selection.gd and bring it to the new script instead.
…been resized from the left or the top And sometimes when it was moved. Order of matrix multiplications matter, even if it's a matrix multiplied with a vector.
Not working yet, full of errors. This is going to be a pain.
Selection tools work, but trying to move a selection crashes, which is to be expected.
No preview while transforming yet
Content is not being cut yet when starting moving, and the rest of the transformation types need to call begin_transform. The confirm and cancel buttons in the tool options do not appear correctly, and the preview is wrong, it needs to be rotated and applied to the image, similar to the selection map
…fore This bug comes from the master branch
…utside of a selected pixel, but inside the bounding rectangle
…egative coords The content's offset is wrong though, it starts at the top-left position of the selection.
… matrix is the exact same as the original one
Need to fix undo/redo for it to work properly
Does not work 100% of the time, it gives errors sometimes, but it's better than before. Unlike the previous resize system, the transform matrix has its own space instead of being in the canvas space, so clamping its position is trickier.
Remove more references to the now removed big_bounding_rectangle
…making a new selection while a transformation is active
… + arrow key This is a bug from the master branch.
…been rotation/shear
Due to them being in different formats
Does not work properly with the transformation handles though
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completely remade the selection transformation system in order to finally support selection rotation & shearing, with the option to change the pivot. I first made the new system in a separate project (https://github.com/OverloadedOrama/TransformHandles2D) and then implemented it to Pixelorama.
Users can choose between Nearest Neighbor, cleanEdge and OmniScale transformation algorithms. Rotxel is not supported because it works with an angle value and not a matrix.
Transforming a selection without image content now acts the same as transforming with image content, meaning that you need to confirm the change, and you are able to cancel it.
Fixes:
Tested:
Input.is_action_pressed(&"transform_move_selection_only")