Skip to content

Commit f1355ec

Browse files
committed
Complete the right side menu with all necessairy options
1 parent 187bc66 commit f1355ec

7 files changed

Lines changed: 354 additions & 33 deletions

File tree

Application.theme

671 Bytes
Binary file not shown.

FileDialog.theme

17 Bytes
Binary file not shown.

MainApplication.tscn

Lines changed: 303 additions & 33 deletions
Large diffs are not rendered by default.

assets/icons/NodeInfo.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/icons/NodeInfo.svg.import

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dd8vsjtuc2gp1"
6+
path="res://.godot/imported/NodeInfo.svg-4226c01997fbeb0caf2624775841ea62.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/icons/NodeInfo.svg"
14+
dest_files=["res://.godot/imported/NodeInfo.svg-4226c01997fbeb0caf2624775841ea62.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/lossy_quality=0.7
20+
compress/hdr_compression=1
21+
compress/bptc_ldr=0
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
35+
svg/scale=1.4
36+
editor/scale_with_editor_scale=false
37+
editor/convert_colors_with_editor_theme=false

scripts/Application.gd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,21 @@ signal active_item_changed(item: ProcessedImage)
1515

1616
signal crop_size_changed(size: Vector2i)
1717

18+
19+
enum FILE_FORMATS {SAME_AS_INPUT = 0, PNG = 1, JPEG = 2, WEBP = 3}
20+
21+
1822
var currently_loaded_files: Array[ProcessedImage] = []
1923

2024
var current_loading_index := 0
2125
var currently_active_item: ProcessedImage
2226

27+
var output_path: String = ""
28+
var current_file_format : FILE_FORMATS = FILE_FORMATS.SAME_AS_INPUT
29+
30+
# Possible entries {directory_tree}, {file},{extension}, {index}, {width}, {height}, {rotations}, {rect.x}, {rect.y}, {rect.width}, {rect.height}
31+
var output_template: String = "{directory_tree}{file}.{extension}"
32+
2333
var crop_to_size: Vector2i = Vector2i(512,512) :
2434
set(value):
2535
crop_to_size = value
@@ -51,6 +61,7 @@ var entry_path: String = "" :
5161
entry_path = value
5262
if different:
5363
_entry_path_changed()
64+
5465

5566
func _ready() -> void:
5667

scripts/ProcessedImage.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var source_path: String
1111
var processed_path: String
1212
var is_currently_loaded := false
1313
var was_already_exported := false
14+
var relative_path: String
1415

1516
var original_texture : Texture2D = null
1617
var preview_texture : Texture2D = null
@@ -30,6 +31,7 @@ var is_active: bool = false :
3031
func _init(index: int, source_path: String) -> void:
3132
self.index = index
3233
self.source_path = source_path
34+
self.relative_path = source_path.replace(Application.entry_path, "")
3335

3436
func load_image() -> void:
3537

0 commit comments

Comments
 (0)