mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 05:44:42 -04:00
Better spritesheet exporting
You can now choose how many columns you want your spritesheet to be, allowing you to export atlases. ISSUE: If the number of columns is larger than the number of rows AND rows * columns are not equal to the number of frames, the result is weird. The exported image has transparent space on its bottom side.
This commit is contained in:
parent
4ae5968887
commit
eeaa691d36
8 changed files with 68 additions and 39 deletions
|
@ -19,10 +19,35 @@ current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρι
|
|||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ExportOption" type="OptionButton" parent="."]
|
||||
margin_right = 41.0
|
||||
margin_bottom = 20.0
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 507.0
|
||||
margin_bottom = 312.0
|
||||
text = "Export current frame"
|
||||
items = [ "Export current frame", null, false, 0, null, "Export all frames as multiple files", null, false, 1, null, "Export all frames as a horizontal spritesheet (single file)", null, false, 2, null, "Export all frames as a vertical spritesheet (single file)", null, false, 3, null ]
|
||||
items = [ "Export current frame", null, false, 0, null, "Export all frames as multiple files", null, false, 1, null, "Export all frames as a spritesheet (single file)", null, false, 2, null ]
|
||||
selected = 0
|
||||
|
||||
[node name="Spritesheet" type="HBoxContainer" parent="."]
|
||||
visible = false
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 507.0
|
||||
margin_bottom = 312.0
|
||||
|
||||
[node name="Label" type="Label" parent="Spritesheet"]
|
||||
margin_left = 200.0
|
||||
margin_top = 145.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 159.0
|
||||
text = "Columns:"
|
||||
|
||||
[node name="VerticalFrames" type="SpinBox" parent="Spritesheet"]
|
||||
margin_left = 304.0
|
||||
margin_right = 378.0
|
||||
margin_bottom = 304.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
value = 1.0
|
||||
[connection signal="file_selected" from="." to="." method="_on_ExportSprites_file_selected"]
|
||||
[connection signal="item_selected" from="ExportOption" to="." method="_on_ExportOption_item_selected"]
|
||||
[connection signal="value_changed" from="Spritesheet/VerticalFrames" to="." method="_on_VerticalFrames_value_changed"]
|
||||
|
|
|
@ -21,14 +21,14 @@ margin_right = 507.0
|
|||
margin_bottom = 312.0
|
||||
|
||||
[node name="ImportAsNewFrame" type="CheckBox" parent="HBoxContainer2"]
|
||||
margin_right = 130.0
|
||||
margin_bottom = 40.0
|
||||
margin_right = 156.0
|
||||
margin_bottom = 304.0
|
||||
text = "IMPORT_FILE_LABEL"
|
||||
|
||||
[node name="ImportSpritesheet" type="CheckBox" parent="HBoxContainer2"]
|
||||
margin_left = 134.0
|
||||
margin_right = 268.0
|
||||
margin_bottom = 40.0
|
||||
margin_left = 160.0
|
||||
margin_right = 327.0
|
||||
margin_bottom = 304.0
|
||||
text = "Import as spritesheet"
|
||||
|
||||
[node name="Spritesheet" type="HBoxContainer" parent="."]
|
||||
|
@ -48,6 +48,7 @@ text = "Horizontal frames:"
|
|||
margin_left = 105.0
|
||||
margin_right = 159.0
|
||||
margin_bottom = 17.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
value = 1.0
|
||||
|
||||
|
@ -62,6 +63,7 @@ text = "Vertical frames:"
|
|||
margin_left = 252.0
|
||||
margin_right = 306.0
|
||||
margin_bottom = 17.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
value = 1.0
|
||||
[connection signal="files_selected" from="." to="." method="_on_ImportSprites_files_selected"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue