-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add multi-selection for SpriteFramesEditor
#85494
Add multi-selection for SpriteFramesEditor
#85494
Conversation
Static check failed, you should apply the clang-format tool to format it properly. After making the change, don't forget to squash commits (see https://docs.godotengine.org/en/latest/contributing/workflow/pr_workflow.html#modifying-a-pull-request). |
cc14c00
to
698a370
Compare
I feel like the move left and move right command are over complicated. It moves all the selected animation (with gap in selection), which is great, but is it really useful? |
How do I apply the clang-format tool? using scons? |
|
698a370
to
ffd9a17
Compare
ffd9a17
to
32dae1d
Compare
32dae1d
to
077a4f7
Compare
SpriteFramesEditor
Deleting frames should also remove selection, otherwise it looks confusing. godot.windows.editor.dev.x86_64_QWbMGUQzzJ.mp4EDIT: EDIT2: godot.windows.editor.dev.x86_64_zPOTQrfeUz.mp4 |
From what I tested with the current build of godot (4.2.1). it works like what you see with my PR. You want me to change the current behavior? |
Looks like the current behavior is not that great :/ |
use multi-selection for copy/paste move up or down frame duration set while multi-selected
077a4f7
to
8faba24
Compare
I'll leave the selection behavior like it is now, but I agree with you it's not great. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Nice, I'll have to try this one! While I agree that deleting selected entries should clear selection in general, I see a point, on single delete, in selecting the new sprite replacing the deleted sprite at the same slot (or the one before if deleting the last sprite), so user can chain delete if they want to. This would have to be combined with godotengine/godot-proposals#9387 so user keeps focus and can chain usage of the Delete key, or do some other operations like changing the Frame Duration multiplier (it really shines when doing many of these operations - like "merging" identical sprite frames together by removing all the duplicates and setting the Frame Duration multiplier). Currently, clicking the bin button actually does that, so you can chain delete by clicking on the bin button multiple times. Now it's a technique I learned because batch selection was not implemented and it becomes much less useful now that we can delete multiple sprite frames at once. However it's worth considering the current behavior of single delete, whether with Delete key or bin button, to decide whether or not to maintain selection. That said, in the case of multi-selection delete, I agree it's confusing. In fact, in an app like Ubuntu's Image Viewer / Eye of Gnome, when the Image Gallery is opened at the bottom, if you multi-select images and Delete them, the selection will fallback back to the image right after the last selected deleted entry (or before if last entry was deleted). So still a unique selection. To sum up, we may want to preserve the single delete behavior of falling back to the next available entry, but when deleting multiple frames, it may be less confusing to fall back selection to just the next available entry after the last selected frame (whether "last" means "last selected" or "last in chronological order" would remain to be decided). |
Enabled multi-selection in the sprite_frame_editor
This was proposal #1696
You can now use multi-selections with CTR to add or remove a frame. Shift to selection until selection.
With a multi-selection you can:
Copy and Paste multiple-frame
Since you can't put arrays of frame in the Editor clipboard, I've remove it and saved the data locally.
Move left or right selected frame
For example, if you have 1 and 3 selected and press move right, you will have 2,1,4,3.
Set frame duration to all selected frame.
Takes the first frame for the duration value.
Add empty frame, after or before the selection
Delete multiple frame at the same time
I didn't see a way to add test for this class. Anything I can do?
Bugsquad edit: