From 44fd75fcb9289bbedb92d5cd291f5382a97146ba Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 22 Jan 2025 22:06:58 +0200 Subject: [PATCH] Add layer type icons to layer buttons in the timeline Icons made by @Erevoid --- .../graphics/layers/type_icons/layer_3d.png | Bin 0 -> 138 bytes .../layers/type_icons/layer_3d.png.import | 34 ++++++++++++++++++ .../layers/type_icons/layer_group.png | Bin 0 -> 126 bytes .../layers/type_icons/layer_group.png.import | 34 ++++++++++++++++++ .../layers/type_icons/layer_pixel.png | Bin 0 -> 106 bytes .../layers/type_icons/layer_pixel.png.import | 34 ++++++++++++++++++ .../layers/type_icons/layer_sound.png | Bin 0 -> 144 bytes .../layers/type_icons/layer_sound.png.import | 34 ++++++++++++++++++ .../layers/type_icons/layer_tilemap.png | Bin 0 -> 117 bytes .../type_icons/layer_tilemap.png.import | 34 ++++++++++++++++++ src/UI/Timeline/AnimationTimeline.tscn | 1 - src/UI/Timeline/LayerButton.gd | 9 +++++ src/UI/Timeline/LayerButton.tscn | 14 +++++++- 13 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 assets/graphics/layers/type_icons/layer_3d.png create mode 100644 assets/graphics/layers/type_icons/layer_3d.png.import create mode 100644 assets/graphics/layers/type_icons/layer_group.png create mode 100644 assets/graphics/layers/type_icons/layer_group.png.import create mode 100644 assets/graphics/layers/type_icons/layer_pixel.png create mode 100644 assets/graphics/layers/type_icons/layer_pixel.png.import create mode 100644 assets/graphics/layers/type_icons/layer_sound.png create mode 100644 assets/graphics/layers/type_icons/layer_sound.png.import create mode 100644 assets/graphics/layers/type_icons/layer_tilemap.png create mode 100644 assets/graphics/layers/type_icons/layer_tilemap.png.import diff --git a/assets/graphics/layers/type_icons/layer_3d.png b/assets/graphics/layers/type_icons/layer_3d.png new file mode 100644 index 0000000000000000000000000000000000000000..1b262d7a3bf226fd867b89997d455a3c4a9f80af GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}E}kxqAsQ36 zPH^O7P~>5feEffZjDPkjIi1-jrYde(u%v?{wuSk;LmOjR#z)y793fX^A|~xBKDWMY kJ7dEqulxN=+iXrSY?4#q+`HnwCD1$uPgg&ebxsLQ05yRvY5)KL literal 0 HcmV?d00001 diff --git a/assets/graphics/layers/type_icons/layer_3d.png.import b/assets/graphics/layers/type_icons/layer_3d.png.import new file mode 100644 index 000000000..4c2cbc44d --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_3d.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0h02b3g41jn4" +path="res://.godot/imported/layer_3d.png-d1d129c484dc412c7f65f43e3ab214de.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_3d.png" +dest_files=["res://.godot/imported/layer_3d.png-d1d129c484dc412c7f65f43e3ab214de.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_group.png b/assets/graphics/layers/type_icons/layer_group.png new file mode 100644 index 0000000000000000000000000000000000000000..4b07f55ea14be5413844d9fa0588cb25759c5771 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}7M?DSAsQ2t z|NQ^|zn)E|VdBJzg0VfE)01KvSZ8Pc$Wgt?=2o*T@F?4wx&v$pdWtvMZe=g1)nH^0 XN)i!Twk3=OXa<9)tDnm{r-UW|S>Yx- literal 0 HcmV?d00001 diff --git a/assets/graphics/layers/type_icons/layer_group.png.import b/assets/graphics/layers/type_icons/layer_group.png.import new file mode 100644 index 000000000..a4adf218f --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_group.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvg3wqi6p6s14" +path="res://.godot/imported/layer_group.png-7073d09db245e0abdadd33a0d4a32e4d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_group.png" +dest_files=["res://.godot/imported/layer_group.png-7073d09db245e0abdadd33a0d4a32e4d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_pixel.png b/assets/graphics/layers/type_icons/layer_pixel.png new file mode 100644 index 0000000000000000000000000000000000000000..ccfb8a48fdf9fa046ec3e3dfb209feaa23beb107 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}DxNNmAsQ2t z6Bd{zv>5*T|Np=IdM7tGH#Q(p3(A$aYGA>@Fv*xj;Mt^*M4);GPgg&ebxsLQ00p5N AwEzGB literal 0 HcmV?d00001 diff --git a/assets/graphics/layers/type_icons/layer_pixel.png.import b/assets/graphics/layers/type_icons/layer_pixel.png.import new file mode 100644 index 000000000..78c79251c --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_pixel.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjvk47bd56156" +path="res://.godot/imported/layer_pixel.png-5cb5e362528cc5d24159d624e17c1760.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_pixel.png" +dest_files=["res://.godot/imported/layer_pixel.png-5cb5e362528cc5d24159d624e17c1760.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_sound.png b/assets/graphics/layers/type_icons/layer_sound.png new file mode 100644 index 0000000000000000000000000000000000000000..6049edb1932714f4ba028b9bfff0f5a93535e0a7 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}UY;(FAsQ36 zPCUrPV8G#I`s;su-txw7x7QoWMV1;lb#yp1m$vnUD|x2n`pf(Okk`l$C@PNYG&g3r p;r-n`At{gfr~I9!b)mMtkvBqR1YH`>dIL>m@O1TaS?83{1OPNyExrH% literal 0 HcmV?d00001 diff --git a/assets/graphics/layers/type_icons/layer_sound.png.import b/assets/graphics/layers/type_icons/layer_sound.png.import new file mode 100644 index 000000000..03fed4059 --- /dev/null +++ b/assets/graphics/layers/type_icons/layer_sound.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctkhyfr6idb3u" +path="res://.godot/imported/layer_sound.png-6a1e2becb20b310be6eb52c40325fe0a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/layers/type_icons/layer_sound.png" +dest_files=["res://.godot/imported/layer_sound.png-6a1e2becb20b310be6eb52c40325fe0a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/layers/type_icons/layer_tilemap.png b/assets/graphics/layers/type_icons/layer_tilemap.png new file mode 100644 index 0000000000000000000000000000000000000000..7fe318d4e5680386af39e5b7fdc45f8b1f7f476a GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}`kpS1AsQ2t z|NQ^|zn)EqL0Gd(QbIx^B7w&Z2qdJ_w9O1B void: custom_minimum_size.y = Global.animation_timeline.cel_size label.text = layer.name line_edit.text = layer.name + layer_type_texture_rect.texture = ARRAY_TEXTURE_TYPES[layer.get_layer_type()] for child in $HBoxContainer.get_children(): if not child is Button: continue diff --git a/src/UI/Timeline/LayerButton.tscn b/src/UI/Timeline/LayerButton.tscn index 02267e664..edefd1a3d 100644 --- a/src/UI/Timeline/LayerButton.tscn +++ b/src/UI/Timeline/LayerButton.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://bai814sqvk68f"] +[gd_scene load_steps=9 format=3 uid="uid://bai814sqvk68f"] [ext_resource type="Script" path="res://src/UI/Timeline/LayerButton.gd" id="1_6hlpe"] [ext_resource type="Texture2D" uid="uid://c2b3htff5yox8" path="res://assets/graphics/layers/layer_visible.png" id="2_ef6fb"] @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://cofw1x6chh4i" path="res://assets/graphics/layers/unlinked_layer.png" id="4_058qm"] [ext_resource type="Texture2D" uid="uid://ieo8fsapcgsy" path="res://assets/graphics/layers/clipping_mask.png" id="6_73j5q"] [ext_resource type="Script" path="res://src/UI/Timeline/LayerMainButton.gd" id="6_n8q6b"] +[ext_resource type="Texture2D" uid="uid://cjvk47bd56156" path="res://assets/graphics/layers/type_icons/layer_pixel.png" id="8_ce16y"] [node name="LayerButton" type="HBoxContainer"] anchors_preset = 15 @@ -165,6 +166,17 @@ editable = false caret_blink = true caret_blink_interval = 0.5 +[node name="LayerTypeTextureRect" type="TextureRect" parent="LayerMainButton/LayerName" groups=["UIButtons"]] +unique_name_in_owner = true +modulate = Color(1, 1, 1, 0.498039) +layout_mode = 2 +texture = ExtResource("8_ce16y") +stretch_mode = 3 + +[node name="MarginSpacer" type="Control" parent="LayerMainButton/LayerName"] +custom_minimum_size = Vector2(4, 0) +layout_mode = 2 + [node name="PopupMenu" type="PopupMenu" parent="."] disable_3d = true item_count = 2