Made a new "src" folder that will contain the source code files, like all the GDScript and scene files. Please read this for more details: https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/
It made no sense to keep scenes separate from their scripts. More file organizing will follow soon.
* Add pixel perfect mode for pencil and eraser
* Add Pixel Perfect for left and right tools
Co-authored-by: Dávid Gábor Bodor <david.gabor.bodr@gmail.com>
The bucket tool can now use Patterns instead of colors to fill areas. They get loaded from the "Patterns" folder, similar to how Brushes and Palletes work. You can no longer use brushes for the bucket tool.
If the user chooses a brush that is not the pixel or a circle brush and uses the bucket tool, the brush image is used as a pattern that fills the area.
The onion skinning button replaces the old onion skinning area of the timeline, but there's no way right now to change the settings. This will be added in a future commit. More UI changes will soon follow.
An attempt to draw an isometric grid. It behaves oddly on non-square canvas sizes, and on some grid sizes. For this reason, I'm not sure if it will be implemented in v0.7.
To test it, set Global.grid_type = Global.Grid_Types.ISOMETRIC
Trying to merge layers into the timeline, and eventually add more features like "share layer with all frames", among others. THIS IS NOT FINISHED, IT WILL *NOT* WORK PROPERLY. Once it is finished, this branch will be merged onto master.
So far only add layer and add frame work, and even they may have some issues. Undoing also does not work properly yet.
The UI is also not finished, as it currently has problems with the scroll containers.
If you did motion drawing, stopped and then went to draw to the frame the motion drawing started, undo wouldn't work properly. That's because can_undo was false.
Instead of replacing the pixels with the new color's alpha value, the alpha values of the selected color and the current pixel color get blended together. This means that, if you have a pixel with 50% alpha and you draw a color over it with 25% alpha, the final result will have 75% alpha, instead of 25% as it used to be.
The pressure sensitivity is still experimental and may not work properly. Works only with Godot 3.2 and above.
draw_pixel() has also been renamed to draw_brush()
Canvas.gd's _input() method returns when the canvas' frame is not the currently selected frame. Saves a little bit of performance and fixes some issues like the line angles of ALL frames being drawn, and might fix some crashes I had with motion drawing and undo/redoing.