Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to Animation Tags #560

Merged
merged 65 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
0aa41f6
Merge pull request #1 from Orama-Interactive/master
Variable-ind Jan 26, 2021
2c502db
Merge pull request #2 from Orama-Interactive/master
Variable-ind Jan 26, 2021
63c5ea2
Merge pull request #5 from Orama-Interactive/master
Variable-ind Jan 29, 2021
dc4278d
Merge pull request #7 from Orama-Interactive/master
Variable-ind Feb 3, 2021
6b824f6
Merge pull request #8 from Orama-Interactive/master
Variable-ind Feb 4, 2021
5d74449
fixed some more bugs
Variable-ind Feb 5, 2021
925d3c9
Removed some more bugs
Variable-ind Feb 5, 2021
5d0dda6
Added "Replace Frame" option
Variable-ind Feb 5, 2021
81e0583
Update PreviewDialog.tscn
Variable-ind Feb 5, 2021
04d7316
Update PreviewDialog.gd
Variable-ind Feb 5, 2021
563bb43
Update OpenSave.gd
Variable-ind Feb 5, 2021
c03122c
Merge pull request #9 from Orama-Interactive/master
Variable-ind Feb 6, 2021
4cc7c88
Added some new pixel fonts
Variable-ind Feb 7, 2021
f8ac82e
Merge pull request #10 from Orama-Interactive/master
Variable-ind Feb 9, 2021
d1d0a1e
updating (#12)
Variable-ind May 4, 2021
77e559f
Merge pull request #13 from Orama-Interactive/master
Variable-ind May 4, 2021
90cbee1
Merge pull request #14 from Orama-Interactive/master
Variable-ind May 5, 2021
62331c8
Merge pull request #15 from Orama-Interactive/master
Variable-ind May 10, 2021
c178e9e
removed unneeded fonts
Variable-ind May 10, 2021
6fdaad9
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 11, 2021
ae6a284
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 13, 2021
a26cf59
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 13, 2021
0df974d
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 14, 2021
d1b67e0
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 16, 2021
fbbbccb
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 18, 2021
878b077
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 21, 2021
d4b4cf0
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 22, 2021
a349460
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 22, 2021
281a7ce
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 24, 2021
15e7685
Set project name. Also fixed a bug
Variable-ind May 24, 2021
6488d42
Update CreateNewImage.tscn
Variable-ind May 24, 2021
1b2a0c4
Update CreateNewImage.gd
Variable-ind May 24, 2021
c12d00b
Merge branch 'Orama-Interactive:master' into master
Variable-ind May 29, 2021
6dce0b2
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jun 14, 2021
58f4296
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jun 23, 2021
d263cc5
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jul 5, 2021
a122562
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jul 7, 2021
08f4027
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jul 10, 2021
d21c2da
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jul 12, 2021
9e9fd9d
Merge branch 'Orama-Interactive:master' into master
Variable-ind Jul 15, 2021
10b4661
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 1, 2021
c9a37fc
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 8, 2021
898535e
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 21, 2021
8251633
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 26, 2021
e112b8c
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 27, 2021
f558855
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 29, 2021
ac8b46b
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 30, 2021
5687da5
Merge branch 'Orama-Interactive:master' into master
Variable-ind Aug 30, 2021
43e79e5
Merge branch 'Orama-Interactive:master' into master
Variable-ind Sep 3, 2021
801252c
Merge branch 'Orama-Interactive:master' into master
Variable-ind Sep 6, 2021
c89a3fb
Merge branch 'Orama-Interactive:master' into master
Variable-ind Sep 23, 2021
8a07008
Merge branch 'Orama-Interactive:master' into master
Variable-ind Oct 5, 2021
397120b
Merge branch 'Orama-Interactive:master' into master
Variable-ind Oct 6, 2021
0468aa6
Merge branch 'Orama-Interactive:master' into master
Variable-ind Oct 9, 2021
78ce6dc
Merge branch 'Orama-Interactive:master' into master
Variable-ind Oct 15, 2021
61be980
Merge branch 'Orama-Interactive:master' into master
Variable-ind Oct 15, 2021
ab13d27
Merge branch 'Orama-Interactive:master' into master
Variable-ind Nov 12, 2021
866e2e3
Merge branch 'Orama-Interactive:master' into master
Variable-ind Nov 15, 2021
c499c20
Animation tag fix (a)
Variable-ind Nov 15, 2021
8f37795
Animation tag fix (b)
Variable-ind Nov 15, 2021
a2272e1
Animation tag fix (c)
Variable-ind Nov 15, 2021
d8159c2
Animation tag fix (d)
Variable-ind Nov 15, 2021
0e187eb
added a randomizer...
Variable-ind Nov 15, 2021
8fddf0d
Fix Tag scrolling without cels when scrolled on it
Variable-ind Nov 15, 2021
304d7d3
removed randomize() cause it's not needed
Variable-ind Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Classes/Project.gd
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func animation_tags_changed(value : Array) -> void:
child.queue_free()

for tag in animation_tags:
var tag_base_size = Global.animation_timeline.cel_size + 3
var tag_base_size = Global.animation_timeline.cel_size + 4
var tag_c : Container = animation_tag_node.instance()
Global.tag_container.add_child(tag_c)
tag_c.tag = tag
Expand All @@ -589,9 +589,10 @@ func animation_tags_changed(value : Array) -> void:
tag_c.get_node("Label").modulate = tag.color
tag_c.get_node("Line2D").default_color = tag.color

tag_c.rect_position.x = (tag.from - 1) * tag_base_size + tag.from
tag_c.rect_position.x = (tag.from - 1) * tag_base_size + 1 # Added 1 to answer to get starting position of next cel
var tag_size : int = tag.to - tag.from
tag_c.rect_min_size.x = (tag_size + 1) * tag_base_size
tag_c.rect_min_size.x = (tag_size + 1) * tag_base_size - 4 # We dont need the 4 pixels at the end of last cel
tag_c.rect_position.y = 1 # To make top line of tag visible
tag_c.get_node("Line2D").points[2] = Vector2(tag_c.rect_min_size.x, 0)
tag_c.get_node("Line2D").points[3] = Vector2(tag_c.rect_min_size.x, 32)

Expand Down
8 changes: 4 additions & 4 deletions src/UI/Timeline/AnimationTimeline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ func cel_size_changed(value : int) -> void:
frame_id.rect_size.x = cel_size

for tag_c in Global.tag_container.get_children():
var tag_base_size = cel_size + 3
var tag_base_size = cel_size + 4
var tag : AnimationTag = tag_c.tag
tag_c.rect_position.x = (tag.from - 1) * tag_base_size + tag.from
tag_c.rect_position.x = (tag.from - 1) * tag_base_size + 1 # Added 1 to answer to get starting position of next cel
var tag_size : int = tag.to - tag.from
tag_c.rect_min_size.x = (tag_size + 1) * tag_base_size
tag_c.rect_size.x = (tag_size + 1) * tag_base_size
tag_c.rect_min_size.x = (tag_size + 1) * tag_base_size - 4 # We dont need the 4 pixels at the end of last cel
tag_c.rect_size.x = (tag_size + 1) * tag_base_size - 4 # We dont need the 4 pixels at the end of last cel
tag_c.get_node("Line2D").points[2] = Vector2(tag_c.rect_min_size.x, 0)
tag_c.get_node("Line2D").points[3] = Vector2(tag_c.rect_min_size.x, 32)

Expand Down
85 changes: 22 additions & 63 deletions src/UI/Timeline/AnimationTimeline.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ margin_bottom = 25.0
size_flags_vertical = 0
custom_constants/separation = 9

[node name="AddLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="AddLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_right = 22.0
margin_bottom = 22.0
rect_min_size = Vector2( 22, 22 )
Expand All @@ -184,9 +182,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="RemoveLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="RemoveLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 31.0
margin_right = 53.0
margin_bottom = 22.0
Expand All @@ -212,9 +208,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="MoveUpLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="MoveUpLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 62.0
margin_right = 84.0
margin_bottom = 22.0
Expand All @@ -240,9 +234,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="MoveDownLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="MoveDownLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 93.0
margin_right = 115.0
margin_bottom = 22.0
Expand All @@ -268,9 +260,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="CloneLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="CloneLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 124.0
margin_right = 146.0
margin_bottom = 22.0
Expand All @@ -295,9 +285,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="MergeDownLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=[
"UIButtons",
]]
[node name="MergeDownLayer" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 155.0
margin_right = 177.0
margin_bottom = 22.0
Expand Down Expand Up @@ -348,9 +336,7 @@ alignment = 2
margin_right = 140.0
margin_bottom = 24.0

[node name="AddFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="AddFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_top = 2.0
margin_right = 20.0
margin_bottom = 22.0
Expand All @@ -375,9 +361,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="DeleteFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="DeleteFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 24.0
margin_top = 2.0
margin_right = 44.0
Expand Down Expand Up @@ -405,9 +389,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="CopyFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="CopyFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 48.0
margin_top = 2.0
margin_right = 68.0
Expand All @@ -433,9 +415,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="FrameTagButton" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="FrameTagButton" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 72.0
margin_top = 2.0
margin_right = 92.0
Expand All @@ -461,9 +441,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="MoveLeft" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="MoveLeft" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 96.0
margin_top = 2.0
margin_right = 116.0
Expand All @@ -490,9 +468,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="MoveRight" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
"UIButtons",
]]
[node name="MoveRight" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 120.0
margin_top = 2.0
margin_right = 140.0
Expand Down Expand Up @@ -523,9 +499,7 @@ margin_left = 180.0
margin_right = 320.0
margin_bottom = 24.0

[node name="FirstFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="FirstFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_top = 2.0
margin_right = 20.0
margin_bottom = 22.0
Expand All @@ -551,9 +525,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="PreviousFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="PreviousFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 24.0
margin_top = 2.0
margin_right = 44.0
Expand All @@ -580,9 +552,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="PlayBackwards" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="PlayBackwards" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 48.0
margin_top = 2.0
margin_right = 68.0
Expand Down Expand Up @@ -610,9 +580,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="PlayForward" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="PlayForward" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 72.0
margin_top = 2.0
margin_right = 92.0
Expand Down Expand Up @@ -641,9 +609,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="NextFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="NextFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 96.0
margin_top = 2.0
margin_right = 116.0
Expand All @@ -670,9 +636,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="LastFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
[node name="LastFrame" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 120.0
margin_top = 2.0
margin_right = 140.0
Expand Down Expand Up @@ -704,9 +668,7 @@ margin_left = 360.0
margin_right = 498.0
margin_bottom = 24.0

[node name="OnionSkinningSettings" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
[node name="OnionSkinningSettings" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_top = 2.0
margin_right = 12.0
margin_bottom = 22.0
Expand All @@ -732,9 +694,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="OnionSkinning" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
[node name="OnionSkinning" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_left = 16.0
margin_top = 2.0
margin_right = 36.0
Expand All @@ -761,9 +721,7 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="LoopAnim" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
[node name="LoopAnim" type="Button" parent="MarginContainer/AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_left = 40.0
margin_top = 2.0
margin_right = 60.0
Expand Down Expand Up @@ -859,6 +817,7 @@ margin_left = 219.0
margin_right = 902.0
margin_bottom = 32.0
rect_min_size = Vector2( 0, 32 )
mouse_filter = 2
size_flags_horizontal = 3
theme = SubResource( 20 )
scroll_vertical_enabled = false
Expand Down
1 change: 1 addition & 0 deletions src/UI/Timeline/FrameTagDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func _on_AddTag_pressed() -> void:
current_tag_id = Global.current_project.animation_tags.size()
options_dialog.get_node("GridContainer/FromSpinBox").value = Global.current_project.current_frame + 1
options_dialog.get_node("GridContainer/ToSpinBox").value = Global.current_project.current_frame + 1
options_dialog.get_node("GridContainer/ColorPickerButton").color = Color(randf(),randf(),randf())


func _on_EditButton_pressed(_tag_id : int) -> void:
Expand Down