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

Animation Timeline UI Improvements (#769)

* Fixed link cel indicator color and animation tags position

* New scrolling and min size

* fixed dockable container for the timeline min size

* Cleanup

* Tweaked minimum size

* Removed some hacks that are no longer needed

* Fixed frame scrollbar not being in the right place at startup, added ensure_control_visible

* frame scroll horziontally without shift if can't scroll vertically + min size tweaks

* Renamed the frames/layer/cel containers

* Always scroll by whole frames

* Fixed conflict

* reoranized AnimationTimeline scene's node tree to wrok as expected

* tweaks

* Fixed tag position and removed uneeded layer button theme code

* added the icon theme code back, I thought this was for the timeline XD

* Smaller LayerButtons

* Save Layer and Cel size between sessions

* Combined _on_AddLayer_pressed and _on_AddGroup_pressed into 1 add_layer method

* Rename scroll container

* formatting

Co-authored-by: MrTriPie <MrTriPie>
This commit is contained in:
mrtripie 2022-10-21 09:04:26 -04:00 committed by GitHub
parent 88b102d9c6
commit e8281bf056
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 430 additions and 433 deletions

View file

@ -28,7 +28,9 @@ func set_reference_to(control: Control) -> void:
if _reference_to != control: if _reference_to != control:
if _reference_to: if _reference_to:
_reference_to.disconnect("renamed", self, "_on_reference_to_renamed") _reference_to.disconnect("renamed", self, "_on_reference_to_renamed")
_reference_to.disconnect("minimum_size_changed", self, "minimum_size_changed")
_reference_to = control _reference_to = control
_reference_to.connect("minimum_size_changed", self, "minimum_size_changed")
minimum_size_changed() minimum_size_changed()
if not _reference_to: if not _reference_to:
return return

View file

@ -182,12 +182,12 @@ onready var current_frame_mark_label: Label = control.find_node("CurrentFrameMar
onready var animation_timeline: Panel = control.find_node("Animation Timeline") onready var animation_timeline: Panel = control.find_node("Animation Timeline")
onready var animation_timer: Timer = animation_timeline.find_node("AnimationTimer") onready var animation_timer: Timer = animation_timeline.find_node("AnimationTimer")
onready var frame_ids: HBoxContainer = animation_timeline.find_node("FrameIDs") onready var frame_hbox: HBoxContainer = animation_timeline.find_node("FrameHBox")
onready var layer_vbox: VBoxContainer = animation_timeline.find_node("LayerVBox")
onready var cel_vbox: VBoxContainer = animation_timeline.find_node("CelVBox")
onready var tag_container: Control = animation_timeline.find_node("TagContainer")
onready var play_forward: BaseButton = animation_timeline.find_node("PlayForward") onready var play_forward: BaseButton = animation_timeline.find_node("PlayForward")
onready var play_backwards: BaseButton = animation_timeline.find_node("PlayBackwards") onready var play_backwards: BaseButton = animation_timeline.find_node("PlayBackwards")
onready var layers_container: VBoxContainer = animation_timeline.find_node("LayersContainer")
onready var frames_container: VBoxContainer = animation_timeline.find_node("FramesContainer")
onready var tag_container: Control = animation_timeline.find_node("TagContainer")
onready var remove_frame_button: BaseButton = animation_timeline.find_node("DeleteFrame") onready var remove_frame_button: BaseButton = animation_timeline.find_node("DeleteFrame")
onready var move_left_frame_button: BaseButton = animation_timeline.find_node("MoveLeft") onready var move_left_frame_button: BaseButton = animation_timeline.find_node("MoveLeft")
onready var move_right_frame_button: BaseButton = animation_timeline.find_node("MoveRight") onready var move_right_frame_button: BaseButton = animation_timeline.find_node("MoveRight")

View file

@ -455,11 +455,11 @@ func _frame_changed(value: int) -> void:
Global.current_frame_mark_label.text = "%s/%s" % [str(current_frame + 1), frames.size()] Global.current_frame_mark_label.text = "%s/%s" % [str(current_frame + 1), frames.size()]
for i in frames.size(): for i in frames.size():
var frame_button: BaseButton = Global.frame_ids.get_child(i) var frame_button: BaseButton = Global.frame_hbox.get_child(i)
frame_button.pressed = false frame_button.pressed = false
for container in Global.frames_container.get_children(): # De-select all the other cels for cel_hbox in Global.cel_vbox.get_children(): # De-select all the other cels
if i < container.get_child_count(): if i < cel_hbox.get_child_count():
container.get_child(i).pressed = false cel_hbox.get_child(i).pressed = false
if selected_cels.empty(): if selected_cels.empty():
selected_cels.append([current_frame, current_layer]) selected_cels.append([current_frame, current_layer])
@ -467,15 +467,15 @@ func _frame_changed(value: int) -> void:
for cel in selected_cels: for cel in selected_cels:
var frame: int = cel[0] var frame: int = cel[0]
var layer: int = cel[1] var layer: int = cel[1]
if frame < Global.frame_ids.get_child_count(): if frame < Global.frame_hbox.get_child_count():
var frame_button: BaseButton = Global.frame_ids.get_child(frame) var frame_button: BaseButton = Global.frame_hbox.get_child(frame)
frame_button.pressed = true frame_button.pressed = true
var container_child_count: int = Global.frames_container.get_child_count() var vbox_child_count: int = Global.cel_vbox.get_child_count()
if layer < container_child_count: if layer < vbox_child_count:
var container = Global.frames_container.get_child(container_child_count - 1 - layer) var cel_hbox: Container = Global.cel_vbox.get_child(vbox_child_count - 1 - layer)
if frame < container.get_child_count(): if frame < cel_hbox.get_child_count():
var cel_button = container.get_child(frame) var cel_button = cel_hbox.get_child(frame)
cel_button.pressed = true cel_button.pressed = true
if current_frame < frames.size(): if current_frame < frames.size():
@ -495,14 +495,14 @@ func _layer_changed(value: int) -> void:
yield(Global.get_tree().create_timer(0.01), "timeout") yield(Global.get_tree().create_timer(0.01), "timeout")
self.current_frame = current_frame # Call frame_changed to update UI self.current_frame = current_frame # Call frame_changed to update UI
for layer_button in Global.layers_container.get_children(): for layer_button in Global.layer_vbox.get_children():
layer_button.pressed = false layer_button.pressed = false
for cel in selected_cels: for cel in selected_cels:
var layer: int = cel[1] var layer: int = cel[1]
if layer < Global.layers_container.get_child_count(): if layer < Global.layer_vbox.get_child_count():
var layer_button = Global.layers_container.get_child( var layer_button = Global.layer_vbox.get_child(
Global.layers_container.get_child_count() - 1 - layer Global.layer_vbox.get_child_count() - 1 - layer
) )
layer_button.pressed = true layer_button.pressed = true
@ -643,14 +643,14 @@ func add_frames(new_frames: Array, indices: Array) -> void: # indices should be
Global.animation_timeline.project_frame_added(indices[i]) Global.animation_timeline.project_frame_added(indices[i])
# Update the frames and frame buttons: # Update the frames and frame buttons:
for f in frames.size(): for f in frames.size():
Global.frame_ids.get_child(f).frame = f Global.frame_hbox.get_child(f).frame = f
Global.frame_ids.get_child(f).text = str(f + 1) Global.frame_hbox.get_child(f).text = str(f + 1)
# Update the cel buttons: # Update the cel buttons:
for l in layers.size(): for l in layers.size():
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).frame = f cel_hbox.get_child(f).frame = f
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
_set_timeline_first_and_last_frames() _set_timeline_first_and_last_frames()
@ -671,14 +671,14 @@ func remove_frames(indices: Array) -> void: # indices should be in ascending or
Global.animation_timeline.project_frame_removed(indices[i] - i) Global.animation_timeline.project_frame_removed(indices[i] - i)
# Update the frames and frame buttons: # Update the frames and frame buttons:
for f in frames.size(): for f in frames.size():
Global.frame_ids.get_child(f).frame = f Global.frame_hbox.get_child(f).frame = f
Global.frame_ids.get_child(f).text = str(f + 1) Global.frame_hbox.get_child(f).text = str(f + 1)
# Update the cel buttons: # Update the cel buttons:
for l in layers.size(): for l in layers.size():
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).frame = f cel_hbox.get_child(f).frame = f
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
_set_timeline_first_and_last_frames() _set_timeline_first_and_last_frames()
@ -692,14 +692,14 @@ func move_frame(from_index: int, to_index: int) -> void:
Global.animation_timeline.project_frame_added(to_index) Global.animation_timeline.project_frame_added(to_index)
# Update the frames and frame buttons: # Update the frames and frame buttons:
for f in frames.size(): for f in frames.size():
Global.frame_ids.get_child(f).frame = f Global.frame_hbox.get_child(f).frame = f
Global.frame_ids.get_child(f).text = str(f + 1) Global.frame_hbox.get_child(f).text = str(f + 1)
# Update the cel buttons: # Update the cel buttons:
for l in layers.size(): for l in layers.size():
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).frame = f cel_hbox.get_child(f).frame = f
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
_set_timeline_first_and_last_frames() _set_timeline_first_and_last_frames()
@ -728,11 +728,11 @@ func add_layers(new_layers: Array, indices: Array, cels: Array) -> void: # cels
# Update the layer indices and layer/cel buttons: # Update the layer indices and layer/cel buttons:
for l in layers.size(): for l in layers.size():
layers[l].index = l layers[l].index = l
Global.layers_container.get_child(layers.size() - 1 - l).layer = l Global.layer_vbox.get_child(layers.size() - 1 - l).layer = l
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).layer = l cel_hbox.get_child(f).layer = l
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
toggle_layer_buttons() toggle_layer_buttons()
@ -748,11 +748,11 @@ func remove_layers(indices: Array) -> void:
# Update the layer indices and layer/cel buttons: # Update the layer indices and layer/cel buttons:
for l in layers.size(): for l in layers.size():
layers[l].index = l layers[l].index = l
Global.layers_container.get_child(layers.size() - 1 - l).layer = l Global.layer_vbox.get_child(layers.size() - 1 - l).layer = l
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).layer = l cel_hbox.get_child(f).layer = l
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
toggle_layer_buttons() toggle_layer_buttons()
@ -779,11 +779,11 @@ func move_layers(from_indices: Array, to_indices: Array, to_parents: Array) -> v
# Update the layer indices and layer/cel buttons: # Update the layer indices and layer/cel buttons:
for l in layers.size(): for l in layers.size():
layers[l].index = l layers[l].index = l
Global.layers_container.get_child(layers.size() - 1 - l).layer = l Global.layer_vbox.get_child(layers.size() - 1 - l).layer = l
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).layer = l cel_hbox.get_child(f).layer = l
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
toggle_layer_buttons() toggle_layer_buttons()
@ -827,11 +827,11 @@ func swap_layers(a: Dictionary, b: Dictionary) -> void:
# Update the layer indices and layer/cel buttons: # Update the layer indices and layer/cel buttons:
for l in layers.size(): for l in layers.size():
layers[l].index = l layers[l].index = l
Global.layers_container.get_child(layers.size() - 1 - l).layer = l Global.layer_vbox.get_child(layers.size() - 1 - l).layer = l
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - l) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - l)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).layer = l cel_hbox.get_child(f).layer = l
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
toggle_layer_buttons() toggle_layer_buttons()
@ -850,10 +850,10 @@ func move_cel(from_frame: int, to_frame: int, layer: int) -> void:
Global.animation_timeline.project_cel_added(to_frame, layer) Global.animation_timeline.project_cel_added(to_frame, layer)
# Update the cel buttons for this layer: # Update the cel buttons for this layer:
var layer_cel_container = Global.frames_container.get_child(layers.size() - 1 - layer) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(layers.size() - 1 - layer)
for f in frames.size(): for f in frames.size():
layer_cel_container.get_child(f).frame = f cel_hbox.get_child(f).frame = f
layer_cel_container.get_child(f).button_setup() cel_hbox.get_child(f).button_setup()
func swap_cel(a_frame: int, a_layer: int, b_frame: int, b_layer: int) -> void: func swap_cel(a_frame: int, a_layer: int, b_frame: int, b_layer: int) -> void:

