Create a function that exports a sprite sheet using layers.
Sprite Sheet is an image that consists of several smaller images. Combining small images(frames/sprites) into one big image "grid"(sprite sheet).
Explanation
For example we have an image where character parts (Also it can be used for sprite sheet animation of character) are on separate layers.
When we use a sprite sheet function we can see the dialog where we can adjust settings for your sprite sheet.
We can change this settings (Also it would nice to preview what we are changing):
Layout:
Sheet types: Horizontal strip(Each frame side by side); Vertical strip(Each frame one below the other); by Rows(create one row for each layer); by Columns(create one column for each layer) and Packed(try to fit all frames in the best possible way) (How sheet is created)Constraints: none; fixed width; fixed height; fixed size. (Special constraints for the sprite sheet. E.g. fixed number of rows/columns or fixed number of pixels width/height)
Flags:
Merge Duplicates (Merge duplicate layers)
Ignore Empty (Ignores empty layers)
Sprites:
Layers: Visible layers; Selected layers; Group of layers. (Which layers are used to create sprite sheet)
Borders:
Border Padding (Space between each frame and the edge of the sprite sheet)
Spacing (Space between each frame in the sprite sheet)
Inner Padding (Extra space inside frame edges)
Flags:
Trim Sprite (Trims sprite sheet)
Trim Cels (Trims each frame separately)
By Grid (Trims by grid boundaries instead of pixel by pixel)
Result
When we press the export button blockbench will open another project with the ready sprite sheet image.
Based on your settings you will have an result, for example:
Detailed description of your suggestion
Function
Create a function that exports a sprite sheet using layers.
Sprite Sheet is an image that consists of several smaller images. Combining small images(frames/sprites) into one big image "grid"(sprite sheet).
Explanation
For example we have an image where character parts (Also it can be used for sprite sheet animation of character) are on separate layers.![image](https://github.com/JannisX11/blockbench/assets/50903186/5ec61559-d856-4f86-904c-ae5695fe3a03)
When we use a sprite sheet function we can see the dialog where we can adjust settings for your sprite sheet.![image](https://github.com/JannisX11/blockbench/assets/50903186/e37f37f2-a967-4985-9fad-4a2da39d014b)
We can change this settings (Also it would nice to preview what we are changing):
Layout:
Sheet types: Horizontal strip(Each frame side by side); Vertical strip(Each frame one below the other); by Rows(create one row for each layer); by Columns(create one column for each layer) and Packed(try to fit all frames in the best possible way) (How sheet is created) Constraints: none; fixed width; fixed height; fixed size. (Special constraints for the sprite sheet. E.g. fixed number of rows/columns or fixed number of pixels width/height)
Flags:
Sprites:
Layers: Visible layers; Selected layers; Group of layers. (Which layers are used to create sprite sheet)
Borders:
Border Padding (Space between each frame and the edge of the sprite sheet) Spacing (Space between each frame in the sprite sheet) Inner Padding (Extra space inside frame edges)
Flags:
Result
When we press the export button blockbench will open another project with the ready sprite sheet image. Based on your settings you will have an result, for example:![image](https://github.com/JannisX11/blockbench/assets/50903186/3746c462-f278-4787-a6e5-685f814d448b)