Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Add nondestructive vector editing

Open 0HyperCube opened this issue 1 year ago • 6 comments

Closes #1162, closes #1800, closes #1736, closes #1180, closes #134, closes #1180, closes #999 (addresses the pen tool not the spline tool).

This MR is a very early work in progress.

ToDo:

  • [x] Selecting only attached verts when clicked
  • [x] Using alt to toggle the colinears
  • [ ] ~~Fix booleans~~ Impossible - I will port some other (working) boolean impl at another time.
  • [x] Remove dead codes
  • [x] Clean up and document the new files
  • [x] Dissolving many points
  • [x] Not using handles with shift aligning anchors.
  • [x] Create some new bugs
  • [ ] Resolve the new bugs

0HyperCube avatar Mar 11 '24 18:03 0HyperCube

!build

Keavon avatar Mar 11 '24 21:03 Keavon

📦 Build Complete for fa96cbcf84202f007af97f875a04b96c9500a49c
https://45dbc014.graphite.pages.dev

github-actions[bot] avatar Mar 11 '24 21:03 github-actions[bot]

Closing as I can't be bothered to fix the merge conflicts @Keavon.

0HyperCube avatar Mar 24 '24 09:03 0HyperCube

@0HyperCube if you're ever blocked by something like merge conflicts, please let me know! I'm here to help make things run smoothly for you in any moment I'm able to help. Merge conflicts are almost always within my range of capabilities, so just give me a ping any moment that you'd rather I deal with them for you and I'd be most happy to. It's my goal to make sure you're happy with the work you're doing, so if there's busywork I can take on for you, please don't hesitate to throw it my way.

Keavon avatar Mar 25 '24 05:03 Keavon

It's amazing to see this all coming together. I looked pretty hard and couldn't find many regressions at all, so I commend you on your thorough testing already. Here are just 3 (or maybe 4) rather minor issues I was able to find.

  • Select tool: I can no longer double-click a shape to make it change to the Path tool for editing its points I think this is a regression?
  • Freehand tool: I see you added smoothing, nice! But could that be made nondestructive by making it still draw a polyline like before, but having it insert the Spline from Points node in the node chain so the smoothing can be disabled later on if the user chooses? Having the automatic insertion of that smoothing node be optional with a tool option checkbox could also be helpful. But either or both aspects of this could wait for later on, no need to do that in this PR.
  • Freehand tool: extending the endpoint of the wire in the Procedural String Lights demo artwork located at the top of the tree causes it to extend the endpoint at the bottom of the tree instead.
  • Path tool: Inserting a point causes a subsequent edge to become a separate path stroke (there appears to be multiple M SVG path commands in the result):

https://github.com/GraphiteEditor/Graphite/assets/4388688/a03b529f-67f0-4d44-a45a-055cee30d73f

  • Path tool: deleting a point (with CtrlDelete) causes the resulting shape's blue overlay hover outline to be different from the actual shape (but this might actually just be a symptom of the previous bullet point, as that's occurring here too):

https://github.com/GraphiteEditor/Graphite/assets/4388688/fed4a028-47e0-4799-96c6-7e1f0fad6e55

None of these are important enough to block merging this in the current state, so if you're not feeling down to fix these right now, no worries. This is a massive improvement now that we can modify shapes, even generated ones, non-destructively!

We'll need to update the demo artwork once again before the merge happens. Just so it's part of the Git history in this PR, would you mind also committing the upgrade script you wrote for the record? Thanks!

Keavon avatar Jun 23 '24 08:06 Keavon