mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 15:39:49 +00:00
48326900d9
Removed the "frame_container" property from Layer.gd, which used to hold a reference to a node, leading to orphan nodes being created and never freed. Memory management seems to be working okay now. Previously, every time the user made a change, memory kept going up and never coming down. Now, data that can never be recovered, like undo data that have been rewritten in history, are also removed from memory.
163 lines
4.5 KiB
Plaintext
163 lines
4.5 KiB
Plaintext
[gd_scene load_steps=5 format=2]
|
|
|
|
[ext_resource path="res://src/UI/Timeline/LayerButton.gd" type="Script" id=1]
|
|
[ext_resource path="res://assets/graphics/layers/layer_visible.png" type="Texture" id=2]
|
|
[ext_resource path="res://assets/graphics/layers/unlock.png" type="Texture" id=3]
|
|
[ext_resource path="res://assets/graphics/layers/unlinked_layer.png" type="Texture" id=4]
|
|
|
|
[node name="LayerContainer" type="Button"]
|
|
margin_right = 210.0
|
|
margin_bottom = 36.0
|
|
rect_min_size = Vector2( 212, 36 )
|
|
mouse_default_cursor_shape = 2
|
|
size_flags_horizontal = 0
|
|
toggle_mode = true
|
|
action_mode = 0
|
|
script = ExtResource( 1 )
|
|
__meta__ = {
|
|
"_edit_horizontal_guides_": [ ],
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
size_flags_horizontal = 0
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="EmptySpacer" type="Control" parent="HBoxContainer"]
|
|
margin_bottom = 36.0
|
|
|
|
[node name="LayerButtons" type="HBoxContainer" parent="HBoxContainer"]
|
|
margin_left = 4.0
|
|
margin_right = 90.0
|
|
margin_bottom = 36.0
|
|
custom_constants/separation = 10
|
|
|
|
[node name="VisibilityButton" type="Button" parent="HBoxContainer/LayerButtons" groups=["UIButtons"]]
|
|
margin_top = 7.0
|
|
margin_right = 22.0
|
|
margin_bottom = 29.0
|
|
rect_min_size = Vector2( 22, 22 )
|
|
hint_tooltip = "Toggle layer's visibility"
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 4
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/LayerButtons/VisibilityButton"]
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -11.0
|
|
margin_top = -11.0
|
|
margin_right = 11.0
|
|
margin_bottom = 11.0
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 0
|
|
texture = ExtResource( 2 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="LockButton" type="Button" parent="HBoxContainer/LayerButtons" groups=["UIButtons"]]
|
|
margin_left = 32.0
|
|
margin_top = 7.0
|
|
margin_right = 54.0
|
|
margin_bottom = 29.0
|
|
rect_min_size = Vector2( 22, 22 )
|
|
hint_tooltip = "Lock/unlock layer"
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 4
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/LayerButtons/LockButton"]
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -11.0
|
|
margin_top = -11.0
|
|
margin_right = 11.0
|
|
margin_bottom = 11.0
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 0
|
|
texture = ExtResource( 3 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="LinkButton" type="Button" parent="HBoxContainer/LayerButtons" groups=["UIButtons"]]
|
|
margin_left = 64.0
|
|
margin_top = 7.0
|
|
margin_right = 86.0
|
|
margin_bottom = 29.0
|
|
rect_min_size = Vector2( 22, 22 )
|
|
hint_tooltip = "Enable/disable cel linking
|
|
|
|
Linked cels are being shared across multiple frames"
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 4
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/LayerButtons/LinkButton"]
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -11.0
|
|
margin_top = -11.0
|
|
margin_right = 11.0
|
|
margin_bottom = 11.0
|
|
size_flags_horizontal = 0
|
|
size_flags_vertical = 0
|
|
texture = ExtResource( 4 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="LayerName" type="HBoxContainer" parent="HBoxContainer"]
|
|
margin_left = 94.0
|
|
margin_right = 198.0
|
|
margin_bottom = 36.0
|
|
rect_min_size = Vector2( 104, 0 )
|
|
mouse_default_cursor_shape = 2
|
|
size_flags_horizontal = 0
|
|
alignment = 1
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="Label" type="Label" parent="HBoxContainer/LayerName"]
|
|
margin_top = 11.0
|
|
margin_right = 104.0
|
|
margin_bottom = 25.0
|
|
size_flags_horizontal = 3
|
|
text = "Layer 0"
|
|
align = 1
|
|
clip_text = true
|
|
|
|
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/LayerName"]
|
|
visible = false
|
|
margin_left = 86.0
|
|
margin_top = 5.0
|
|
margin_right = 166.0
|
|
margin_bottom = 37.0
|
|
rect_min_size = Vector2( 80, 32 )
|
|
size_flags_vertical = 4
|
|
text = "Layer 0"
|
|
editable = false
|
|
caret_blink = true
|
|
caret_blink_speed = 0.5
|
|
|
|
[connection signal="gui_input" from="." to="." method="_on_LayerContainer_gui_input"]
|
|
[connection signal="pressed" from="HBoxContainer/LayerButtons/VisibilityButton" to="." method="_on_VisibilityButton_pressed"]
|
|
[connection signal="pressed" from="HBoxContainer/LayerButtons/LockButton" to="." method="_on_LockButton_pressed"]
|
|
[connection signal="pressed" from="HBoxContainer/LayerButtons/LinkButton" to="." method="_on_LinkButton_pressed"]
|
|
[connection signal="focus_exited" from="HBoxContainer/LayerName/LineEdit" to="." method="_on_LineEdit_focus_exited"]
|