From 808883b3a5ef1ef4f1f07e3c747f12c5b452de04 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Thu, 16 Jan 2020 01:38:44 +0200 Subject: [PATCH] Restore freehand drawing on motion drawing --- Scripts/Canvas.gd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 17834a0e8..06db600f8 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -100,8 +100,6 @@ func camera_zoom() -> void: Global.camera_preview.offset = size / 2 func _input(event : InputEvent) -> void: - if Global.current_frame != frame: - return # Don't process anything below if the input isn't a mouse event, or Shift/Ctrl. # This decreases CPU/GPU usage slightly. if not event is InputEventMouse: @@ -112,6 +110,12 @@ func _input(event : InputEvent) -> void: return current_pixel = get_local_mouse_position() + location + if Global.current_frame != frame: + previous_mouse_pos = current_pixel + previous_mouse_pos.x = clamp(previous_mouse_pos.x, location.x, location.x + size.x) + previous_mouse_pos.y = clamp(previous_mouse_pos.y, location.y, location.y + size.y) + return + if Global.has_focus: update()