1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

ImageEffect Animation 2.0 (#879)

* Better Animate System

* checkbutton to checkbox

* fixed value and saturation sliders being divided by 360 (when they should be divided by 100)

* minor code cleanup

* moved frame index code to ImageEffect.gd

* code cleanup

* more cleanup

* preview animation is now possible

* fixing things

* only hide when affect == FRAME

* formatting

* formatting

* formatting

* renamed Animate.png and a minor improvement

* removed unintentional changes
This commit is contained in:
Variable 2023-07-01 02:01:14 +05:00 committed by GitHub
parent 3dd4806154
commit ae56cae587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 781 additions and 525 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/animate.png-79364ccdc41b6325d06915e85b554b1e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/misc/animate.png"
dest_files=[ "res://.import/animate.png-79364ccdc41b6325d06915e85b554b1e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -44,6 +44,11 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://addons/aimg_io/frame.gd" "path": "res://addons/aimg_io/frame.gd"
}, { }, {
"base": "PanelContainer",
"class": "AnimatePanel",
"language": "GDScript",
"path": "res://src/UI/Nodes/AnimatePanel.gd"
}, {
"base": "Reference", "base": "Reference",
"class": "AnimationTag", "class": "AnimationTag",
"language": "GDScript", "language": "GDScript",
@ -272,6 +277,7 @@ _global_script_class_icons={
"AImgIOBaseExporter": "", "AImgIOBaseExporter": "",
"AImgIOCRC32": "", "AImgIOCRC32": "",
"AImgIOFrame": "", "AImgIOFrame": "",
"AnimatePanel": "",
"AnimationTag": "", "AnimationTag": "",
"BaseCel": "", "BaseCel": "",
"BaseLayer": "", "BaseLayer": "",

View file

@ -5,7 +5,7 @@ extends ConfirmationDialog
enum { SELECTED_CELS, FRAME, ALL_FRAMES, ALL_PROJECTS } enum { SELECTED_CELS, FRAME, ALL_FRAMES, ALL_PROJECTS }
var affect: int = SELECTED_CELS var affect := SELECTED_CELS
var selected_cels := Image.new() var selected_cels := Image.new()
var current_frame := Image.new() var current_frame := Image.new()
var preview_image := Image.new() var preview_image := Image.new()
@ -13,13 +13,10 @@ var preview_texture := ImageTexture.new()
var preview: TextureRect var preview: TextureRect
var selection_checkbox: CheckBox var selection_checkbox: CheckBox
var affect_option_button: OptionButton var affect_option_button: OptionButton
var animate_options_container: Node var animate_panel: AnimatePanel
var animate_menu: PopupMenu var commit_idx := -1 # the current frame, image effect is applied to
var initial_button: Button
var animate_bool := []
var initial_values: PoolRealArray = []
var selected_idx: int = 0 # the current selected cel to apply animation to
var confirmed := false var confirmed := false
var _preview_idx := 0 # the current frame, being previewed
func _ready() -> void: func _ready() -> void:
@ -39,32 +36,42 @@ func _ready() -> void:
selection_checkbox.connect("toggled", self, "_on_SelectionCheckBox_toggled") selection_checkbox.connect("toggled", self, "_on_SelectionCheckBox_toggled")
if affect_option_button: if affect_option_button:
affect_option_button.connect("item_selected", self, "_on_AffectOptionButton_item_selected") affect_option_button.connect("item_selected", self, "_on_AffectOptionButton_item_selected")
if animate_menu: if animate_panel:
set_animate_menu(0) $"%ShowAnimate".connect("pressed", self, "display_animate_dialog")
animate_menu.connect("id_pressed", self, "_update_animate_flags")
if initial_button:
initial_button.connect("pressed", self, "set_initial_values")
func _about_to_show() -> void: func _about_to_show() -> void:
confirmed = false confirmed = false
Global.canvas.selection.transform_content_confirm() Global.canvas.selection.transform_content_confirm()
var frame: Frame = Global.current_project.frames[Global.current_project.current_frame] prepare_animator(Global.current_project)
selected_cels.resize(Global.current_project.size.x, Global.current_project.size.y) set_and_update_preview_image(Global.current_project.current_frame)
selected_cels.fill(Color(0, 0, 0, 0))
Export.blend_selected_cels(selected_cels, frame)
current_frame.resize(Global.current_project.size.x, Global.current_project.size.y)
current_frame.fill(Color(0, 0, 0, 0))
Export.blend_all_layers(current_frame, frame)
update_preview()
update_transparent_background_size() update_transparent_background_size()
# prepares "animate_panel.frames" according to affect
func prepare_animator(project: Project) -> void:
var frames = []
if affect == SELECTED_CELS:
for fram_layer in project.selected_cels:
if not fram_layer[0] in frames:
frames.append(fram_layer[0])
frames.sort() # To always start animating from left side of the timeline
animate_panel.frames = frames
elif affect == FRAME:
frames.append(project.current_frame)
animate_panel.frames = frames
elif (affect == ALL_FRAMES) or (affect == ALL_PROJECTS):
for i in project.frames.size():
frames.append(i)
animate_panel.frames = frames
func _confirmed() -> void: func _confirmed() -> void:
selected_idx = 0
confirmed = true confirmed = true
commit_idx = -1
var project: Project = Global.current_project var project: Project = Global.current_project
if affect == SELECTED_CELS: if affect == SELECTED_CELS:
prepare_animator(project)
var undo_data := _get_undo_data(project) var undo_data := _get_undo_data(project)
for cel_index in project.selected_cels: for cel_index in project.selected_cels:
if !project.layers[cel_index[1]].can_layer_get_drawn(): if !project.layers[cel_index[1]].can_layer_get_drawn():
@ -73,12 +80,15 @@ func _confirmed() -> void:
if not cel is PixelCel: if not cel is PixelCel:
continue continue
var cel_image: Image = cel.image var cel_image: Image = cel.image
commit_idx = cel_index[0] # frame is cel_index[0] in this mode
commit_action(cel_image) commit_action(cel_image)
_commit_undo("Draw", undo_data, project) _commit_undo("Draw", undo_data, project)
elif affect == FRAME: elif affect == FRAME:
prepare_animator(project)
var undo_data := _get_undo_data(project) var undo_data := _get_undo_data(project)
var i := 0 var i := 0
commit_idx = project.current_frame
for cel in project.frames[project.current_frame].cels: for cel in project.frames[project.current_frame].cels:
if not cel is PixelCel: if not cel is PixelCel:
i += 1 i += 1
@ -89,9 +99,11 @@ func _confirmed() -> void:
_commit_undo("Draw", undo_data, project) _commit_undo("Draw", undo_data, project)
elif affect == ALL_FRAMES: elif affect == ALL_FRAMES:
prepare_animator(project)
var undo_data := _get_undo_data(project) var undo_data := _get_undo_data(project)
for frame in project.frames: for frame in project.frames:
var i := 0 var i := 0
commit_idx += 1 # frames are simply increasing by 1 in this mode
for cel in frame.cels: for cel in frame.cels:
if not cel is PixelCel: if not cel is PixelCel:
i += 1 i += 1
@ -103,9 +115,13 @@ func _confirmed() -> void:
elif affect == ALL_PROJECTS: elif affect == ALL_PROJECTS:
for _project in Global.projects: for _project in Global.projects:
prepare_animator(_project)
commit_idx = -1
var undo_data := _get_undo_data(_project) var undo_data := _get_undo_data(_project)
for frame in _project.frames: for frame in _project.frames:
var i := 0 var i := 0
commit_idx += 1 # frames are simply increasing by 1 in this mode
for cel in frame.cels: for cel in frame.cels:
if not cel is PixelCel: if not cel is PixelCel:
i += 1 i += 1
@ -117,42 +133,23 @@ func _confirmed() -> void:
func commit_action(_cel: Image, _project: Project = Global.current_project) -> void: func commit_action(_cel: Image, _project: Project = Global.current_project) -> void:
if confirmed and affect == SELECTED_CELS: pass
selected_idx += 1
func set_nodes() -> void: func set_nodes() -> void:
preview = $VBoxContainer/AspectRatioContainer/Preview preview = $VBoxContainer/AspectRatioContainer/Preview
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
animate_options_container = $VBoxContainer/AnimationOptions animate_panel = $"%AnimatePanel"
animate_menu = $"%AnimateMenu".get_popup() animate_panel.image_effect_node = self
initial_button = $"%InitalButton"
func set_animate_menu(elements: int) -> void: func display_animate_dialog():
initial_values.resize(elements) var animate_dialog: Popup = animate_panel.get_parent()
initial_values.fill(0) var pos = Vector2(rect_global_position.x + rect_size.x, rect_global_position.y)
animate_bool.resize(elements) var animate_dialog_rect := Rect2(pos, Vector2(animate_dialog.rect_size.x, rect_size.y))
animate_bool.fill(false) animate_dialog.popup(animate_dialog_rect)
animate_panel.re_calibrate_preview_slider()
func set_initial_values() -> void:
pass
func get_animated_value(project: Project, final: float, property_idx: int) -> float:
if animate_bool[property_idx] == true and confirmed:
var first := initial_values[property_idx]
var interpolation := float(selected_idx) / project.selected_cels.size()
return lerp(first, final, interpolation)
else:
return final
func _update_animate_flags(id: int) -> void:
animate_bool[id] = !animate_bool[id]
animate_menu.set_item_checked(id, animate_bool[id])
func _commit_undo(action: String, undo_data: Dictionary, project: Project) -> void: func _commit_undo(action: String, undo_data: Dictionary, project: Project) -> void:
@ -198,7 +195,21 @@ func _on_SelectionCheckBox_toggled(_button_pressed: bool) -> void:
func _on_AffectOptionButton_item_selected(index: int) -> void: func _on_AffectOptionButton_item_selected(index: int) -> void:
affect = index affect = index
animate_options_container.visible = bool(affect == SELECTED_CELS) $"%ShowAnimate".visible = bool(affect != FRAME and animate_panel.properties.size() != 0)
prepare_animator(Global.current_project) # for use in preview
animate_panel.re_calibrate_preview_slider()
update_preview()
func set_and_update_preview_image(frame_idx: int) -> void:
_preview_idx = frame_idx
var frame: Frame = Global.current_project.frames[frame_idx]
selected_cels.resize(Global.current_project.size.x, Global.current_project.size.y)
selected_cels.fill(Color(0, 0, 0, 0))
Export.blend_selected_cels(selected_cels, frame)
current_frame.resize(Global.current_project.size.x, Global.current_project.size.y)
current_frame.fill(Color(0, 0, 0, 0))
Export.blend_all_layers(current_frame, frame)
update_preview() update_preview()
@ -208,6 +219,7 @@ func update_preview() -> void:
preview_image.copy_from(selected_cels) preview_image.copy_from(selected_cels)
_: _:
preview_image.copy_from(current_frame) preview_image.copy_from(current_frame)
commit_idx = _preview_idx
commit_action(preview_image) commit_action(preview_image)
preview_image.unlock() preview_image.unlock()
preview_texture.create_from_image(preview_image, 0) preview_texture.create_from_image(preview_image, 0)

View file

@ -7,21 +7,25 @@
window_title = "Desaturation" window_title = "Desaturation"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
margin_right = 278.0 visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 238.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 73.0
margin_right = 239.0 margin_right = 287.0
margin_bottom = 214.0
[node name="RGBAContainer" type="HBoxContainer" parent="VBoxContainer" index="1"] [node name="RGBAContainer" type="HBoxContainer" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 242.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 224.0 margin_bottom = 262.0
alignment = 1 alignment = 1
[node name="RButton" type="Button" parent="VBoxContainer/RGBAContainer" index="0"] [node name="RButton" type="Button" parent="VBoxContainer/RGBAContainer" index="0"]
margin_right = 66.0 margin_right = 87.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Red Channel" hint_tooltip = "Modify Red Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -31,8 +35,8 @@ pressed = true
text = "R" text = "R"
[node name="GButton" type="Button" parent="VBoxContainer/RGBAContainer" index="1"] [node name="GButton" type="Button" parent="VBoxContainer/RGBAContainer" index="1"]
margin_left = 70.0 margin_left = 91.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Green Channel" hint_tooltip = "Modify Green Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -42,8 +46,8 @@ pressed = true
text = "G" text = "G"
[node name="BButton" type="Button" parent="VBoxContainer/RGBAContainer" index="2"] [node name="BButton" type="Button" parent="VBoxContainer/RGBAContainer" index="2"]
margin_left = 141.0 margin_left = 182.0
margin_right = 207.0 margin_right = 269.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Blue Channel" hint_tooltip = "Modify Blue Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -53,8 +57,8 @@ pressed = true
text = "B" text = "B"
[node name="AButton" type="Button" parent="VBoxContainer/RGBAContainer" index="3"] [node name="AButton" type="Button" parent="VBoxContainer/RGBAContainer" index="3"]
margin_left = 211.0 margin_left = 273.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Alpha Channel" hint_tooltip = "Modify Alpha Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -62,31 +66,9 @@ size_flags_horizontal = 3
toggle_mode = true toggle_mode = true
text = "A" text = "A"
[node name="OptionsContainer" parent="VBoxContainer" index="2"]
margin_top = 228.0
margin_right = 278.0
margin_bottom = 252.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"]
visible = false
margin_top = 256.0
margin_right = 278.0
margin_bottom = 290.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="toggled" from="VBoxContainer/RGBAContainer/RButton" to="." method="_on_RButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/RButton" to="." method="_on_RButton_toggled"]
[connection signal="toggled" from="VBoxContainer/RGBAContainer/GButton" to="." method="_on_GButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/GButton" to="." method="_on_GButton_toggled"]
[connection signal="toggled" from="VBoxContainer/RGBAContainer/BButton" to="." method="_on_BButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/BButton" to="." method="_on_BButton_toggled"]

View file

@ -15,23 +15,18 @@ func _ready() -> void:
sm.shader = shader sm.shader = shader
preview.set_material(sm) preview.set_material(sm)
func set_animate_menu(_elements) -> void:
# set as in enum # set as in enum
animate_menu.add_check_item("Offset X", Animate.OFFSET_X) animate_panel.add_float_property(
animate_menu.add_check_item("Offset Y", Animate.OFFSET_Y) "Offset X", $VBoxContainer/ShadowOptions/OffsetSliders.find_node("X")
.set_animate_menu(Animate.size()) )
animate_panel.add_float_property(
"Offset Y", $VBoxContainer/ShadowOptions/OffsetSliders.find_node("Y")
func set_initial_values() -> void: )
initial_values[Animate.OFFSET_X] = offset.x
initial_values[Animate.OFFSET_Y] = offset.y
func commit_action(cel: Image, project: Project = Global.current_project) -> void: func commit_action(cel: Image, project: Project = Global.current_project) -> void:
.commit_action(cel, project) var offset_x = animate_panel.get_animated_values(commit_idx, Animate.OFFSET_X)
var offset_x = get_animated_value(project, offset.x, Animate.OFFSET_X) var offset_y = animate_panel.get_animated_values(commit_idx, Animate.OFFSET_Y)
var offset_y = get_animated_value(project, offset.y, Animate.OFFSET_Y)
var selection_tex := ImageTexture.new() var selection_tex := ImageTexture.new()
if selection_checkbox.pressed and project.has_selection: if selection_checkbox.pressed and project.has_selection:
selection_tex.create_from_image(project.selection_map, 0) selection_tex.create_from_image(project.selection_map, 0)

View file

@ -5,23 +5,25 @@
[ext_resource path="res://src/UI/Nodes/ValueSliderV2.tscn" type="PackedScene" id=3] [ext_resource path="res://src/UI/Nodes/ValueSliderV2.tscn" type="PackedScene" id=3]
[node name="DropShadowDialog" instance=ExtResource( 1 )] [node name="DropShadowDialog" instance=ExtResource( 1 )]
visible = false
window_title = "Drop Shadow" window_title = "Drop Shadow"
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 340.0 margin_bottom = 340.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_right = 278.0 margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 80.0
margin_right = 239.0 margin_right = 280.0
margin_bottom = 200.0
[node name="ShadowOptions" type="GridContainer" parent="VBoxContainer" index="1"] [node name="ShadowOptions" type="GridContainer" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 280.0 margin_bottom = 304.0
custom_constants/vseparation = 4 custom_constants/vseparation = 4
custom_constants/hseparation = 4 custom_constants/hseparation = 4
columns = 2 columns = 2
@ -31,14 +33,14 @@ __meta__ = {
[node name="Label" type="Label" parent="VBoxContainer/ShadowOptions" index="0"] [node name="Label" type="Label" parent="VBoxContainer/ShadowOptions" index="0"]
margin_top = 19.0 margin_top = 19.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 33.0 margin_bottom = 33.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Offset:" text = "Offset:"
[node name="OffsetSliders" parent="VBoxContainer/ShadowOptions" index="1" instance=ExtResource( 3 )] [node name="OffsetSliders" parent="VBoxContainer/ShadowOptions" index="1" instance=ExtResource( 3 )]
margin_left = 141.0 margin_left = 182.0
margin_right = 278.0 margin_right = 360.0
value = Vector2( 5, 5 ) value = Vector2( 5, 5 )
min_value = Vector2( -64, -64 ) min_value = Vector2( -64, -64 )
max_value = Vector2( 64, 64 ) max_value = Vector2( 64, 64 )
@ -50,43 +52,26 @@ suffix_y = "px"
[node name="ShadowColorLabel" type="Label" parent="VBoxContainer/ShadowOptions" index="2"] [node name="ShadowColorLabel" type="Label" parent="VBoxContainer/ShadowOptions" index="2"]
margin_top = 59.0 margin_top = 59.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 73.0 margin_bottom = 73.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Shadow color:" text = "Shadow color:"
[node name="ShadowColor" type="ColorPickerButton" parent="VBoxContainer/ShadowOptions" index="3"] [node name="ShadowColor" type="ColorPickerButton" parent="VBoxContainer/ShadowOptions" index="3"]
margin_left = 141.0 margin_left = 182.0
margin_top = 56.0 margin_top = 56.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 76.0 margin_bottom = 76.0
rect_min_size = Vector2( 64, 20 ) rect_min_size = Vector2( 64, 20 )
size_flags_horizontal = 3 size_flags_horizontal = 3
color = Color( 0.0823529, 0.0823529, 0.0823529, 0.627451 ) color = Color( 0.0823529, 0.0823529, 0.0823529, 0.627451 )
[node name="OptionsContainer" parent="VBoxContainer" index="2"] [node name="OptionsContainer" parent="VBoxContainer" index="3"]
margin_top = 284.0 margin_top = 308.0
margin_right = 278.0 margin_bottom = 332.0
margin_bottom = 308.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AnimateDialog" parent="." index="4"]
margin_right = 278.0 margin_bottom = 340.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"]
margin_top = 312.0
margin_right = 278.0
margin_bottom = 346.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="value_changed" from="VBoxContainer/ShadowOptions/OffsetSliders" to="." method="_on_OffsetSliders_value_changed"] [connection signal="value_changed" from="VBoxContainer/ShadowOptions/OffsetSliders" to="." method="_on_OffsetSliders_value_changed"]
[connection signal="color_changed" from="VBoxContainer/ShadowOptions/ShadowColor" to="." method="_on_ShadowColor_color_changed"] [connection signal="color_changed" from="VBoxContainer/ShadowOptions/ShadowColor" to="." method="_on_ShadowColor_color_changed"]

View file

@ -4,27 +4,33 @@
[ext_resource path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" type="PackedScene" id=2] [ext_resource path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" type="PackedScene" id=2]
[node name="FlipImageDialog" instance=ExtResource( 2 )] [node name="FlipImageDialog" instance=ExtResource( 2 )]
margin_right = 376.0
margin_bottom = 324.0
window_title = "Mirror Image" window_title = "Mirror Image"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 288.0 margin_bottom = 288.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
margin_right = 278.0 visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 80.0
margin_right = 239.0 margin_right = 280.0
margin_bottom = 200.0
[node name="FlipOptions" type="GridContainer" parent="VBoxContainer" index="1"] [node name="FlipOptions" type="GridContainer" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 228.0 margin_bottom = 252.0
columns = 2 columns = 2
[node name="FlipHorizontal" type="CheckBox" parent="VBoxContainer/FlipOptions" index="0"] [node name="FlipHorizontal" type="CheckBox" parent="VBoxContainer/FlipOptions" index="0"]
margin_right = 137.0 margin_right = 178.0
margin_bottom = 24.0 margin_bottom = 24.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -32,36 +38,22 @@ pressed = true
text = "Horizontal" text = "Horizontal"
[node name="FlipVertical" type="CheckBox" parent="VBoxContainer/FlipOptions" index="1"] [node name="FlipVertical" type="CheckBox" parent="VBoxContainer/FlipOptions" index="1"]
margin_left = 141.0 margin_left = 182.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 24.0 margin_bottom = 24.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Vertical" text = "Vertical"
[node name="OptionsContainer" parent="VBoxContainer" index="2"] [node name="OptionsContainer" parent="VBoxContainer" index="3"]
margin_top = 232.0 margin_top = 256.0
margin_right = 278.0 margin_bottom = 280.0
margin_bottom = 256.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0 items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"] [node name="AnimateDialog" parent="." index="4"]
visible = false margin_bottom = 288.0
margin_top = 260.0
margin_right = 278.0
margin_bottom = 294.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="toggled" from="VBoxContainer/FlipOptions/FlipHorizontal" to="." method="_on_FlipHorizontal_toggled"] [connection signal="toggled" from="VBoxContainer/FlipOptions/FlipHorizontal" to="." method="_on_FlipHorizontal_toggled"]
[connection signal="toggled" from="VBoxContainer/FlipOptions/FlipVertical" to="." method="_on_FlipVertical_toggled"] [connection signal="toggled" from="VBoxContainer/FlipOptions/FlipVertical" to="." method="_on_FlipVertical_toggled"]

View file

@ -11,39 +11,43 @@ window_title = "Gradient"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 444.0 margin_bottom = 468.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
margin_right = 278.0 visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 80.0
margin_right = 239.0 margin_right = 280.0
margin_bottom = 200.0
[node name="GradientEdit" parent="VBoxContainer" index="1" instance=ExtResource( 3 )] [node name="GradientEdit" parent="VBoxContainer" index="2" instance=ExtResource( 3 )]
anchor_right = 0.0 anchor_right = 0.0
anchor_bottom = 0.0 anchor_bottom = 0.0
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 282.0 margin_bottom = 306.0
[node name="GradientOptions" type="GridContainer" parent="VBoxContainer" index="2"] [node name="GradientOptions" type="GridContainer" parent="VBoxContainer" index="3"]
margin_top = 286.0 margin_top = 310.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 408.0 margin_bottom = 432.0
columns = 2 columns = 2
[node name="ShapeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="0" groups=["gradient_common"]] [node name="ShapeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="0" groups=["gradient_common"]]
margin_top = 3.0 margin_top = 3.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 17.0 margin_bottom = 17.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Shape:" text = "Shape:"
[node name="ShapeOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="1" groups=["gradient_common"]] [node name="ShapeOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="1" groups=["gradient_common"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -54,15 +58,15 @@ selected = 0
[node name="DitheringLabel" type="Label" parent="VBoxContainer/GradientOptions" index="2" groups=["gradient_common"]] [node name="DitheringLabel" type="Label" parent="VBoxContainer/GradientOptions" index="2" groups=["gradient_common"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_top = 27.0 margin_top = 27.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 41.0 margin_bottom = 41.0
text = "Dithering pattern:" text = "Dithering pattern:"
[node name="DitheringOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="3" groups=["gradient_common"]] [node name="DitheringOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="3" groups=["gradient_common"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_top = 24.0 margin_top = 24.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 44.0 margin_bottom = 44.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
text = "None" text = "None"
@ -71,15 +75,15 @@ selected = 0
[node name="RepeatLabel" type="Label" parent="VBoxContainer/GradientOptions" index="4" groups=["gradient_common"]] [node name="RepeatLabel" type="Label" parent="VBoxContainer/GradientOptions" index="4" groups=["gradient_common"]]
margin_top = 51.0 margin_top = 51.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 65.0 margin_bottom = 65.0
text = "Repeat:" text = "Repeat:"
[node name="RepeatOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="5" groups=["gradient_common"]] [node name="RepeatOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="5" groups=["gradient_common"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_top = 48.0 margin_top = 48.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 68.0 margin_bottom = 68.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
text = "None" text = "None"
@ -88,15 +92,15 @@ selected = 0
[node name="PositionLabel" type="Label" parent="VBoxContainer/GradientOptions" index="6" groups=["gradient_linear"]] [node name="PositionLabel" type="Label" parent="VBoxContainer/GradientOptions" index="6" groups=["gradient_linear"]]
margin_top = 72.0 margin_top = 72.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 86.0 margin_bottom = 86.0
text = "Position:" text = "Position:"
[node name="PositionSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="7" groups=["gradient_linear"]] [node name="PositionSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="7" groups=["gradient_linear"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_top = 72.0 margin_top = 72.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 86.0 margin_bottom = 86.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -114,15 +118,15 @@ snap_step = 10.0
[node name="SizeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="8" groups=["gradient_linear"]] [node name="SizeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="8" groups=["gradient_linear"]]
margin_top = 90.0 margin_top = 90.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 104.0 margin_bottom = 104.0
text = "Size:" text = "Size:"
[node name="SizeSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="9" groups=["gradient_linear"]] [node name="SizeSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="9" groups=["gradient_linear"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_top = 90.0 margin_top = 90.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 104.0 margin_bottom = 104.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -141,15 +145,15 @@ snap_step = 10.0
[node name="AngleLabel" type="Label" parent="VBoxContainer/GradientOptions" index="10" groups=["gradient_linear"]] [node name="AngleLabel" type="Label" parent="VBoxContainer/GradientOptions" index="10" groups=["gradient_linear"]]
margin_top = 108.0 margin_top = 108.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 122.0 margin_bottom = 122.0
text = "Angle:" text = "Angle:"
[node name="AngleSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="11" groups=["gradient_linear"]] [node name="AngleSlider" type="TextureProgress" parent="VBoxContainer/GradientOptions" index="11" groups=["gradient_linear"]]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 141.0 margin_left = 182.0
margin_top = 108.0 margin_top = 108.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 122.0 margin_bottom = 122.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -200,30 +204,15 @@ step = 0.01
allow_greater = true allow_greater = true
show_ratio = true show_ratio = true
[node name="OptionsContainer" parent="VBoxContainer" index="3"] [node name="OptionsContainer" parent="VBoxContainer" index="4"]
margin_top = 412.0 margin_top = 436.0
margin_right = 278.0 margin_bottom = 460.0
margin_bottom = 436.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="4"] [node name="AnimateDialog" parent="." index="4"]
visible = false margin_bottom = 468.0
margin_top = 440.0
margin_right = 278.0
margin_bottom = 474.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="updated" from="VBoxContainer/GradientEdit" to="." method="_on_GradientEdit_updated"] [connection signal="updated" from="VBoxContainer/GradientEdit" to="." method="_on_GradientEdit_updated"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/ShapeOptionButton" to="." method="_on_ShapeOptionButton_item_selected"] [connection signal="item_selected" from="VBoxContainer/GradientOptions/ShapeOptionButton" to="." method="_on_ShapeOptionButton_item_selected"]

View file

@ -9,17 +9,32 @@ window_title = "Gradient Map"
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 318.0 margin_bottom = 342.0
[node name="GradientEdit" parent="VBoxContainer" index="1" instance=ExtResource( 2 )] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 80.0
margin_right = 280.0
margin_bottom = 200.0
[node name="GradientEdit" parent="VBoxContainer" index="2" instance=ExtResource( 2 )]
anchor_right = 0.0 anchor_right = 0.0
anchor_bottom = 0.0 anchor_bottom = 0.0
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 282.0 margin_bottom = 306.0
[node name="OptionsContainer" parent="VBoxContainer" index="3"]
margin_top = 310.0
margin_bottom = 334.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"] [node name="AnimateDialog" parent="." index="4"]
visible = false margin_bottom = 342.0

View file

@ -12,6 +12,10 @@ func _ready() -> void:
var sm := ShaderMaterial.new() var sm := ShaderMaterial.new()
sm.shader = shader sm.shader = shader
preview.set_material(sm) preview.set_material(sm)
# set as in enum
animate_panel.add_float_property("Hue", hue_slider)
animate_panel.add_float_property("Saturation", sat_slider)
animate_panel.add_float_property("Value", val_slider)
func _about_to_show() -> void: func _about_to_show() -> void:
@ -19,25 +23,10 @@ func _about_to_show() -> void:
._about_to_show() ._about_to_show()
func set_animate_menu(_elements) -> void:
# set as in enum
animate_menu.add_check_item("Hue", Animate.HUE)
animate_menu.add_check_item("Saturation", Animate.SATURATION)
animate_menu.add_check_item("Value", Animate.VALUE)
.set_animate_menu(Animate.size())
func set_initial_values() -> void:
initial_values[Animate.HUE] = hue_slider.value
initial_values[Animate.SATURATION] = sat_slider.value
initial_values[Animate.VALUE] = val_slider.value
func commit_action(cel: Image, project: Project = Global.current_project) -> void: func commit_action(cel: Image, project: Project = Global.current_project) -> void:
.commit_action(cel, project) var hue = animate_panel.get_animated_values(commit_idx, Animate.HUE) / 360
var hue = get_animated_value(project, hue_slider.value / 360, Animate.HUE) var sat = animate_panel.get_animated_values(commit_idx, Animate.SATURATION) / 100
var sat = get_animated_value(project, sat_slider.value / 360, Animate.SATURATION) var val = animate_panel.get_animated_values(commit_idx, Animate.VALUE) / 100
var val = get_animated_value(project, val_slider.value / 360, Animate.VALUE)
var selection_tex := ImageTexture.new() var selection_tex := ImageTexture.new()
if selection_checkbox.pressed and project.has_selection: if selection_checkbox.pressed and project.has_selection:
selection_tex.create_from_image(project.selection_map, 0) selection_tex.create_from_image(project.selection_map, 0)

View file

@ -5,36 +5,49 @@
[ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=3] [ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=3]
[node name="HSVDialog" instance=ExtResource( 2 )] [node name="HSVDialog" instance=ExtResource( 2 )]
visible = false
window_title = "Adjust HSV" window_title = "Adjust HSV"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 344.0 margin_bottom = 344.0
[node name="HueSlider" parent="VBoxContainer" index="1" instance=ExtResource( 3 )] [node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_top = 232.0 margin_bottom = 224.0
margin_right = 332.0
margin_bottom = 256.0 [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 80.0
margin_right = 280.0
margin_bottom = 200.0
[node name="HueSlider" parent="VBoxContainer" index="2" instance=ExtResource( 3 )]
margin_top = 228.0
margin_right = 360.0
margin_bottom = 252.0
min_value = -180.0 min_value = -180.0
max_value = 180.0 max_value = 180.0
prefix = "Hue:" prefix = "Hue:"
[node name="SaturationSlider" parent="VBoxContainer" index="2" instance=ExtResource( 3 )] [node name="SaturationSlider" parent="VBoxContainer" index="3" instance=ExtResource( 3 )]
margin_top = 260.0 margin_top = 256.0
margin_right = 332.0 margin_right = 360.0
margin_bottom = 284.0 margin_bottom = 280.0
min_value = -100.0 min_value = -100.0
prefix = "Saturation:" prefix = "Saturation:"
[node name="ValueSlider" parent="VBoxContainer" index="3" instance=ExtResource( 3 )] [node name="ValueSlider" parent="VBoxContainer" index="4" instance=ExtResource( 3 )]
margin_top = 288.0 margin_top = 284.0
margin_right = 332.0 margin_right = 360.0
margin_bottom = 312.0 margin_bottom = 308.0
min_value = -100.0 min_value = -100.0
prefix = "Value:" prefix = "Value:"
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="OptionsContainer" parent="VBoxContainer" index="5"]
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] margin_top = 312.0
margin_bottom = 336.0
[node name="AnimateDialog" parent="." index="4"]
margin_bottom = 344.0
[connection signal="value_changed" from="VBoxContainer/HueSlider" to="." method="_on_HueSlider_value_changed"] [connection signal="value_changed" from="VBoxContainer/HueSlider" to="." method="_on_HueSlider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/SaturationSlider" to="." method="_on_SaturationSlider_value_changed"] [connection signal="value_changed" from="VBoxContainer/SaturationSlider" to="." method="_on_SaturationSlider_value_changed"]

View file

@ -1,31 +1,53 @@
[gd_scene load_steps=2 format=2] [gd_scene load_steps=5 format=2]
[ext_resource path="res://src/UI/Nodes/AnimatePanel.tscn" type="PackedScene" id=1]
[ext_resource path="res://src/UI/Nodes/TransparentChecker.tscn" type="PackedScene" id=2] [ext_resource path="res://src/UI/Nodes/TransparentChecker.tscn" type="PackedScene" id=2]
[ext_resource path="res://src/Classes/ImageEffect.gd" type="Script" id=3]
[ext_resource path="res://assets/graphics/misc/animate.png" type="Texture" id=4]
[node name="ImageEffectParent" type="ConfirmationDialog"] [node name="ImageEffectParent" type="ConfirmationDialog"]
margin_right = 294.0 margin_right = 294.0
margin_bottom = 296.0 margin_bottom = 334.0
rect_min_size = Vector2( 172, 60.2 ) rect_min_size = Vector2( 172, 60.2 )
resizable = true resizable = true
script = ExtResource( 3 )
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_left = 8.0 margin_left = 8.0
margin_top = 8.0 margin_top = 8.0
margin_right = 286.0 margin_right = 368.0
margin_bottom = 260.0 margin_bottom = 298.0
__meta__ = {
"_edit_use_anchors_": false [node name="ShowAnimate" type="Button" parent="VBoxContainer"]
} unique_name_in_owner = true
margin_left = 340.0
margin_right = 360.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
size_flags_horizontal = 8
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/ShowAnimate"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 2.0
margin_top = 2.0
margin_right = -2.0
margin_bottom = -2.0
texture = ExtResource( 4 )
expand = true
stretch_mode = 6
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="VBoxContainer"] [node name="AspectRatioContainer" type="AspectRatioContainer" parent="VBoxContainer"]
margin_right = 279.0 margin_top = 24.0
margin_bottom = 200.0 margin_right = 360.0
margin_bottom = 262.0
size_flags_vertical = 3 size_flags_vertical = 3
[node name="Preview" type="TextureRect" parent="VBoxContainer/AspectRatioContainer"] [node name="Preview" type="TextureRect" parent="VBoxContainer/AspectRatioContainer"]
margin_left = 39.5 margin_left = 61.0
margin_right = 239.5 margin_right = 299.0
margin_bottom = 200.0 margin_bottom = 238.0
rect_min_size = Vector2( 200, 200 ) rect_min_size = Vector2( 200, 200 )
expand = true expand = true
stretch_mode = 5 stretch_mode = 5
@ -38,12 +60,12 @@ margin_right = 0.0
margin_bottom = 0.0 margin_bottom = 0.0
[node name="OptionsContainer" type="HBoxContainer" parent="VBoxContainer"] [node name="OptionsContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 204.0 margin_top = 266.0
margin_right = 279.0 margin_right = 360.0
margin_bottom = 228.0 margin_bottom = 290.0
[node name="SelectionCheckBox" type="CheckBox" parent="VBoxContainer/OptionsContainer"] [node name="SelectionCheckBox" type="CheckBox" parent="VBoxContainer/OptionsContainer"]
margin_right = 160.0 margin_right = 178.0
margin_bottom = 24.0 margin_bottom = 24.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -51,8 +73,8 @@ pressed = true
text = "Only affect selection" text = "Only affect selection"
[node name="AffectOptionButton" type="OptionButton" parent="VBoxContainer/OptionsContainer"] [node name="AffectOptionButton" type="OptionButton" parent="VBoxContainer/OptionsContainer"]
margin_left = 164.0 margin_left = 182.0
margin_right = 279.0 margin_right = 360.0
margin_bottom = 24.0 margin_bottom = 24.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -60,36 +82,16 @@ text = "Selected cels"
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
selected = 0 selected = 0
[node name="AnimationOptions" type="HBoxContainer" parent="VBoxContainer"] [node name="AnimateDialog" type="Popup" parent="."]
margin_top = 232.0 margin_left = 8.0
margin_right = 279.0 margin_top = 8.0
margin_bottom = 266.0 margin_right = 368.0
margin_bottom = 298.0
rect_min_size = Vector2( 360, 270 )
[node name="Label" type="Label" parent="VBoxContainer/AnimationOptions"] [node name="AnimatePanel" parent="AnimateDialog" instance=ExtResource( 1 )]
margin_top = 10.0
margin_right = 58.0
margin_bottom = 24.0
text = "Animate:"
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/AnimationOptions"]
margin_left = 62.0
margin_right = 158.0
margin_bottom = 34.0
size_flags_horizontal = 3
[node name="AnimateMenu" type="MenuButton" parent="VBoxContainer/AnimationOptions/PanelContainer"]
unique_name_in_owner = true unique_name_in_owner = true
margin_left = 7.0 anchor_right = 1.0
margin_top = 7.0 anchor_bottom = 1.0
margin_right = 89.0 margin_right = 0.0
margin_bottom = 27.0 margin_bottom = 0.0
focus_mode = 2
text = "Properties"
flat = false
[node name="InitalButton" type="Button" parent="VBoxContainer/AnimationOptions"]
unique_name_in_owner = true
margin_left = 162.0
margin_right = 279.0
margin_bottom = 34.0
text = "Set initial values"

View file

@ -7,21 +7,25 @@
window_title = "Invert Colors" window_title = "Invert Colors"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
margin_right = 278.0 visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 238.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 73.0
margin_right = 239.0 margin_right = 287.0
margin_bottom = 214.0
[node name="RGBAContainer" type="HBoxContainer" parent="VBoxContainer" index="1"] [node name="RGBAContainer" type="HBoxContainer" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 242.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 224.0 margin_bottom = 262.0
alignment = 1 alignment = 1
[node name="RButton" type="Button" parent="VBoxContainer/RGBAContainer" index="0"] [node name="RButton" type="Button" parent="VBoxContainer/RGBAContainer" index="0"]
margin_right = 66.0 margin_right = 87.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Red Channel" hint_tooltip = "Modify Red Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -31,8 +35,8 @@ pressed = true
text = "R" text = "R"
[node name="GButton" type="Button" parent="VBoxContainer/RGBAContainer" index="1"] [node name="GButton" type="Button" parent="VBoxContainer/RGBAContainer" index="1"]
margin_left = 70.0 margin_left = 91.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Green Channel" hint_tooltip = "Modify Green Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -42,8 +46,8 @@ pressed = true
text = "G" text = "G"
[node name="BButton" type="Button" parent="VBoxContainer/RGBAContainer" index="2"] [node name="BButton" type="Button" parent="VBoxContainer/RGBAContainer" index="2"]
margin_left = 141.0 margin_left = 182.0
margin_right = 207.0 margin_right = 269.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Blue Channel" hint_tooltip = "Modify Blue Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -53,8 +57,8 @@ pressed = true
text = "B" text = "B"
[node name="AButton" type="Button" parent="VBoxContainer/RGBAContainer" index="3"] [node name="AButton" type="Button" parent="VBoxContainer/RGBAContainer" index="3"]
margin_left = 211.0 margin_left = 273.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 20.0 margin_bottom = 20.0
hint_tooltip = "Modify Alpha Channel" hint_tooltip = "Modify Alpha Channel"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
@ -62,31 +66,9 @@ size_flags_horizontal = 3
toggle_mode = true toggle_mode = true
text = "A" text = "A"
[node name="OptionsContainer" parent="VBoxContainer" index="2"]
margin_top = 228.0
margin_right = 278.0
margin_bottom = 252.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"]
visible = false
margin_top = 256.0
margin_right = 278.0
margin_bottom = 290.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="toggled" from="VBoxContainer/RGBAContainer/RButton" to="." method="_on_RButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/RButton" to="." method="_on_RButton_toggled"]
[connection signal="toggled" from="VBoxContainer/RGBAContainer/GButton" to="." method="_on_GButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/GButton" to="." method="_on_GButton_toggled"]
[connection signal="toggled" from="VBoxContainer/RGBAContainer/BButton" to="." method="_on_BButton_toggled"] [connection signal="toggled" from="VBoxContainer/RGBAContainer/BButton" to="." method="_on_BButton_toggled"]

View file

@ -20,21 +20,12 @@ func _ready() -> void:
preview.set_material(sm) preview.set_material(sm)
outline_color.get_picker().presets_visible = false outline_color.get_picker().presets_visible = false
color = outline_color.color color = outline_color.color
func set_animate_menu(_elements) -> void:
# set as in enum # set as in enum
animate_menu.add_check_item("Thickness", Animate.THICKNESS) animate_panel.add_float_property("Thickness", $VBoxContainer/OutlineOptions/ThickValue)
.set_animate_menu(Animate.size())
func set_initial_values() -> void:
initial_values[Animate.THICKNESS] = thickness
func commit_action(cel: Image, project: Project = Global.current_project) -> void: func commit_action(cel: Image, project: Project = Global.current_project) -> void:
.commit_action(cel, project) var anim_thickness = animate_panel.get_animated_values(commit_idx, Animate.THICKNESS)
var anim_thickness = get_animated_value(project, thickness, Animate.THICKNESS)
if !shader: # Web version if !shader: # Web version
DrawingAlgos.generate_outline( DrawingAlgos.generate_outline(

View file

@ -5,23 +5,25 @@
[ext_resource path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" type="PackedScene" id=3] [ext_resource path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" type="PackedScene" id=3]
[node name="OutlineDialog" instance=ExtResource( 3 )] [node name="OutlineDialog" instance=ExtResource( 3 )]
visible = false
window_title = "Outline" window_title = "Outline"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 354.0 margin_bottom = 354.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_right = 278.0 margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 80.0
margin_right = 239.0 margin_right = 280.0
margin_bottom = 200.0
[node name="OutlineOptions" type="GridContainer" parent="VBoxContainer" index="1"] [node name="OutlineOptions" type="GridContainer" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 294.0 margin_bottom = 318.0
custom_constants/vseparation = 4 custom_constants/vseparation = 4
custom_constants/hseparation = 4 custom_constants/hseparation = 4
columns = 2 columns = 2
@ -30,14 +32,14 @@ __meta__ = {
} }
[node name="ThickLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="0"] [node name="ThickLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="0"]
margin_right = 137.0 margin_right = 178.0
margin_bottom = 14.0 margin_bottom = 14.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Thickness:" text = "Thickness:"
[node name="ThickValue" type="TextureProgress" parent="VBoxContainer/OutlineOptions" index="1"] [node name="ThickValue" type="TextureProgress" parent="VBoxContainer/OutlineOptions" index="1"]
margin_left = 141.0 margin_left = 182.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 14.0 margin_bottom = 14.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -54,30 +56,30 @@ suffix = "px"
[node name="OutlineColorLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="2"] [node name="OutlineColorLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="2"]
margin_top = 21.0 margin_top = 21.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 35.0 margin_bottom = 35.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Fill with color:" text = "Fill with color:"
[node name="OutlineColor" type="ColorPickerButton" parent="VBoxContainer/OutlineOptions" index="3"] [node name="OutlineColor" type="ColorPickerButton" parent="VBoxContainer/OutlineOptions" index="3"]
margin_left = 141.0 margin_left = 182.0
margin_top = 18.0 margin_top = 18.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 38.0 margin_bottom = 38.0
rect_min_size = Vector2( 64, 20 ) rect_min_size = Vector2( 64, 20 )
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="PatternLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="4"] [node name="PatternLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="4"]
margin_top = 45.0 margin_top = 45.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 59.0 margin_bottom = 59.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Pattern:" text = "Pattern:"
[node name="PatternOptionButton" type="OptionButton" parent="VBoxContainer/OutlineOptions" index="5"] [node name="PatternOptionButton" type="OptionButton" parent="VBoxContainer/OutlineOptions" index="5"]
margin_left = 141.0 margin_left = 182.0
margin_top = 42.0 margin_top = 42.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 62.0 margin_bottom = 62.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -87,43 +89,26 @@ selected = 0
[node name="InsideImageLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="6"] [node name="InsideImageLabel" type="Label" parent="VBoxContainer/OutlineOptions" index="6"]
margin_top = 71.0 margin_top = 71.0
margin_right = 137.0 margin_right = 178.0
margin_bottom = 85.0 margin_bottom = 85.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Place inside image" text = "Place inside image"
[node name="InsideImageCheckBox" type="CheckBox" parent="VBoxContainer/OutlineOptions" index="7"] [node name="InsideImageCheckBox" type="CheckBox" parent="VBoxContainer/OutlineOptions" index="7"]
margin_left = 141.0 margin_left = 182.0
margin_top = 66.0 margin_top = 66.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 90.0 margin_bottom = 90.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "On" text = "On"
[node name="OptionsContainer" parent="VBoxContainer" index="2"] [node name="OptionsContainer" parent="VBoxContainer" index="3"]
margin_top = 298.0 margin_top = 322.0
margin_right = 278.0 margin_bottom = 346.0
margin_bottom = 322.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AnimateDialog" parent="." index="4"]
margin_right = 278.0 margin_bottom = 354.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="3"]
margin_top = 326.0
margin_right = 278.0
margin_bottom = 360.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="value_changed" from="VBoxContainer/OutlineOptions/ThickValue" to="." method="_on_ThickValue_value_changed"] [connection signal="value_changed" from="VBoxContainer/OutlineOptions/ThickValue" to="." method="_on_ThickValue_value_changed"]
[connection signal="color_changed" from="VBoxContainer/OutlineOptions/OutlineColor" to="." method="_on_OutlineColor_color_changed"] [connection signal="color_changed" from="VBoxContainer/OutlineOptions/OutlineColor" to="." method="_on_OutlineColor_color_changed"]

View file

@ -9,19 +9,23 @@ window_title = "Posterize"
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 292.0 margin_bottom = 316.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="ShowAnimate" parent="VBoxContainer" index="0"]
margin_right = 278.0 visible = false
[node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_bottom = 224.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 39.0 margin_left = 80.0
margin_right = 239.0 margin_right = 280.0
margin_bottom = 200.0
[node name="LevelsSlider" type="TextureProgress" parent="VBoxContainer" index="1"] [node name="LevelsSlider" type="TextureProgress" parent="VBoxContainer" index="2"]
margin_top = 204.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 228.0 margin_bottom = 252.0
rect_min_size = Vector2( 0, 24 ) rect_min_size = Vector2( 0, 24 )
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -38,10 +42,10 @@ script = ExtResource( 2 )
prefix = "Posterize levels:" prefix = "Posterize levels:"
snap_by_default = true snap_by_default = true
[node name="DitherSlider" type="TextureProgress" parent="VBoxContainer" index="2"] [node name="DitherSlider" type="TextureProgress" parent="VBoxContainer" index="3"]
margin_top = 232.0 margin_top = 256.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 256.0 margin_bottom = 280.0
rect_min_size = Vector2( 0, 24 ) rect_min_size = Vector2( 0, 24 )
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
theme_type_variation = "ValueSlider" theme_type_variation = "ValueSlider"
@ -56,28 +60,15 @@ script = ExtResource( 2 )
prefix = "Dither intensity:" prefix = "Dither intensity:"
snap_step = 0.1 snap_step = 0.1
[node name="OptionsContainer" parent="VBoxContainer" index="3"] [node name="OptionsContainer" parent="VBoxContainer" index="4"]
margin_top = 260.0 margin_top = 284.0
margin_right = 278.0 margin_bottom = 308.0
margin_bottom = 284.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"] [node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ] items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="4"] [node name="AnimateDialog" parent="." index="4"]
visible = false margin_bottom = 316.0
margin_right = 278.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[connection signal="value_changed" from="VBoxContainer/LevelsSlider" to="." method="_on_LevelsSlider_value_changed"] [connection signal="value_changed" from="VBoxContainer/LevelsSlider" to="." method="_on_LevelsSlider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/DitherSlider" to="." method="_on_DitherSlider_value_changed"] [connection signal="value_changed" from="VBoxContainer/DitherSlider" to="." method="_on_DitherSlider_value_changed"]

View file

@ -21,6 +21,9 @@ onready var wait_time_slider: ValueSlider = $VBoxContainer/WaitTime
func _ready() -> void: func _ready() -> void:
# set as in enum
animate_panel.add_float_property("Angle", angle_slider)
animate_panel.add_float_property("Initial Angle", init_angle_slider)
if not _is_webgl1(): if not _is_webgl1():
type_option_button.add_item("Rotxel with Smear", ROTXEL_SMEAR) type_option_button.add_item("Rotxel with Smear", ROTXEL_SMEAR)
rotxel_shader = load("res://src/Shaders/Rotation/SmearRotxel.shader") rotxel_shader = load("res://src/Shaders/Rotation/SmearRotxel.shader")
@ -34,18 +37,6 @@ func _ready() -> void:
type_option_button.emit_signal("item_selected", 0) type_option_button.emit_signal("item_selected", 0)
func set_animate_menu(_elements) -> void:
# set as in enum
animate_menu.add_check_item("Angle", Animate.ANGLE)
animate_menu.add_check_item("Initial Angle", Animate.INITIAL_ANGLE)
.set_animate_menu(Animate.size())
func set_initial_values() -> void:
initial_values[Animate.ANGLE] = deg2rad(angle_slider.value)
initial_values[Animate.INITIAL_ANGLE] = init_angle_slider.value
func _about_to_show() -> void: func _about_to_show() -> void:
if DrawingAlgos.clean_edge_shader == null: if DrawingAlgos.clean_edge_shader == null:
DrawingAlgos.clean_edge_shader = load("res://src/Shaders/Rotation/cleanEdge.gdshader") DrawingAlgos.clean_edge_shader = load("res://src/Shaders/Rotation/cleanEdge.gdshader")
@ -94,11 +85,8 @@ func _calculate_pivot() -> void:
func commit_action(cel: Image, _project: Project = Global.current_project) -> void: func commit_action(cel: Image, _project: Project = Global.current_project) -> void:
.commit_action(cel, _project) var angle: float = deg2rad(animate_panel.get_animated_values(commit_idx, Animate.ANGLE))
var angle: float = get_animated_value(_project, deg2rad(angle_slider.value), Animate.ANGLE) var init_angle: float = animate_panel.get_animated_values(commit_idx, Animate.INITIAL_ANGLE)
var init_angle: float = get_animated_value(
_project, init_angle_slider.value, Animate.INITIAL_ANGLE
)
var selection_size := cel.get_size() var selection_size := cel.get_size()
var selection_tex := ImageTexture.new() var selection_tex := ImageTexture.new()

View file

@ -6,42 +6,42 @@
[ext_resource path="res://src/UI/Nodes/ValueSliderV2.tscn" type="PackedScene" id=4] [ext_resource path="res://src/UI/Nodes/ValueSliderV2.tscn" type="PackedScene" id=4]
[node name="RotateImage" instance=ExtResource( 2 )] [node name="RotateImage" instance=ExtResource( 2 )]
visible = false
window_title = "Rotate Image" window_title = "Rotate Image"
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="VBoxContainer" parent="." index="3"] [node name="VBoxContainer" parent="." index="3"]
margin_bottom = 416.0 margin_bottom = 416.0
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"] [node name="AspectRatioContainer" parent="VBoxContainer" index="1"]
margin_right = 278.0 margin_bottom = 224.0
margin_bottom = 228.0
[node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"] [node name="Preview" parent="VBoxContainer/AspectRatioContainer" index="0"]
margin_left = 25.0 margin_left = 80.0
margin_right = 253.0 margin_right = 280.0
margin_bottom = 228.0 margin_bottom = 200.0
[node name="Indicator" type="Control" parent="VBoxContainer/AspectRatioContainer" index="1"] [node name="Indicator" type="Control" parent="VBoxContainer/AspectRatioContainer" index="1"]
margin_left = 25.0 margin_left = 80.0
margin_right = 253.0 margin_right = 280.0
margin_bottom = 228.0 margin_bottom = 200.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
[node name="LiveSettings" type="HBoxContainer" parent="VBoxContainer" index="1"] [node name="LiveSettings" type="HBoxContainer" parent="VBoxContainer" index="2"]
margin_top = 232.0 margin_top = 228.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 256.0 margin_bottom = 252.0
alignment = 1 alignment = 1
[node name="LiveCheckbox" type="CheckBox" parent="VBoxContainer/LiveSettings" index="0"] [node name="LiveCheckbox" type="CheckBox" parent="VBoxContainer/LiveSettings" index="0"]
margin_left = 85.0 margin_left = 126.0
margin_right = 193.0 margin_right = 234.0
margin_bottom = 24.0 margin_bottom = 24.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
pressed = true pressed = true
text = "Live Preview" text = "Live Preview"
[node name="WaitTime" parent="VBoxContainer" index="2" instance=ExtResource( 3 )] [node name="WaitTime" parent="VBoxContainer" index="3" instance=ExtResource( 3 )]
visible = false visible = false
margin_top = 232.0 margin_top = 232.0
margin_right = 326.0 margin_right = 326.0
@ -53,10 +53,10 @@ editable = false
prefix = "Preview delay:" prefix = "Preview delay:"
suffix = "ms" suffix = "ms"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer" index="3"] [node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer" index="4"]
margin_top = 260.0 margin_top = 256.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 280.0 margin_bottom = 276.0
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2" index="0"] [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2" index="0"]
margin_top = 3.0 margin_top = 3.0
@ -66,24 +66,24 @@ text = "Type:"
[node name="TypeOptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer2" index="1"] [node name="TypeOptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer2" index="1"]
margin_left = 38.0 margin_left = 38.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
[node name="HSeparator" type="HSeparator" parent="VBoxContainer" index="4"] [node name="HSeparator" type="HSeparator" parent="VBoxContainer" index="5"]
margin_top = 284.0 margin_top = 280.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 288.0 margin_bottom = 284.0
[node name="PivotOptions" type="HBoxContainer" parent="VBoxContainer" index="5"] [node name="PivotOptions" type="HBoxContainer" parent="VBoxContainer" index="6"]
margin_top = 292.0 margin_top = 288.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 316.0 margin_bottom = 312.0
[node name="Pivot" parent="VBoxContainer/PivotOptions" index="0" instance=ExtResource( 4 )] [node name="Pivot" parent="VBoxContainer/PivotOptions" index="0" instance=ExtResource( 4 )]
margin_right = 220.0 margin_right = 302.0
margin_bottom = 24.0 margin_bottom = 24.0
size_flags_horizontal = 3 size_flags_horizontal = 3
step = 0.5 step = 0.5
@ -94,73 +94,73 @@ prefix_x = "Pivot x:"
prefix_y = "Pivot y:" prefix_y = "Pivot y:"
[node name="Centre" type="Button" parent="VBoxContainer/PivotOptions" index="1"] [node name="Centre" type="Button" parent="VBoxContainer/PivotOptions" index="1"]
margin_left = 224.0 margin_left = 306.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 24.0 margin_bottom = 24.0
hint_tooltip = "Places the pivot at the center of the image, or at the center of the selection, if it is present." hint_tooltip = "Places the pivot at the center of the image, or at the center of the selection, if it is present."
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
text = "Center" text = "Center"
[node name="HSeparator2" type="HSeparator" parent="VBoxContainer" index="6"] [node name="HSeparator2" type="HSeparator" parent="VBoxContainer" index="7"]
margin_top = 320.0 margin_top = 316.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 324.0 margin_bottom = 320.0
[node name="AngleSlider" parent="VBoxContainer" index="7" instance=ExtResource( 3 )] [node name="AngleSlider" parent="VBoxContainer" index="8" instance=ExtResource( 3 )]
margin_top = 328.0 margin_top = 324.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 352.0 margin_bottom = 348.0
max_value = 359.0 max_value = 359.0
prefix = "Angle:" prefix = "Angle:"
suffix = "°" suffix = "°"
snap_step = 45.0 snap_step = 45.0
[node name="QuickRotations" type="HBoxContainer" parent="VBoxContainer" index="8"] [node name="QuickRotations" type="HBoxContainer" parent="VBoxContainer" index="9"]
margin_top = 356.0 margin_top = 352.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 376.0 margin_bottom = 372.0
alignment = 1 alignment = 1
[node name="Deduct90" type="Button" parent="VBoxContainer/QuickRotations" index="0"] [node name="Deduct90" type="Button" parent="VBoxContainer/QuickRotations" index="0"]
margin_right = 52.0 margin_right = 68.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "-90" text = "-90"
[node name="Deduct45" type="Button" parent="VBoxContainer/QuickRotations" index="1"] [node name="Deduct45" type="Button" parent="VBoxContainer/QuickRotations" index="1"]
margin_left = 56.0 margin_left = 72.0
margin_right = 108.0 margin_right = 141.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "-45" text = "-45"
[node name="Zero" type="Button" parent="VBoxContainer/QuickRotations" index="2"] [node name="Zero" type="Button" parent="VBoxContainer/QuickRotations" index="2"]
margin_left = 112.0 margin_left = 145.0
margin_right = 165.0 margin_right = 214.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "0" text = "0"
[node name="Add45" type="Button" parent="VBoxContainer/QuickRotations" index="3"] [node name="Add45" type="Button" parent="VBoxContainer/QuickRotations" index="3"]
margin_left = 169.0 margin_left = 218.0
margin_right = 221.0 margin_right = 287.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "+45" text = "+45"
[node name="Add90" type="Button" parent="VBoxContainer/QuickRotations" index="4"] [node name="Add90" type="Button" parent="VBoxContainer/QuickRotations" index="4"]
margin_left = 225.0 margin_left = 291.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 20.0 margin_bottom = 20.0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "+90" text = "+90"
[node name="SmearOptions" type="VBoxContainer" parent="VBoxContainer" index="9"] [node name="SmearOptions" type="VBoxContainer" parent="VBoxContainer" index="10"]
visible = false visible = false
margin_top = 352.0 margin_top = 352.0
margin_right = 326.0 margin_right = 326.0
@ -194,37 +194,20 @@ prefix = "Initial angle:"
suffix = "°" suffix = "°"
snap_step = 45.0 snap_step = 45.0
[node name="HSeparator3" type="HSeparator" parent="VBoxContainer" index="10"] [node name="HSeparator3" type="HSeparator" parent="VBoxContainer" index="11"]
margin_top = 380.0 margin_top = 376.0
margin_right = 278.0 margin_right = 360.0
margin_bottom = 384.0 margin_bottom = 380.0
[node name="OptionsContainer" parent="VBoxContainer" index="11"] [node name="OptionsContainer" parent="VBoxContainer" index="12"]
margin_top = 388.0 margin_top = 384.0
margin_right = 278.0 margin_bottom = 408.0
margin_bottom = 412.0
[node name="AffectOptionButton" parent="VBoxContainer/OptionsContainer" index="1"]
margin_right = 278.0
items = [ "Selected cels", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
[node name="AnimationOptions" parent="VBoxContainer" index="12"]
margin_top = 416.0
margin_right = 278.0
margin_bottom = 450.0
[node name="PanelContainer" parent="VBoxContainer/AnimationOptions" index="1"]
margin_right = 157.0
[node name="AnimateMenu" parent="VBoxContainer/AnimationOptions/PanelContainer" index="0"]
margin_right = 88.0
[node name="InitalButton" parent="VBoxContainer/AnimationOptions" index="2"]
margin_left = 161.0
margin_right = 278.0
[node name="WaitApply" type="Timer" parent="." index="4"] [node name="WaitApply" type="Timer" parent="." index="4"]
[node name="AnimateDialog" parent="." index="5"]
margin_bottom = 416.0
[connection signal="draw" from="VBoxContainer/AspectRatioContainer/Indicator" to="." method="_on_Indicator_draw"] [connection signal="draw" from="VBoxContainer/AspectRatioContainer/Indicator" to="." method="_on_Indicator_draw"]
[connection signal="gui_input" from="VBoxContainer/AspectRatioContainer/Indicator" to="." method="_on_Indicator_gui_input"] [connection signal="gui_input" from="VBoxContainer/AspectRatioContainer/Indicator" to="." method="_on_Indicator_gui_input"]
[connection signal="toggled" from="VBoxContainer/LiveSettings/LiveCheckbox" to="." method="_on_LiveCheckbox_toggled"] [connection signal="toggled" from="VBoxContainer/LiveSettings/LiveCheckbox" to="." method="_on_LiveCheckbox_toggled"]

View file

@ -0,0 +1,165 @@
class_name AnimatePanel
extends PanelContainer
var image_effect_node: ConfirmationDialog
var frames := [] # Set this value before calling "get_animated_values"
var properties := [] # Contains dictionary of properties
var resetter_values := [] # Contains the Original properties without any change
var _current_id: int = 0 # The property currently selected in "property_list"
onready var can_animate_button: CheckBox = $"%CanAnimate"
onready var property_list: ItemList = $"%PropertyList"
onready var initial_value: ValueSlider = $"%Initial"
onready var final_value: ValueSlider = $"%Final"
onready var preview_slider: TextureProgress = $"%PreviewSlider"
func _ready() -> void:
_populate_ease_type()
_populate_transition_type()
$"%Options".visible = false
func re_calibrate_preview_slider():
preview_slider.visible = false
preview_slider.max_value = frames[-1] + 1
preview_slider.min_value = frames[0] + 1
preview_slider.value = image_effect_node.commit_idx + 1
preview_slider.visible = true
func add_float_property(name: String, property_node: Range):
var info = {
"range_node": property_node,
"can_animate": false,
"initial_value": property_node.value,
"transition_type": Tween.TRANS_LINEAR,
"ease_type": Tween.EASE_IN,
}
properties.append(info)
resetter_values.append(property_node.value)
property_list.add_item(name)
property_node.connect("value_changed", self, "_on_range_node_value_changed")
func get_animated_values(frame_idx: int, property_idx := 0) -> float:
var tween = SceneTreeTween.new()
if property_idx <= 0 or property_idx < properties.size():
if frame_idx in frames:
if properties[property_idx]["can_animate"] and frames.size() > 1:
var duration = frames.size() - 1
var elapsed = frames.find(frame_idx)
var initial = properties[property_idx]["initial_value"]
var delta = properties[property_idx]["range_node"].value - initial
var transition_type = properties[property_idx]["transition_type"]
var ease_type = properties[property_idx]["ease_type"]
return tween.interpolate_value(
initial, delta, elapsed, duration, transition_type, ease_type
)
else:
return properties[property_idx]["range_node"].value
else:
return resetter_values[property_idx]
else:
printerr("something is wrong")
return 0.0
func _on_Initial_value_changed(value) -> void:
properties[_current_id]["initial_value"] = value
image_effect_node.update_preview()
func _on_Final_value_changed(value: float) -> void:
if properties[_current_id]["range_node"].value != value:
properties[_current_id]["range_node"].value = value
func _on_range_node_value_changed(_value) -> void:
# Value is changed from outside the Animate Panel
if properties[_current_id]["range_node"].value != final_value.value:
if final_value.is_connected("value_changed", self, "_on_Final_value_changed"):
final_value.disconnect("value_changed", self, "_on_Final_value_changed")
final_value.value = properties[_current_id]["range_node"].value
final_value.connect("value_changed", self, "_on_Final_value_changed")
func _on_CanAnimate_toggled(button_pressed: bool) -> void:
properties[_current_id]["can_animate"] = button_pressed
$"%Initial".editable = button_pressed
$"%Final".editable = button_pressed
$"%EaseType".disabled = !button_pressed
$"%TransitionType".disabled = !button_pressed
image_effect_node.update_preview()
func _on_PropertyList_item_selected(index: int) -> void:
_current_id = index
if not $"%Options".visible:
$"%Options".visible = true
$"%Options".visible = true
_refresh_properties(_current_id)
func _refresh_properties(idx: int):
if initial_value.is_connected("value_changed", self, "_on_Initial_value_changed"):
initial_value.disconnect("value_changed", self, "_on_Initial_value_changed")
if final_value.is_connected("value_changed", self, "_on_Final_value_changed"):
final_value.disconnect("value_changed", self, "_on_Final_value_changed")
# nodes setup
var property_node = properties[idx]["range_node"]
if property_node is ValueSlider:
final_value.snap_step = property_node.snap_step
initial_value.snap_step = property_node.snap_step
final_value.max_value = property_node.max_value
final_value.min_value = property_node.min_value
final_value.step = property_node.step
initial_value.max_value = property_node.max_value
initial_value.min_value = property_node.min_value
initial_value.step = property_node.step
# now update values
can_animate_button.pressed = properties[idx]["can_animate"]
initial_value.value = properties[idx]["initial_value"]
if properties[idx]["range_node"].value != final_value.value:
final_value.value = properties[idx]["range_node"].value
$"%Name".text = property_list.get_item_text(idx)
initial_value.connect("value_changed", self, "_on_Initial_value_changed")
final_value.connect("value_changed", self, "_on_Final_value_changed")
func _populate_ease_type():
$"%EaseType".add_item("Start slowly and speeds up towards the end", Tween.EASE_IN)
$"%EaseType".add_item("Starts quickly and slows down towards the end.", Tween.EASE_OUT)
$"%EaseType".add_item("Slowest at both ends fast at middle", Tween.EASE_IN_OUT)
$"%EaseType".add_item("Fast at both ends slow at middle", Tween.EASE_OUT_IN)
func _populate_transition_type():
$"%TransitionType".add_item("Linear", Tween.TRANS_LINEAR)
$"%TransitionType".add_item("Quadratic (to the power of 2)", Tween.TRANS_QUAD)
$"%TransitionType".add_item("Cubic (to the power of 3)", Tween.TRANS_CUBIC)
$"%TransitionType".add_item("Quartic (to the power of 4)", Tween.TRANS_QUART)
$"%TransitionType".add_item("Quintic (to the power of 5)", Tween.TRANS_QUINT)
$"%TransitionType".add_item("Exponential (to the power of x)", Tween.TRANS_EXPO)
$"%TransitionType".add_item("Square Root", Tween.TRANS_CIRC)
$"%TransitionType".add_item("Sine", Tween.TRANS_SINE)
$"%TransitionType".add_item("Wiggling around the edges", Tween.TRANS_ELASTIC)
$"%TransitionType".add_item("Bouncing at the end", Tween.TRANS_BOUNCE)
$"%TransitionType".add_item("Backing out at ends", Tween.TRANS_BACK)
func _on_EaseType_item_selected(index: int) -> void:
properties[_current_id]["ease_type"] = $"%EaseType".get_item_id(index)
image_effect_node.update_preview()
func _on_TransitionType_item_selected(index: int) -> void:
properties[_current_id]["transition_type"] = $"%TransitionType".get_item_id(index)
image_effect_node.update_preview()
func _on_PreviewSlider_value_changed(value: float) -> void:
image_effect_node.set_and_update_preview_image(value - 1)

View file

@ -0,0 +1,156 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://src/UI/Nodes/AnimatePanel.gd" type="Script" id=1]
[ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=2]
[node name="AnimatePanel" type="PanelContainer"]
margin_right = 360.0
margin_bottom = 226.0
script = ExtResource( 1 )
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 353.0
margin_bottom = 219.0
[node name="TopOptions" type="HBoxContainer" parent="VBoxContainer"]
margin_right = 346.0
margin_bottom = 24.0
[node name="Label" type="Label" parent="VBoxContainer/TopOptions"]
margin_top = 5.0
margin_right = 143.0
margin_bottom = 19.0
theme_type_variation = "Header"
text = "Animatable Properties"
[node name="PreviewSlider" parent="VBoxContainer/TopOptions" instance=ExtResource( 2 )]
unique_name_in_owner = true
margin_left = 147.0
margin_right = 346.0
min_value = 1.0
max_value = 1.0
value = 1.0
prefix = "Preview Frame:"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 28.0
margin_right = 346.0
margin_bottom = 212.0
size_flags_vertical = 3
[node name="PropertyList" type="ItemList" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
margin_right = 100.0
margin_bottom = 184.0
rect_min_size = Vector2( 100, 0 )
[node name="Options" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
visible = false
margin_left = 104.0
margin_right = 346.0
margin_bottom = 194.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/Options"]
margin_right = 40.0
margin_bottom = 40.0
[node name="Name" type="Label" parent="VBoxContainer/HBoxContainer/Options/HBoxContainer"]
unique_name_in_owner = true
margin_right = 242.0
margin_bottom = 14.0
theme_type_variation = "Header"
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/HBoxContainer/Options/HBoxContainer"]
margin_right = 40.0
margin_bottom = 4.0
size_flags_horizontal = 3
[node name="CanAnimate" type="CheckBox" parent="VBoxContainer/HBoxContainer/Options"]
unique_name_in_owner = true
margin_left = 108.0
margin_top = 18.0
margin_right = 242.0
margin_bottom = 58.0
size_flags_horizontal = 8
text = "Animate"
[node name="Values" type="GridContainer" parent="VBoxContainer/HBoxContainer/Options"]
margin_top = 62.0
margin_right = 242.0
margin_bottom = 162.0
columns = 2
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Options/Values"]
margin_top = 5.0
margin_right = 80.0
margin_bottom = 19.0
text = "Initial Value:"
align = 2
[node name="Initial" parent="VBoxContainer/HBoxContainer/Options/Values" instance=ExtResource( 2 )]
unique_name_in_owner = true
margin_left = 84.0
margin_right = 242.0
editable = false
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer/Options/Values"]
margin_top = 33.0
margin_right = 80.0
margin_bottom = 47.0
text = "Final Value: "
align = 2
[node name="Final" parent="VBoxContainer/HBoxContainer/Options/Values" instance=ExtResource( 2 )]
unique_name_in_owner = true
margin_left = 84.0
margin_top = 28.0
margin_right = 242.0
margin_bottom = 52.0
editable = false
[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer/Options/Values"]
margin_top = 59.0
margin_right = 80.0
margin_bottom = 73.0
text = "Ease Type:"
align = 2
[node name="EaseType" type="OptionButton" parent="VBoxContainer/HBoxContainer/Options/Values"]
unique_name_in_owner = true
margin_left = 84.0
margin_top = 56.0
margin_right = 242.0
margin_bottom = 76.0
size_flags_vertical = 4
disabled = true
clip_text = true
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer/Options/Values"]
margin_top = 83.0
margin_right = 80.0
margin_bottom = 97.0
text = "Interpolate :"
align = 2
[node name="TransitionType" type="OptionButton" parent="VBoxContainer/HBoxContainer/Options/Values"]
unique_name_in_owner = true
margin_left = 84.0
margin_top = 80.0
margin_right = 242.0
margin_bottom = 100.0
hint_tooltip = "How the value changes while moving from initial to final value"
size_flags_vertical = 4
disabled = true
clip_text = true
[connection signal="value_changed" from="VBoxContainer/TopOptions/PreviewSlider" to="." method="_on_PreviewSlider_value_changed"]
[connection signal="item_selected" from="VBoxContainer/HBoxContainer/PropertyList" to="." method="_on_PropertyList_item_selected"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer/Options/CanAnimate" to="." method="_on_CanAnimate_toggled"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer/Options/Values/Initial" to="." method="_on_Initial_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer/Options/Values/Final" to="." method="_on_Final_value_changed"]
[connection signal="item_selected" from="VBoxContainer/HBoxContainer/Options/Values/EaseType" to="." method="_on_EaseType_item_selected"]
[connection signal="item_selected" from="VBoxContainer/HBoxContainer/Options/Values/TransitionType" to="." method="_on_TransitionType_item_selected"]