View file

@ -89,9 +89,6 @@ func change_theme(id: int) -> void:
clear_color = panel_stylebox.bg_color clear_color = panel_stylebox.bg_color
else: else:
clear_color = Color.gray clear_color = Color.gray
var lbpc: PanelContainer = Global.animation_timeline.find_node("LayerButtonPanelContainer")
var lbpc_stylebox: StyleBoxFlat = lbpc.get_stylebox("panel", "PanelContainer")
lbpc_stylebox.bg_color = clear_color
for child in Global.preferences_dialog.get_node("Popups").get_children(): for child in Global.preferences_dialog.get_node("Popups").get_children():
child.theme = theme child.theme = theme

View file

@ -19,9 +19,10 @@ onready var tag_spacer = find_node("TagSpacer")
onready var start_spacer = find_node("StartSpacer") onready var start_spacer = find_node("StartSpacer")
onready var timeline_scroll: ScrollContainer = find_node("TimelineScroll") onready var timeline_scroll: ScrollContainer = find_node("TimelineScroll")
onready var main_scroll: ScrollContainer = find_node("ScrollContainer") onready var frame_scroll_container: Control = find_node("FrameScrollContainer")
onready var timeline_container: VBoxContainer = find_node("TimelineContainer") onready var frame_scroll_bar: HScrollBar = find_node("FrameScrollBar")
onready var tag_scroll_container: ScrollContainer = find_node("TagScroll") onready var tag_scroll_container: ScrollContainer = find_node("TagScroll")
onready var layer_frame_h_split: HSplitContainer = find_node("LayerFrameHSplit")
onready var fps_spinbox: SpinBox = find_node("FPSValue") onready var fps_spinbox: SpinBox = find_node("FPSValue")
onready var onion_skinning_button: BaseButton = find_node("OnionSkinning") onready var onion_skinning_button: BaseButton = find_node("OnionSkinning")
onready var loop_animation_button: BaseButton = find_node("LoopAnim") onready var loop_animation_button: BaseButton = find_node("LoopAnim")
@ -29,14 +30,14 @@ onready var drag_highlight: ColorRect = find_node("DragHighlight")
func _ready() -> void: func _ready() -> void:
timeline_scroll.get_h_scrollbar().connect("value_changed", self, "_h_scroll_changed") frame_scroll_bar.connect("value_changed", self, "_frame_scroll_changed")
Global.animation_timer.wait_time = 1 / Global.current_project.fps Global.animation_timer.wait_time = 1 / Global.current_project.fps
fps_spinbox.value = Global.current_project.fps fps_spinbox.value = Global.current_project.fps
layer_frame_h_split.split_offset = Global.config_cache.get_value("timeline", "layer_size", 0)
self.cel_size = Global.config_cache.get_value("timeline", "cel_size", cel_size) # Call setter
# Set important size_flags (intentionally set at runtime) # Makes sure that the frame and tag scroll bars are in the right place:
# Otherwise you yont be able to see "TimelineScroll" in editor Global.layer_vbox.call_deferred("emit_signal", "resized")
find_node("EndSpacer").size_flags_horizontal = SIZE_EXPAND_FILL
timeline_scroll.size_flags_horizontal = SIZE_FILL
func _notification(what: int) -> void: func _notification(what: int) -> void:
@ -55,63 +56,48 @@ func _input(event: InputEvent) -> void:
) )
func _h_scroll_changed(value: float) -> void: func _get_minimum_size() -> Vector2:
# Let the main timeline ScrollContainer affect the tag ScrollContainer too # X targets enough to see layers, 1 frame, vertical scrollbar, and padding
tag_scroll_container.get_child(0).rect_min_size.x = ( # Y targets engough to see 1 layer
timeline_scroll.scroll_horizontal return Vector2(Global.layer_vbox.rect_size.x + cel_size + 26, cel_size + 105)
+ tag_scroll_container.rect_size.x * 3
func _frame_scroll_changed(value: float) -> void:
# Update the tag scroll as well:
tag_scroll_container.get_child(0).rect_min_size.x = Global.frame_hbox.rect_size.x
tag_scroll_container.scroll_horizontal = value
func _on_LayerVBox_resized() -> void:
# TODO: BUG Layers resizing doesn't update the tags!
frame_scroll_bar.margin_left = frame_scroll_container.rect_position.x
tag_spacer.rect_min_size.x = (
frame_scroll_container.rect_global_position.x
- tag_spacer.rect_global_position.x
) )
old_scroll = value # Needed for (_on_TimelineContainer_item_rect_changed)
var diff = start_spacer.rect_min_size.x - value
var a = main_scroll.scroll_horizontal
var b = timeline_scroll.scroll_horizontal
if a > b:
tag_scroll_container.scroll_horizontal = 0
tag_spacer.rect_min_size.x = diff
else:
tag_spacer.rect_min_size.x = 0
tag_scroll_container.scroll_horizontal = -diff
# the below two signals control scrolling functionality func _on_LayerFrameSplitContainer_gui_input(event: InputEvent) -> void:
func _on_AnimationTimeline_item_rect_changed() -> void: Global.config_cache.set_value("timeline", "layer_size", layer_frame_h_split.split_offset)
# Timeline size if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and not event.pressed:
timeline_scroll.rect_min_size.x = rect_size.x minimum_size_changed() # After you're done resizing the layers, update min size
func _on_TimelineContainer_item_rect_changed() -> void:
if not timeline_container:
return
# Layer movement
var limit = timeline_container.rect_size.x - main_scroll.rect_size.x
var amount = main_scroll.scroll_horizontal
start_spacer.rect_min_size.x = min(amount, max(0, limit - 1))
# Tag movement
var diff = start_spacer.rect_min_size.x - old_scroll
var a = main_scroll.scroll_horizontal
var b = timeline_scroll.scroll_horizontal
if a > b:
tag_spacer.rect_min_size.x = diff
tag_scroll_container.scroll_horizontal = 0
else:
tag_spacer.rect_min_size.x = 0
tag_scroll_container.scroll_horizontal = -diff
func cel_size_changed(value: int) -> void: func cel_size_changed(value: int) -> void:
cel_size = clamp(value, min_cel_size, max_cel_size) cel_size = clamp(value, min_cel_size, max_cel_size)
for layer_button in Global.layers_container.get_children(): minimum_size_changed()
Global.config_cache.set_value("timeline", "cel_size", cel_size)
for layer_button in Global.layer_vbox.get_children():
layer_button.rect_min_size.y = cel_size layer_button.rect_min_size.y = cel_size
layer_button.rect_size.y = cel_size layer_button.rect_size.y = cel_size
for container in Global.frames_container.get_children(): for cel_hbox in Global.cel_vbox.get_children():
for cel_button in container.get_children(): for cel_button in cel_hbox.get_children():
cel_button.rect_min_size.x = cel_size cel_button.rect_min_size.x = cel_size
cel_button.rect_min_size.y = cel_size cel_button.rect_min_size.y = cel_size
cel_button.rect_size.x = cel_size cel_button.rect_size.x = cel_size
cel_button.rect_size.y = cel_size cel_button.rect_size.y = cel_size
for frame_id in Global.frame_ids.get_children(): for frame_id in Global.frame_hbox.get_children():
frame_id.rect_min_size.x = cel_size frame_id.rect_min_size.x = cel_size
frame_id.rect_size.x = cel_size frame_id.rect_size.x = cel_size
@ -330,14 +316,14 @@ func _on_MoveLeft_pressed() -> void:
var frame: int = Global.current_project.current_frame var frame: int = Global.current_project.current_frame
if frame == 0: if frame == 0:
return return
Global.frame_ids.get_child(frame).change_frame_order(-1) Global.frame_hbox.get_child(frame).change_frame_order(-1)
func _on_MoveRight_pressed() -> void: func _on_MoveRight_pressed() -> void:
var frame: int = Global.current_project.current_frame var frame: int = Global.current_project.current_frame
if frame == Global.current_project.frames.size() - 1: # using last_frame caused problems if frame == Global.current_project.frames.size() - 1: # using last_frame caused problems
return return
Global.frame_ids.get_child(frame).change_frame_order(1) Global.frame_hbox.get_child(frame).change_frame_order(1)
func _on_OnionSkinning_pressed() -> void: func _on_OnionSkinning_pressed() -> void:
@ -405,13 +391,14 @@ func _on_AnimationTimer_timeout() -> void:
return return
Global.canvas.selection.transform_content_confirm() Global.canvas.selection.transform_content_confirm()
var fps = Global.current_project.fps var project: Project = Global.current_project
var fps := project.fps
if animation_forward: if animation_forward:
if Global.current_project.current_frame < last_frame: if project.current_frame < last_frame:
Global.current_project.selected_cels.clear() project.selected_cels.clear()
Global.current_project.current_frame += 1 project.current_frame += 1
Global.animation_timer.wait_time = ( Global.animation_timer.wait_time = (
Global.current_project.frames[Global.current_project.current_frame].duration project.frames[project.current_frame].duration
* (1 / fps) * (1 / fps)
) )
Global.animation_timer.start() # Change the frame, change the wait time and start a cycle Global.animation_timer.start() # Change the frame, change the wait time and start a cycle
@ -423,10 +410,10 @@ func _on_AnimationTimer_timeout() -> void:
Global.animation_timer.stop() Global.animation_timer.stop()
is_animation_running = false is_animation_running = false
1: # Cycle loop 1: # Cycle loop
Global.current_project.selected_cels.clear() project.selected_cels.clear()
Global.current_project.current_frame = first_frame project.current_frame = first_frame
Global.animation_timer.wait_time = ( Global.animation_timer.wait_time = (
Global.current_project.frames[Global.current_project.current_frame].duration project.frames[project.current_frame].duration
* (1 / fps) * (1 / fps)
) )
Global.animation_timer.start() Global.animation_timer.start()
@ -435,11 +422,11 @@ func _on_AnimationTimer_timeout() -> void:
_on_AnimationTimer_timeout() _on_AnimationTimer_timeout()
else: else:
if Global.current_project.current_frame > first_frame: if project.current_frame > first_frame:
Global.current_project.selected_cels.clear() project.selected_cels.clear()
Global.current_project.current_frame -= 1 project.current_frame -= 1
Global.animation_timer.wait_time = ( Global.animation_timer.wait_time = (
Global.current_project.frames[Global.current_project.current_frame].duration project.frames[project.current_frame].duration
* (1 / fps) * (1 / fps)
) )
Global.animation_timer.start() Global.animation_timer.start()
@ -451,16 +438,19 @@ func _on_AnimationTimer_timeout() -> void:
Global.animation_timer.stop() Global.animation_timer.stop()
is_animation_running = false is_animation_running = false
1: # Cycle loop 1: # Cycle loop
Global.current_project.selected_cels.clear() project.selected_cels.clear()
Global.current_project.current_frame = last_frame project.current_frame = last_frame
Global.animation_timer.wait_time = ( Global.animation_timer.wait_time = (
Global.current_project.frames[Global.current_project.current_frame].duration project.frames[project.current_frame].duration
* (1 / fps) * (1 / fps)
) )
Global.animation_timer.start() Global.animation_timer.start()
2: # Ping pong loop 2: # Ping pong loop
animation_forward = true animation_forward = true
_on_AnimationTimer_timeout() _on_AnimationTimer_timeout()
frame_scroll_container.ensure_control_visible(
Global.frame_hbox.get_child(project.current_frame)
)
func play_animation(play: bool, forward_dir: bool) -> void: func play_animation(play: bool, forward_dir: bool) -> void:
@ -565,24 +555,30 @@ func _on_FuturePlacement_item_selected(index: int) -> void:
# Layer buttons # Layer buttons
func _on_AddLayer_pressed() -> void: func add_layer(type: int) -> void:
var project: Project = Global.current_project var project: Project = Global.current_project
var current_layer = project.layers[project.current_layer] var current_layer = project.layers[project.current_layer]
var l := PixelLayer.new(project) var l: BaseLayer
match type:
Global.LayerTypes.PIXEL:
l = PixelLayer.new(project)
Global.LayerTypes.GROUP:
l = GroupLayer.new(project)
var cels := [] var cels := []
for f in project.frames: for f in project.frames:
cels.append(l.new_empty_cel()) cels.append(l.new_empty_cel())
var new_layer_idx = project.current_layer + 1 var new_layer_idx := project.current_layer + 1
if current_layer is GroupLayer: if current_layer is GroupLayer:
new_layer_idx = project.current_layer new_layer_idx = project.current_layer
if !current_layer.expanded: if !current_layer.expanded:
current_layer.expanded = true current_layer.expanded = true
for layer_button in Global.layers_container.get_children(): for layer_button in Global.layer_vbox.get_children():
layer_button.update_buttons() layer_button.update_buttons()
var expanded = project.layers[layer_button.layer].is_expanded_in_hierarchy() var expanded = project.layers[layer_button.layer].is_expanded_in_hierarchy()
layer_button.visible = expanded layer_button.visible = expanded
Global.frames_container.get_child(layer_button.get_index()).visible = expanded Global.cel_vbox.get_child(layer_button.get_index()).visible = expanded
# make layer child of group # make layer child of group
l.parent = Global.current_project.layers[project.current_layer] l.parent = Global.current_project.layers[project.current_layer]
else: else:
@ -600,42 +596,6 @@ func _on_AddLayer_pressed() -> void:
project.undo_redo.commit_action() project.undo_redo.commit_action()
func _on_AddGroup_pressed() -> void:
var project: Project = Global.current_project
var current_layer = project.layers[project.current_layer]
var l := GroupLayer.new(project)
var cels := []
for f in project.frames:
cels.append(l.new_empty_cel())
var new_grouplayer_idx = project.current_layer + 1
if current_layer is GroupLayer:
new_grouplayer_idx = project.current_layer
if !current_layer.expanded:
current_layer.expanded = true
for layer_button in Global.layers_container.get_children():
layer_button.update_buttons()
var expanded = project.layers[layer_button.layer].is_expanded_in_hierarchy()
layer_button.visible = expanded
Global.frames_container.get_child(layer_button.get_index()).visible = expanded
# make layer child of group
l.parent = Global.current_project.layers[project.current_layer]
else:
# set the parent of layer to be the same as the layer below it
l.parent = Global.current_project.layers[project.current_layer].parent
project.undos += 1
project.undo_redo.create_action("Add Layer")
project.undo_redo.add_do_property(project, "current_layer", new_grouplayer_idx)
project.undo_redo.add_undo_property(project, "current_layer", project.current_layer)
project.undo_redo.add_do_method(project, "add_layers", [l], [new_grouplayer_idx], [cels])
project.undo_redo.add_undo_method(project, "remove_layers", [new_grouplayer_idx])
project.undo_redo.add_do_method(Global, "undo_or_redo", false)
project.undo_redo.add_undo_method(Global, "undo_or_redo", true)
project.undo_redo.commit_action()
func _on_CloneLayer_pressed() -> void: func _on_CloneLayer_pressed() -> void:
var project: Project = Global.current_project var project: Project = Global.current_project
var source_layers: Array = project.layers[project.current_layer].get_children(true) var source_layers: Array = project.layers[project.current_layer].get_children(true)
@ -860,36 +820,36 @@ func project_changed() -> void:
var project: Project = Global.current_project var project: Project = Global.current_project
# These must be removed from tree immediately to not mess up the indices of # These must be removed from tree immediately to not mess up the indices of
# the new buttons, so use either free or queue_free + parent.remove_child # the new buttons, so use either free or queue_free + parent.remove_child
for child in Global.layers_container.get_children(): for layer_button in Global.layer_vbox.get_children():
child.free() layer_button.free()
for child in Global.frame_ids.get_children(): for frame_button in Global.frame_hbox.get_children():
child.free() frame_button.free()
for container in Global.frames_container.get_children(): for cel_hbox in Global.cel_vbox.get_children():
container.free() cel_hbox.free()
for i in project.layers.size(): for i in project.layers.size():
project_layer_added(i) project_layer_added(i)
for f in project.frames.size(): for f in project.frames.size():
var button: Button = frame_button_node.instance() var button: Button = frame_button_node.instance()
button.frame = f button.frame = f
Global.frame_ids.add_child(button) Global.frame_hbox.add_child(button)
# Press selected cel/frame/layer buttons # Press selected cel/frame/layer buttons
for cel_index in project.selected_cels: for cel_index in project.selected_cels:
var frame: int = cel_index[0] var frame: int = cel_index[0]
var layer: int = cel_index[1] var layer: int = cel_index[1]
if frame < Global.frame_ids.get_child_count(): if frame < Global.frame_hbox.get_child_count():
var frame_button: BaseButton = Global.frame_ids.get_child(frame) var frame_button: BaseButton = Global.frame_hbox.get_child(frame)
frame_button.pressed = true frame_button.pressed = true
var container_child_count: int = Global.frames_container.get_child_count() var vbox_child_count: int = Global.cel_vbox.get_child_count()
if layer < container_child_count: if layer < vbox_child_count:
var container = Global.frames_container.get_child(container_child_count - 1 - layer) var cel_hbox: HBoxContainer = Global.cel_vbox.get_child(vbox_child_count - 1 - layer)
if frame < container.get_child_count(): if frame < cel_hbox.get_child_count():
var cel_button = container.get_child(frame) var cel_button = cel_hbox.get_child(frame)
cel_button.pressed = true cel_button.pressed = true
var layer_button = Global.layers_container.get_child(container_child_count - 1 - layer) var layer_button = Global.layer_vbox.get_child(vbox_child_count - 1 - layer)
layer_button.pressed = true layer_button.pressed = true
@ -897,24 +857,27 @@ func project_frame_added(frame: int) -> void:
var project: Project = Global.current_project var project: Project = Global.current_project
var button: Button = frame_button_node.instance() var button: Button = frame_button_node.instance()
button.frame = frame button.frame = frame
Global.frame_ids.add_child(button) Global.frame_hbox.add_child(button)
Global.frame_ids.move_child(button, frame) Global.frame_hbox.move_child(button, frame)
frame_scroll_container.call_deferred( # Make it visible, yes 3 call_deferreds are required
"call_deferred", "call_deferred", "ensure_control_visible", button
)
var layer := Global.frames_container.get_child_count() - 1 var layer := Global.cel_vbox.get_child_count() - 1
for container in Global.frames_container.get_children(): for cel_hbox in Global.cel_vbox.get_children():
var cel_button = project.frames[frame].cels[layer].instantiate_cel_button() var cel_button = project.frames[frame].cels[layer].instantiate_cel_button()
cel_button.frame = frame cel_button.frame = frame
cel_button.layer = layer cel_button.layer = layer
container.add_child(cel_button) cel_hbox.add_child(cel_button)
container.move_child(cel_button, frame) cel_hbox.move_child(cel_button, frame)
layer -= 1 layer -= 1
func project_frame_removed(frame: int) -> void: func project_frame_removed(frame: int) -> void:
Global.frame_ids.get_child(frame).queue_free() Global.frame_hbox.get_child(frame).queue_free()
Global.frame_ids.remove_child(Global.frame_ids.get_child(frame)) Global.frame_hbox.remove_child(Global.frame_hbox.get_child(frame))
for container in Global.frames_container.get_children(): for cel_hbox in Global.cel_vbox.get_children():
container.get_child(frame).free() cel_hbox.get_child(frame).free()
func project_layer_added(layer: int) -> void: func project_layer_added(layer: int) -> void:
@ -925,43 +888,39 @@ func project_layer_added(layer: int) -> void:
if project.layers[layer].name == "": if project.layers[layer].name == "":
project.layers[layer].set_name_to_default(Global.current_project.layers.size()) project.layers[layer].set_name_to_default(Global.current_project.layers.size())
var layer_cel_container := HBoxContainer.new() var cel_hbox := HBoxContainer.new()
for f in project.frames.size(): for f in project.frames.size():
var cel_button = project.frames[f].cels[layer].instantiate_cel_button() var cel_button = project.frames[f].cels[layer].instantiate_cel_button()
cel_button.frame = f cel_button.frame = f
cel_button.layer = layer cel_button.layer = layer
layer_cel_container.add_child(cel_button) cel_hbox.add_child(cel_button)
layer_button.visible = Global.current_project.layers[layer].is_expanded_in_hierarchy() layer_button.visible = Global.current_project.layers[layer].is_expanded_in_hierarchy()
layer_cel_container.visible = layer_button.visible cel_hbox.visible = layer_button.visible
Global.layers_container.add_child(layer_button) Global.layer_vbox.add_child(layer_button)
var count := Global.layers_container.get_child_count() var count := Global.layer_vbox.get_child_count()
Global.layers_container.move_child(layer_button, count - 1 - layer) Global.layer_vbox.move_child(layer_button, count - 1 - layer)
Global.frames_container.add_child(layer_cel_container) Global.cel_vbox.add_child(cel_hbox)
Global.frames_container.move_child(layer_cel_container, count - 1 - layer) Global.cel_vbox.move_child(cel_hbox, count - 1 - layer)
func project_layer_removed(layer: int) -> void: func project_layer_removed(layer: int) -> void:
var count := Global.layers_container.get_child_count() var count := Global.layer_vbox.get_child_count()
Global.layers_container.get_child(count - 1 - layer).free() Global.layer_vbox.get_child(count - 1 - layer).free()
Global.frames_container.get_child(count - 1 - layer).free() Global.cel_vbox.get_child(count - 1 - layer).free()
func project_cel_added(frame: int, layer: int) -> void: func project_cel_added(frame: int, layer: int) -> void:
var container := Global.frames_container.get_child( var cel_hbox := Global.cel_vbox.get_child(Global.cel_vbox.get_child_count() - 1 - layer)
Global.frames_container.get_child_count() - 1 - layer
)
var cel_button = Global.current_project.frames[frame].cels[layer].instantiate_cel_button() var cel_button = Global.current_project.frames[frame].cels[layer].instantiate_cel_button()
cel_button.frame = frame cel_button.frame = frame
cel_button.layer = layer cel_button.layer = layer
container.add_child(cel_button) cel_hbox.add_child(cel_button)
container.move_child(cel_button, frame) cel_hbox.move_child(cel_button, frame)
func project_cel_removed(frame: int, layer: int) -> void: func project_cel_removed(frame: int, layer: int) -> void:
var container := Global.frames_container.get_child( var cel_hbox := Global.cel_vbox.get_child(Global.cel_vbox.get_child_count() - 1 - layer)
Global.frames_container.get_child_count() - 1 - layer cel_hbox.get_child(frame).queue_free()
) cel_hbox.remove_child(cel_hbox.get_child(frame))
container.get_child(frame).queue_free()
container.remove_child(container.get_child(frame))

