diff --git a/Scripts/AnimationTimeline.gd b/Scripts/AnimationTimeline.gd index 440e02ac8..d7d3c5564 100644 --- a/Scripts/AnimationTimeline.gd +++ b/Scripts/AnimationTimeline.gd @@ -28,6 +28,12 @@ func add_frame() -> void: Global.undo_redo.add_do_property(c, "visible", false) Global.undo_redo.add_undo_property(c, "visible", c.visible) + for l_i in range(Global.layers.size()): + if Global.layers[l_i][4]: # If the link button is pressed +# var new_layers : Array = Global.layers.duplicate() +# new_layers[l_i][5].append(new_canvas) + Global.layers[l_i][5].append(new_canvas) + Global.undo_redo.add_undo_property(Global, "canvases", Global.canvases) Global.undo_redo.add_undo_property(Global, "hidden_canvases", new_hidden_canvases) Global.undo_redo.add_undo_property(Global, "canvas", Global.canvas) diff --git a/Scripts/LayerContainer.gd b/Scripts/LayerContainer.gd index 4f6149289..ca056315a 100644 --- a/Scripts/LayerContainer.gd +++ b/Scripts/LayerContainer.gd @@ -67,4 +67,4 @@ func _on_LockButton_pressed() -> void: func _on_LinkButton_pressed() -> void: Global.layers[i][4] = !Global.layers[i][4] if !Global.layers[i][5]: - Global.layers[i][5].append(Global.current_frame) + Global.layers[i][5].append(Global.canvas)