pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.45k stars 272 forks source link

Closed Polyline path #1863

Closed HeCorr closed 2 months ago

HeCorr commented 2 months ago

This PR adds the Closed option to the Polyline tool which automatically closes it's path as it's being drawn.

The Ctrl key can be held to temporarily override the closed state:

Video

https://github.com/user-attachments/assets/fb6ad3e7-4c21-4311-acb2-80e9689dc216

It works with both double-clicking and pressing Enter to apply the Polyline.

HeCorr commented 2 months ago

This has been discussed on Discord and I decided to add a tool option for this which inverts the behavior of the Ctrl key, so that:

So that users who prefer to use the Ctrl key can leave the option off and those who don't can leave the option on with the added benefit of temporarily disabling it if necessary without having to toggle the tool option.

HeCorr commented 2 months ago

The requested changes have been committed!

HeCorr commented 2 months ago

The check state would not be saved to our settings file

I did notice the state wasn't being saved, but then I tested the Bézier option and it didn't save either hahah

Thanks for the fixes though!

MrStevns commented 2 months ago

Yeah it's not consistent... ideally all tool option properties should be saved to settings.

btw. are you allowed to merge the PR yourself?

HeCorr commented 2 months ago

are you allowed to merge the PR yourself?

nope Screenshot_2024-07-24-15-15-40-988