View file

@ -10,6 +10,7 @@
[ext_resource path="res://assets/graphics/timeline/move_arrow.png" type="Texture" id=8] [ext_resource path="res://assets/graphics/timeline/move_arrow.png" type="Texture" id=8]
[ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=9] [ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=9]
[ext_resource path="res://assets/graphics/layers/group_new.png" type="Texture" id=10] [ext_resource path="res://assets/graphics/layers/group_new.png" type="Texture" id=10]
[ext_resource path="res://src/UI/Timeline/FrameScrollContainer.gd" type="Script" id=11]
[ext_resource path="res://assets/graphics/timeline/new_frame.png" type="Texture" id=19] [ext_resource path="res://assets/graphics/timeline/new_frame.png" type="Texture" id=19]
[ext_resource path="res://assets/graphics/timeline/remove_frame.png" type="Texture" id=20] [ext_resource path="res://assets/graphics/timeline/remove_frame.png" type="Texture" id=20]
[ext_resource path="res://assets/graphics/timeline/go_to_first_frame.png" type="Texture" id=21] [ext_resource path="res://assets/graphics/timeline/go_to_first_frame.png" type="Texture" id=21]
@ -25,17 +26,26 @@
[ext_resource path="res://assets/graphics/timeline/loop.png" type="Texture" id=31] [ext_resource path="res://assets/graphics/timeline/loop.png" type="Texture" id=31]
[ext_resource path="res://src/UI/Timeline/FrameTagDialog.tscn" type="PackedScene" id=42] [ext_resource path="res://src/UI/Timeline/FrameTagDialog.tscn" type="PackedScene" id=42]
[sub_resource type="StyleBoxFlat" id=2] [sub_resource type="StyleBoxEmpty" id=15]
content_margin_left = 4.5
content_margin_right = 4.5 [sub_resource type="StyleBoxEmpty" id=16]
content_margin_top = 3.0
content_margin_bottom = 3.0 [sub_resource type="StyleBoxEmpty" id=17]
bg_color = Color( 0.168627, 0.168627, 0.168627, 1 )
corner_radius_top_left = 5 [sub_resource type="StyleBoxEmpty" id=18]
corner_radius_top_right = 5
corner_radius_bottom_right = 5 [sub_resource type="StyleBoxEmpty" id=19]
corner_radius_bottom_left = 5
expand_margin_bottom = 32.0 [sub_resource type="Theme" id=20]
HScrollBar/icons/decrement = null
HScrollBar/icons/decrement_highlight = null
HScrollBar/icons/increment = null
HScrollBar/icons/increment_highlight = null
HScrollBar/styles/grabber = SubResource( 15 )
HScrollBar/styles/grabber_highlight = SubResource( 16 )
HScrollBar/styles/grabber_pressed = SubResource( 17 )
HScrollBar/styles/scroll = SubResource( 18 )
HScrollBar/styles/scroll_focus = SubResource( 19 )
[sub_resource type="InputEventAction" id=21] [sub_resource type="InputEventAction" id=21]
action = "go_to_first_frame" action = "go_to_first_frame"
@ -73,67 +83,38 @@ action = "go_to_last_frame"
[sub_resource type="ShortCut" id=14] [sub_resource type="ShortCut" id=14]
shortcut = SubResource( 22 ) shortcut = SubResource( 22 )
[sub_resource type="StyleBoxEmpty" id=15]
[sub_resource type="StyleBoxEmpty" id=16]
[sub_resource type="StyleBoxEmpty" id=17]
[sub_resource type="StyleBoxEmpty" id=18]
[sub_resource type="StyleBoxEmpty" id=19]
[sub_resource type="Theme" id=20]
HScrollBar/icons/decrement = null
HScrollBar/icons/decrement_highlight = null
HScrollBar/icons/increment = null
HScrollBar/icons/increment_highlight = null
HScrollBar/styles/grabber = SubResource( 15 )
HScrollBar/styles/grabber_highlight = SubResource( 16 )
HScrollBar/styles/grabber_pressed = SubResource( 17 )
HScrollBar/styles/scroll = SubResource( 18 )
HScrollBar/styles/scroll_focus = SubResource( 19 )
[node name="AnimationTimeline" type="Panel"] [node name="AnimationTimeline" type="Panel"]
margin_right = 902.0 margin_right = 902.0
margin_bottom = 160.0 margin_bottom = 160.0
rect_min_size = Vector2( 36, 160 )
rect_clip_content = true rect_clip_content = true
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="ScrollContainer" type="ScrollContainer" parent="."] [node name="TimelineContainer" type="VBoxContainer" parent="."]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
[node name="TimelineContainer" type="VBoxContainer" parent="ScrollContainer"] [node name="TimelineButtons" type="HBoxContainer" parent="TimelineContainer"]
margin_right = 902.0 margin_right = 902.0
margin_bottom = 160.0 margin_bottom = 74.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TimelineButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer"]
margin_right = 902.0
margin_bottom = 38.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="LayerButtonPanelContainer" type="PanelContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons"] [node name="LayerTools" type="PanelContainer" parent="TimelineContainer/TimelineButtons"]
margin_right = 217.0 margin_right = 222.0
margin_bottom = 38.0 margin_bottom = 74.0
rect_min_size = Vector2( 190, 0 )
custom_styles/panel = SubResource( 2 )
[node name="LayerButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="TimelineContainer/TimelineButtons/LayerTools"]
margin_left = 4.5 margin_left = 7.0
margin_top = 3.0 margin_top = 7.0
margin_right = 212.5 margin_right = 215.0
margin_bottom = 25.0 margin_bottom = 67.0
[node name="LayerButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer"]
margin_right = 208.0
margin_bottom = 22.0
size_flags_vertical = 0 size_flags_vertical = 0
custom_constants/separation = 9 custom_constants/separation = 9
[node name="AddLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="AddLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_right = 22.0 margin_right = 22.0
margin_bottom = 22.0 margin_bottom = 22.0
rect_min_size = Vector2( 22, 22 ) rect_min_size = Vector2( 22, 22 )
@ -141,7 +122,7 @@ hint_tooltip = "Create a new layer"
focus_mode = 0 focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/AddLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/AddLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -153,11 +134,8 @@ margin_bottom = 11.0
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 0 size_flags_vertical = 0
texture = ExtResource( 2 ) texture = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AddGroup" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="AddGroup" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 31.0 margin_left = 31.0
margin_right = 53.0 margin_right = 53.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -166,7 +144,7 @@ hint_tooltip = "Create a new group layer"
focus_mode = 0 focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/AddGroup"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/AddGroup"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -178,11 +156,8 @@ margin_bottom = 11.0
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 0 size_flags_vertical = 0
texture = ExtResource( 10 ) texture = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="RemoveLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 62.0 margin_left = 62.0
margin_right = 84.0 margin_right = 84.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -192,7 +167,7 @@ focus_mode = 0
mouse_default_cursor_shape = 8 mouse_default_cursor_shape = 8
disabled = true disabled = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/RemoveLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/RemoveLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -208,7 +183,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="MoveUpLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="MoveUpLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 93.0 margin_left = 93.0
margin_right = 115.0 margin_right = 115.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -218,7 +193,7 @@ focus_mode = 0
mouse_default_cursor_shape = 8 mouse_default_cursor_shape = 8
disabled = true disabled = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MoveUpLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MoveUpLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -234,7 +209,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="MoveDownLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="MoveDownLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 124.0 margin_left = 124.0
margin_right = 146.0 margin_right = 146.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -244,7 +219,7 @@ focus_mode = 0
mouse_default_cursor_shape = 8 mouse_default_cursor_shape = 8
disabled = true disabled = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MoveDownLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MoveDownLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -260,7 +235,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="CloneLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="CloneLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 155.0 margin_left = 155.0
margin_right = 177.0 margin_right = 177.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -269,7 +244,7 @@ hint_tooltip = "Clone current layer"
focus_mode = 0 focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/CloneLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/CloneLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -285,7 +260,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="MergeDownLayer" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons" groups=["UIButtons"]] [node name="MergeDownLayer" type="Button" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons" groups=["UIButtons"]]
margin_left = 186.0 margin_left = 186.0
margin_right = 208.0 margin_right = 208.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -295,7 +270,7 @@ focus_mode = 0
mouse_default_cursor_shape = 8 mouse_default_cursor_shape = 8
disabled = true disabled = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MergeDownLayer"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MergeDownLayer"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -311,18 +286,40 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Control" type="Control" parent="ScrollContainer/TimelineContainer/TimelineButtons"] [node name="BlendingHBox" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer"]
margin_left = 221.0 margin_top = 36.0
margin_right = 378.0 margin_right = 208.0
margin_bottom = 38.0 margin_bottom = 60.0
size_flags_vertical = 10
[node name="OpacitySlider" parent="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/BlendingHBox" instance=ExtResource( 9 )]
margin_right = 207.0
rect_min_size = Vector2( 207, 24 )
size_flags_horizontal = 1
size_flags_vertical = 0
value = 100.0
prefix = "Opacity:"
[node name="VBoxContainer" type="VBoxContainer" parent="TimelineContainer/TimelineButtons"]
margin_left = 226.0
margin_right = 902.0
margin_bottom = 74.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="PanelContainer" type="PanelContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons"] [node name="AnimationToolsScrollContainer" type="ScrollContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer"]
margin_left = 382.0 margin_right = 676.0
margin_right = 902.0
margin_bottom = 38.0 margin_bottom = 38.0
size_flags_horizontal = 3
theme = SubResource( 20 )
scroll_vertical_enabled = false
[node name="AnimationButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer"] [node name="AnimationTools" type="PanelContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer"]
margin_left = 156.0
margin_right = 676.0
margin_bottom = 38.0
size_flags_horizontal = 10
[node name="AnimationButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools"]
margin_left = 7.0 margin_left = 7.0
margin_top = 7.0 margin_top = 7.0
margin_right = 513.0 margin_right = 513.0
@ -335,11 +332,11 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="FrameButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"] [node name="FrameButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
margin_right = 140.0 margin_right = 140.0
margin_bottom = 24.0 margin_bottom = 24.0
[node name="AddFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="AddFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_top = 2.0 margin_top = 2.0
margin_right = 20.0 margin_right = 20.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -350,7 +347,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/AddFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/AddFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -364,7 +361,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="DeleteFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="DeleteFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 24.0 margin_left = 24.0
margin_top = 2.0 margin_top = 2.0
margin_right = 44.0 margin_right = 44.0
@ -376,7 +373,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/DeleteFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/DeleteFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -392,7 +389,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="CopyFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="CopyFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 48.0 margin_left = 48.0
margin_top = 2.0 margin_top = 2.0
margin_right = 68.0 margin_right = 68.0
@ -404,7 +401,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/CopyFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/CopyFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -415,7 +412,7 @@ margin_right = 5.0
margin_bottom = 7.0 margin_bottom = 7.0
texture = ExtResource( 27 ) texture = ExtResource( 27 )
[node name="FrameTagButton" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="FrameTagButton" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 72.0 margin_left = 72.0
margin_top = 2.0 margin_top = 2.0
margin_right = 92.0 margin_right = 92.0
@ -427,7 +424,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/FrameTagButton"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/FrameTagButton"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -441,7 +438,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="MoveLeft" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="MoveLeft" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 96.0 margin_left = 96.0
margin_top = 2.0 margin_top = 2.0
margin_right = 116.0 margin_right = 116.0
@ -453,7 +450,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveLeft"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveLeft"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -468,7 +465,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="MoveRight" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]] [node name="MoveRight" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
margin_left = 120.0 margin_left = 120.0
margin_top = 2.0 margin_top = 2.0
margin_right = 140.0 margin_right = 140.0
@ -480,7 +477,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveRight"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveRight"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -491,12 +488,12 @@ margin_right = 7.5
margin_bottom = 5.5 margin_bottom = 5.5
texture = ExtResource( 8 ) texture = ExtResource( 8 )
[node name="PlaybackButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"] [node name="PlaybackButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
margin_left = 180.0 margin_left = 180.0
margin_right = 320.0 margin_right = 320.0
margin_bottom = 24.0 margin_bottom = 24.0
[node name="FirstFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="FirstFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_top = 2.0 margin_top = 2.0
margin_right = 20.0 margin_right = 20.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -509,7 +506,7 @@ size_flags_vertical = 4
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 4 ) shortcut = SubResource( 4 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/FirstFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/FirstFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -523,7 +520,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="PreviousFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="PreviousFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 24.0 margin_left = 24.0
margin_top = 2.0 margin_top = 2.0
margin_right = 44.0 margin_right = 44.0
@ -537,7 +534,7 @@ size_flags_vertical = 4
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 6 ) shortcut = SubResource( 6 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PreviousFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PreviousFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -551,7 +548,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="PlayBackwards" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="PlayBackwards" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 48.0 margin_left = 48.0
margin_top = 2.0 margin_top = 2.0
margin_right = 68.0 margin_right = 68.0
@ -566,7 +563,7 @@ toggle_mode = true
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 8 ) shortcut = SubResource( 8 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PlayBackwards"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayBackwards"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -580,7 +577,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="PlayForward" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="PlayForward" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 72.0 margin_left = 72.0
margin_top = 2.0 margin_top = 2.0
margin_right = 92.0 margin_right = 92.0
@ -596,7 +593,7 @@ toggle_mode = true
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 10 ) shortcut = SubResource( 10 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PlayForward"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayForward"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -610,7 +607,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="NextFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="NextFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 96.0 margin_left = 96.0
margin_top = 2.0 margin_top = 2.0
margin_right = 116.0 margin_right = 116.0
@ -624,7 +621,7 @@ size_flags_vertical = 4
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 12 ) shortcut = SubResource( 12 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/NextFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/NextFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -638,7 +635,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="LastFrame" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]] [node name="LastFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
margin_left = 120.0 margin_left = 120.0
margin_top = 2.0 margin_top = 2.0
margin_right = 140.0 margin_right = 140.0
@ -652,7 +649,7 @@ size_flags_vertical = 4
shortcut_in_tooltip = false shortcut_in_tooltip = false
shortcut = SubResource( 14 ) shortcut = SubResource( 14 )
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/LastFrame"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/LastFrame"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -666,12 +663,12 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="LoopButtons" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"] [node name="LoopButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
margin_left = 360.0 margin_left = 360.0
margin_right = 506.0 margin_right = 506.0
margin_bottom = 24.0 margin_bottom = 24.0
[node name="OnionSkinningSettings" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]] [node name="OnionSkinningSettings" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_top = 2.0 margin_top = 2.0
margin_right = 20.0 margin_right = 20.0
margin_bottom = 22.0 margin_bottom = 22.0
@ -682,7 +679,7 @@ mouse_default_cursor_shape = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/OnionSkinningSettings"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinningSettings"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -698,7 +695,7 @@ __meta__ = {
"_editor_description_": "" "_editor_description_": ""
} }
[node name="OnionSkinning" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]] [node name="OnionSkinning" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_left = 24.0 margin_left = 24.0
margin_top = 2.0 margin_top = 2.0
margin_right = 44.0 margin_right = 44.0
@ -709,7 +706,7 @@ focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/OnionSkinning"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinning"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -722,7 +719,7 @@ size_flags_horizontal = 0
size_flags_vertical = 0 size_flags_vertical = 0
texture = ExtResource( 29 ) texture = ExtResource( 29 )
[node name="LoopAnim" type="Button" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]] [node name="LoopAnim" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
margin_left = 48.0 margin_left = 48.0
margin_top = 2.0 margin_top = 2.0
margin_right = 68.0 margin_right = 68.0
@ -733,7 +730,7 @@ focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_vertical = 4 size_flags_vertical = 4
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/LoopAnim"] [node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/LoopAnim"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 0.5 anchor_right = 0.5
@ -747,7 +744,7 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="FPSValue" type="SpinBox" parent="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons"] [node name="FPSValue" type="SpinBox" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons"]
margin_left = 72.0 margin_left = 72.0
margin_right = 146.0 margin_right = 146.0
margin_bottom = 24.0 margin_bottom = 24.0
@ -761,90 +758,61 @@ value = 6.0
align = 1 align = 1
suffix = "FPS" suffix = "FPS"
[node name="OpacityAndTagContainer" type="HBoxContainer" parent="ScrollContainer/TimelineContainer"] [node name="TagScroll" type="ScrollContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer"]
margin_top = 42.0 margin_top = 42.0
margin_right = 902.0 margin_right = 676.0
margin_bottom = 74.0 margin_bottom = 74.0
custom_constants/separation = 2
[node name="SpacerControl" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer"]
margin_right = 4.0
margin_bottom = 32.0
rect_min_size = Vector2( 4, 0 )
[node name="OpacitySlider" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer" instance=ExtResource( 9 )]
margin_left = 6.0
margin_right = 213.0
margin_bottom = 24.0
rect_min_size = Vector2( 207, 24 )
size_flags_horizontal = 1
size_flags_vertical = 0
value = 100.0
prefix = "Opacity:"
[node name="SpacerControl2" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer"]
margin_left = 215.0
margin_right = 267.0
margin_bottom = 32.0
rect_min_size = Vector2( 52, 32 )
[node name="TagScroll" type="ScrollContainer" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer"]
margin_left = 269.0
margin_right = 902.0
margin_bottom = 32.0
rect_min_size = Vector2( 0, 32 ) rect_min_size = Vector2( 0, 32 )
mouse_filter = 2 mouse_filter = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme = SubResource( 20 ) theme = SubResource( 20 )
scroll_vertical_enabled = false scroll_vertical_enabled = false
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer/TagScroll"] [node name="HBoxContainer" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/TagScroll"]
margin_right = 633.0 margin_right = 676.0
margin_bottom = 32.0 margin_bottom = 32.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
custom_constants/separation = 0 custom_constants/separation = 0
[node name="TagSpacer" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer/TagScroll/HBoxContainer"] [node name="TagSpacer" type="Control" parent="TimelineContainer/TimelineButtons/VBoxContainer/TagScroll/HBoxContainer"]
margin_bottom = 32.0 margin_bottom = 32.0
[node name="TagContainer" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer/TagScroll/HBoxContainer"] [node name="TagContainer" type="Control" parent="TimelineContainer/TimelineButtons/VBoxContainer/TagScroll/HBoxContainer"]
margin_right = 633.0 margin_right = 676.0
margin_bottom = 32.0 margin_bottom = 32.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="PanelContainer" type="PanelContainer" parent="ScrollContainer/TimelineContainer"] [node name="PanelContainer" type="PanelContainer" parent="TimelineContainer"]
margin_top = 78.0 margin_top = 78.0
margin_right = 902.0 margin_right = 902.0
margin_bottom = 160.0 margin_bottom = 160.0
size_flags_vertical = 3 size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="TimelineContainer/PanelContainer"]
margin_left = 7.0 margin_left = 7.0
margin_top = 7.0 margin_top = 7.0
margin_right = 895.0 margin_right = 895.0
margin_bottom = 75.0 margin_bottom = 75.0
custom_constants/separation = -2
[node name="StartSpacer" type="Control" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer"]
margin_bottom = 68.0
[node name="TimelineScroll" type="ScrollContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer"]
margin_left = -2.0
margin_right = 890.0
margin_bottom = 68.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="LayersAndFrames" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll"] [node name="TimelineScroll" type="ScrollContainer" parent="TimelineContainer/PanelContainer/VBoxContainer"]
margin_right = 45.0 margin_right = 888.0
margin_bottom = 68.0 margin_bottom = 64.0
size_flags_vertical = 3
scroll_horizontal_enabled = false
[node name="LayerFrameHSplit" type="HSplitContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll"]
margin_right = 888.0
margin_bottom = 64.0
size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
[node name="LayerVBoxCont" type="VBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames"] [node name="VBoxContainer" type="VBoxContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit"]
margin_right = 41.0 margin_right = 41.0
margin_bottom = 68.0 margin_bottom = 64.0
[node name="LayerLabel" type="Label" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames/LayerVBoxCont"] [node name="LayerLabel" type="Label" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/VBoxContainer"]
margin_right = 41.0 margin_right = 41.0
margin_bottom = 16.0 margin_bottom = 16.0
rect_min_size = Vector2( 0, 16 ) rect_min_size = Vector2( 0, 16 )
@ -852,28 +820,43 @@ text = "Layers"
align = 1 align = 1
valign = 1 valign = 1
[node name="LayersContainer" type="VBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames/LayerVBoxCont"] [node name="LayerVBox" type="VBoxContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/VBoxContainer"]
margin_top = 20.0 margin_top = 20.0
margin_right = 41.0 margin_right = 41.0
margin_bottom = 20.0 margin_bottom = 20.0
size_flags_horizontal = 3
[node name="FrameButtonsAndIds" type="VBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames"] [node name="FrameScrollContainer" type="Container" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit"]
margin_left = 45.0 margin_left = 53.0
margin_right = 45.0 margin_right = 888.0
margin_bottom = 68.0 margin_bottom = 64.0
script = ExtResource( 11 )
h_scroll_bar_node_path = NodePath("../../../BreakFreeFromContainer/FrameScrollBar")
[node name="FrameIDs" type="HBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames/FrameButtonsAndIds"] [node name="FrameAndCelBox" type="VBoxContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/FrameScrollContainer"]
margin_bottom = 20.0
[node name="FrameHBox" type="HBoxContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/FrameScrollContainer/FrameAndCelBox"]
margin_bottom = 16.0 margin_bottom = 16.0
rect_min_size = Vector2( 0, 16 ) rect_min_size = Vector2( 0, 16 )
[node name="FramesContainer" type="VBoxContainer" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer/TimelineScroll/LayersAndFrames/FrameButtonsAndIds"] [node name="CelVBox" type="VBoxContainer" parent="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/FrameScrollContainer/FrameAndCelBox"]
margin_top = 20.0 margin_top = 20.0
margin_bottom = 20.0 margin_bottom = 20.0
[node name="EndSpacer" type="Control" parent="ScrollContainer/TimelineContainer/PanelContainer/HBoxContainer"] [node name="BreakFreeFromContainer" type="Control" parent="TimelineContainer/PanelContainer/VBoxContainer"]
margin_left = 888.0 margin_top = 68.0
margin_right = 888.0 margin_right = 888.0
margin_bottom = 68.0 margin_bottom = 68.0
__meta__ = {
"_editor_description_": ""
}
[node name="FrameScrollBar" type="HScrollBar" parent="TimelineContainer/PanelContainer/VBoxContainer/BreakFreeFromContainer"]
anchor_right = 1.0
margin_left = 41.0
margin_top = -12.0
size_flags_horizontal = 3
[node name="AnimationTimer" type="Timer" parent="."] [node name="AnimationTimer" type="Timer" parent="."]
@ -996,32 +979,32 @@ margin_bottom = 40.0
mouse_filter = 2 mouse_filter = 2
color = Color( 0, 0.741176, 1, 0.501961 ) color = Color( 0, 0.741176, 1, 0.501961 )
[connection signal="item_rect_changed" from="." to="." method="_on_AnimationTimeline_item_rect_changed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/AddLayer" to="." method="add_layer" binds= [ 0 ]]
[connection signal="item_rect_changed" from="ScrollContainer/TimelineContainer" to="." method="_on_TimelineContainer_item_rect_changed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/AddGroup" to="." method="add_layer" binds= [ 1 ]]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/AddLayer" to="." method="_on_AddLayer_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/RemoveLayer" to="." method="_on_RemoveLayer_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/AddGroup" to="." method="_on_AddGroup_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MoveUpLayer" to="." method="change_layer_order" binds= [ true ]]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/RemoveLayer" to="." method="_on_RemoveLayer_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MoveDownLayer" to="." method="change_layer_order" binds= [ false ]]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MoveUpLayer" to="." method="change_layer_order" binds= [ true ]] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/CloneLayer" to="." method="_on_CloneLayer_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MoveDownLayer" to="." method="change_layer_order" binds= [ false ]] [connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/LayerButtons/MergeDownLayer" to="." method="_on_MergeDownLayer_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/CloneLayer" to="." method="_on_CloneLayer_pressed"] [connection signal="value_changed" from="TimelineContainer/TimelineButtons/LayerTools/VBoxContainer/BlendingHBox/OpacitySlider" to="." method="_on_OpacitySlider_value_changed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/LayerButtonPanelContainer/LayerButtons/MergeDownLayer" to="." method="_on_MergeDownLayer_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/AddFrame" to="." method="add_frame"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/AddFrame" to="." method="add_frame"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/DeleteFrame" to="." method="_on_DeleteFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/DeleteFrame" to="." method="_on_DeleteFrame_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/CopyFrame" to="." method="_on_CopyFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/CopyFrame" to="." method="_on_CopyFrame_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/FrameTagButton" to="." method="_on_FrameTagButton_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/FrameTagButton" to="." method="_on_FrameTagButton_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveLeft" to="." method="_on_MoveLeft_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveLeft" to="." method="_on_MoveLeft_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveRight" to="." method="_on_MoveRight_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveRight" to="." method="_on_MoveRight_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/FirstFrame" to="." method="_on_FirstFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/FirstFrame" to="." method="_on_FirstFrame_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PreviousFrame" to="." method="_on_PreviousFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PreviousFrame" to="." method="_on_PreviousFrame_pressed"] [connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayBackwards" to="." method="_on_PlayBackwards_toggled"]
[connection signal="toggled" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PlayBackwards" to="." method="_on_PlayBackwards_toggled"] [connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayForward" to="." method="_on_PlayForward_toggled"]
[connection signal="toggled" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PlayForward" to="." method="_on_PlayForward_toggled"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/NextFrame" to="." method="_on_NextFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/NextFrame" to="." method="_on_NextFrame_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/LastFrame" to="." method="_on_LastFrame_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/LastFrame" to="." method="_on_LastFrame_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinningSettings" to="." method="_on_OnionSkinningSettings_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/OnionSkinningSettings" to="." method="_on_OnionSkinningSettings_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinning" to="." method="_on_OnionSkinning_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/OnionSkinning" to="." method="_on_OnionSkinning_pressed"] [connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/LoopAnim" to="." method="_on_LoopAnim_pressed"]
[connection signal="pressed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/LoopAnim" to="." method="_on_LoopAnim_pressed"] [connection signal="value_changed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/FPSValue" to="." method="_on_FPSValue_value_changed"]
[connection signal="value_changed" from="ScrollContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons/FPSValue" to="." method="_on_FPSValue_value_changed"] [connection signal="gui_input" from="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit" to="." method="_on_LayerFrameSplitContainer_gui_input"]
[connection signal="value_changed" from="ScrollContainer/TimelineContainer/OpacityAndTagContainer/OpacitySlider" to="." method="_on_OpacitySlider_value_changed"] [connection signal="resized" from="TimelineContainer/PanelContainer/VBoxContainer/TimelineScroll/LayerFrameHSplit/VBoxContainer/LayerVBox" to="." method="_on_LayerVBox_resized"]
[connection signal="timeout" from="AnimationTimer" to="." method="_on_AnimationTimer_timeout"] [connection signal="timeout" from="AnimationTimer" to="." method="_on_AnimationTimer_timeout"]
[connection signal="popup_hide" from="OnionSkinningSettings" to="." method="_on_OnionSkinningSettings_popup_hide"] [connection signal="popup_hide" from="OnionSkinningSettings" to="." method="_on_OnionSkinningSettings_popup_hide"]
[connection signal="value_changed" from="OnionSkinningSettings/OnionSkinningButtons/PastOnionSkinning" to="." method="_on_PastOnionSkinning_value_changed"] [connection signal="value_changed" from="OnionSkinningSettings/OnionSkinningButtons/PastOnionSkinning" to="." method="_on_PastOnionSkinning_value_changed"]

View file

@ -5,28 +5,23 @@
[ext_resource path="res://assets/graphics/layers/unlock.png" type="Texture" id=3] [ext_resource path="res://assets/graphics/layers/unlock.png" type="Texture" id=3]
[node name="BaseLayerButton" type="Button"] [node name="BaseLayerButton" type="Button"]
margin_right = 236.0 margin_right = 200.0
margin_bottom = 36.0 margin_bottom = 36.0
rect_min_size = Vector2( 236, 36 ) rect_min_size = Vector2( 205, 36 )
focus_mode = 0 focus_mode = 0
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 0
toggle_mode = true toggle_mode = true
action_mode = 0 action_mode = 0
enabled_focus_mode = 0 enabled_focus_mode = 0
script = ExtResource( 1 ) script = ExtResource( 1 )
__meta__ = { __meta__ = {
"_edit_horizontal_guides_": [ ], "_edit_horizontal_guides_": [ ]
"_edit_use_anchors_": false
} }
[node name="HBoxContainer" type="HBoxContainer" parent="."] [node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
size_flags_horizontal = 0 size_flags_horizontal = 0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EmptySpacer" type="Control" parent="HBoxContainer"] [node name="EmptySpacer" type="Control" parent="HBoxContainer"]
margin_bottom = 36.0 margin_bottom = 36.0
@ -34,8 +29,9 @@ mouse_filter = 2
[node name="LayerButtons" type="HBoxContainer" parent="HBoxContainer"] [node name="LayerButtons" type="HBoxContainer" parent="HBoxContainer"]
margin_left = 4.0 margin_left = 4.0
margin_right = 90.0 margin_right = 122.0
margin_bottom = 36.0 margin_bottom = 36.0
rect_min_size = Vector2( 118, 0 )
custom_constants/separation = 10 custom_constants/separation = 10
[node name="ExpandButton" type="ToolButton" parent="HBoxContainer/LayerButtons" groups=["UIButtons"]] [node name="ExpandButton" type="ToolButton" parent="HBoxContainer/LayerButtons" groups=["UIButtons"]]
@ -115,18 +111,14 @@ margin_bottom = 11.0
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 0 size_flags_vertical = 0
texture = ExtResource( 3 ) texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LayerName" type="HBoxContainer" parent="HBoxContainer"] [node name="LayerName" type="HBoxContainer" parent="HBoxContainer"]
margin_left = 126.0 margin_left = 126.0
margin_right = 236.0 margin_right = 205.0
margin_bottom = 36.0 margin_bottom = 36.0
rect_min_size = Vector2( 110, 0 )
rect_pivot_offset = Vector2( -187, -9 ) rect_pivot_offset = Vector2( -187, -9 )
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 10 size_flags_horizontal = 3
alignment = 1 alignment = 1
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
@ -139,7 +131,7 @@ mouse_filter = 2
[node name="Label" type="Label" parent="HBoxContainer/LayerName"] [node name="Label" type="Label" parent="HBoxContainer/LayerName"]
margin_left = 4.0 margin_left = 4.0
margin_top = 11.0 margin_top = 11.0
margin_right = 106.0 margin_right = 75.0
margin_bottom = 25.0 margin_bottom = 25.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Layer 0" text = "Layer 0"
@ -159,8 +151,8 @@ caret_blink = true
caret_blink_speed = 0.5 caret_blink_speed = 0.5
[node name="EmptySpacer" type="Control" parent="HBoxContainer/LayerName"] [node name="EmptySpacer" type="Control" parent="HBoxContainer/LayerName"]
margin_left = 110.0 margin_left = 79.0
margin_right = 110.0 margin_right = 79.0
margin_bottom = 36.0 margin_bottom = 36.0
mouse_filter = 2 mouse_filter = 2

View file

@ -0,0 +1,63 @@
extends Container
const PADDING = 1
export var h_scroll_bar_node_path: NodePath
onready var h_scroll_bar: HScrollBar = get_node_or_null(h_scroll_bar_node_path)
func _ready():
rect_clip_content = true
connect("sort_children", self, "_on_sort_children")
if is_instance_valid(h_scroll_bar):
h_scroll_bar.connect("resized", self, "_update_scroll")
h_scroll_bar.connect("value_changed", self, "_on_scroll_bar_value_changed")
func _gui_input(event: InputEvent) -> void:
if get_child_count():
var vertical_scroll: bool = get_child(0).rect_size.y >= rect_size.y
if event is InputEventMouseButton and (event.shift or not vertical_scroll):
if is_instance_valid(h_scroll_bar):
if event.button_index == BUTTON_WHEEL_UP:
h_scroll_bar.value -= Global.animation_timeline.cel_size / 2 + 2
accept_event()
elif event.button_index == BUTTON_WHEEL_DOWN:
h_scroll_bar.value += Global.animation_timeline.cel_size / 2 + 2
accept_event()
func _update_scroll() -> void:
if get_child_count():
if is_instance_valid(h_scroll_bar):
h_scroll_bar.max_value = get_child(0).rect_size.x
h_scroll_bar.page = rect_size.x
h_scroll_bar.visible = h_scroll_bar.page < h_scroll_bar.max_value
get_child(0).rect_position.x = -h_scroll_bar.value + PADDING
func ensure_control_visible(control: Control):
if not is_instance_valid(control):
return
# Based on Godot's implemenation in ScrollContainer
var global_rect := get_global_rect()
var other_rect := control.get_global_rect()
var diff: float = max(
min(other_rect.position.x, global_rect.position.x),
other_rect.position.x + other_rect.size.x - global_rect.size.x
)
h_scroll_bar.value += diff - global_rect.position.x
func _on_sort_children() -> void:
if get_child_count():
get_child(0).rect_size = get_child(0).get_combined_minimum_size()
_update_scroll()
func _on_scroll_bar_value_changed(_value: float) -> void:
_update_scroll()
func _clips_input() -> bool:
return true

View file

@ -76,11 +76,11 @@ func update_buttons() -> void:
# Used when pressing a button on this changes the appearnce of other layers (ie: expand or visible) # Used when pressing a button on this changes the appearnce of other layers (ie: expand or visible)
func _update_buttons_all_layers() -> void: func _update_buttons_all_layers() -> void:
for layer_button in Global.layers_container.get_children(): for layer_button in Global.layer_vbox.get_children():
layer_button.update_buttons() layer_button.update_buttons()
var expanded = Global.current_project.layers[layer_button.layer].is_expanded_in_hierarchy() var expanded = Global.current_project.layers[layer_button.layer].is_expanded_in_hierarchy()
layer_button.visible = expanded layer_button.visible = expanded
Global.frames_container.get_child(layer_button.get_index()).visible = expanded Global.cel_vbox.get_child(layer_button.get_index()).visible = expanded
func _draw() -> void: func _draw() -> void:

View file

@ -17,6 +17,7 @@ __meta__ = {
} }
[node name="LinkedIndicator" type="Polygon2D" parent="." index="2"] [node name="LinkedIndicator" type="Polygon2D" parent="." index="2"]
color = Color( 0, 1, 0, 1 )
invert_enable = true invert_enable = true
invert_border = 1.0 invert_border = 1.0
polygon = PoolVector2Array( 0, 0, 36, 0, 36, 36, 0, 36 ) polygon = PoolVector2Array( 0, 0, 36, 0, 36, 36, 0, 36 )