Skip to content

Move the Spline tool to a spline/path mode option in the Pen tool #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

indierusty
Copy link
Contributor

@indierusty indierusty commented Mar 6, 2025

No description provided.

@Keavon Keavon force-pushed the merge-spline-path branch from 009b97e to af37e82 Compare March 6, 2025 14:49
@indierusty indierusty marked this pull request as draft March 6, 2025 15:41
@indierusty indierusty marked this pull request as ready for review March 7, 2025 06:26
@Keavon
Copy link
Member

Keavon commented Mar 12, 2025

Can you please resolve these merge conflicts?

@Keavon Keavon changed the title Add Spline/Path mode option in the Path tool to draw spline or path. Add Spline/Path mode option in the Path tool to draw spline or path Mar 12, 2025
@Keavon
Copy link
Member

Keavon commented Mar 13, 2025

I'll mark this as draft for the moment. Please make it ready for review when you've finished the conflict and making it compile again. Thank you!

@Keavon Keavon marked this pull request as draft March 13, 2025 01:41
@indierusty indierusty marked this pull request as ready for review March 14, 2025 04:56
@indierusty indierusty changed the title Add Spline/Path mode option in the Path tool to draw spline or path Add Spline/Path mode option in the Pen tool to draw spline or path Mar 14, 2025
@Keavon
Copy link
Member

Keavon commented Mar 18, 2025

!build

Copy link

📦 Build Complete for ed83b84
https://e7982ec2.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Mar 19, 2025

!build

Copy link

📦 Build Complete for 32ed4bd
https://aae4be41.graphite.pages.dev

@indierusty indierusty marked this pull request as draft March 20, 2025 10:54
@Keavon
Copy link
Member

Keavon commented Apr 16, 2025

If you get a chance soon to resolve the conflicts, I can do a code review and prepare to merge it now that I finally have the time to put my attention towards this. Thanks and sorry for the delay on my part causing you the extra work.

@indierusty
Copy link
Contributor Author

indierusty commented Apr 17, 2025

If you get a chance soon to resolve the conflicts, I can to a code review and prepare to merge it now that I finally have the time to put my attention towards this. Thanks and sorry for the delay on my part causing you the extra work.

No problem about the delay. I was actually sick for a few days but I'm back today and ready to work on tasks I'm assigned to. I'll get this conflicts resolved.

@indierusty indierusty marked this pull request as ready for review April 17, 2025 04:28
@Keavon Keavon changed the title Add Spline/Path mode option in the Pen tool to draw spline or path Move the Spline tool to a spline/path mode option in the Pen tool Apr 17, 2025
@Keavon Keavon mentioned this pull request Apr 17, 2025
7 tasks
@Keavon
Copy link
Member

Keavon commented Apr 17, 2025

Right clicking to end drawing the spline results in the whole new spline layer being deleted. It looks like this was intentional because of how the hints are shown. But we'll want to make it reflect the regular (path mode) Pen tool behavior of confirming all previously drawn segments but canceling the currently-being-extended segment; and if the user is clicking and dragging to slide around the new proposed segment, in that case Enter should accept it where it is while Esc/RMB should cancel that currently-being-placed-and-sliding segment. So in summary, if the mouse is up, Enter/Esc/RMB behave equivalently, but if the mouse is down and sliding, Esc/RMB behave differently from Enter. Check the Pen tool (path mode) for how that works and look at the input hints shown for both cases.

@Keavon
Copy link
Member

Keavon commented Apr 17, 2025

It looks like we lose the functionality that we currently have in master where the Pen tool can extend a Spline tool spline from its endpoint, creating the necessary node changes to support that. But now that I think about it, I think it might be better to just keep it this way for simplicity at this time. We're likely to use a more spreadsheet/attribute-oriented approach in the future for marking which anchors should be treated as a spline, that way the node graph can be considerably simplified. (Pending further progress on #1832 and #2522.)

@indierusty
Copy link
Contributor Author

I tried to read all the changes made to spline tool but I probably missed it.

@indierusty
Copy link
Contributor Author

It looks like we lose the functionality that we currently have in master where the Pen tool can extend a Spline tool spline from its endpoint, creating the necessary node changes to support that. But now that I think about it, I think it might be better to just keep it this way for simplicity at this time. We're likely to use a more spreadsheet/attribute-oriented approach in the future for marking which anchors should be treated as a spline, that way the node graph can be considerably simplified. (Pending further progress on #1832 and #2522.)

I think we can still extend the spline created in spline mode using path mode as path tool modifies the path node that feeds the spline node.

@Keavon Keavon force-pushed the merge-spline-path branch from 0069539 to 7074d0e Compare April 17, 2025 13:32
@Keavon Keavon marked this pull request as draft April 17, 2025 13:32
@Keavon
Copy link
Member

Keavon commented Apr 17, 2025

Consensus on our call together: replace this PR with one that reimplements the desired functionality: a "Polyline" mode that opts out of handle-dragging behavior in the Pen tool, and a "Spline" mode that is just "Polyline" mode but with the inclusion of a Spline node in the layer that's created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants