foxnne / pixi

Pixel art editor made with Zig.
https://foxnne.github.io/pixi/
MIT License
645 stars 20 forks source link

Allow copying tiles/sprites from one file to another #33

Closed foxnne closed 3 weeks ago

foxnne commented 9 months ago

I'm not sure exactly how this should go, as files are likely to contain different tile sizes, but it would be very nice to be able to copy artwork from one file and paste it in another.

foxnne commented 5 months ago

I think that for this, I want to try something unusual. I'm still trying to work through the specifics, but rather than copying data to the clipboard and pasting into another file, maybe we can offer something a little more visual. We already have access to all .pixi files in the project/root folder, so we could find a convenient way to display two files side by side for copying sprites between files visually, and handling the cases where sprites are different sizes (using the same logic that the sprite packer uses to reduce images to discard transparent pixels for larger -> smaller tile size, or centering small sprites within the new larger tile size).

foxnne commented 1 month ago

Starting to work on this finally. Recently added a way to split the artboard so we can view two open files side by side.

foxnne commented 3 weeks ago

Still working on this currently, but it's possible now to copy and subsequently transform the pasted tile, either in the same or different files. Double clicking the vertical grab bar of the explorer panel or selecting the options from the view menu option allows you to split the editor into two art boards, which makes it easy to copy and paste between files.

foxnne commented 3 weeks ago

This is fully feature complete! When copying and pasting sprites, the transformation tool will allow movement, scaling, rotation, and skewing of the pasted sprite.