Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Add proportional editing to the Path tool

Open singhutsav5502 opened this issue 10 months ago • 18 comments

Adds Proportional Editing Mode

Functionality similar to Blenders Proportional Edit tool ported to Graphites 2D implementation.

Alt + P to toggle Proportional Editing mode. Mouse Scroll Up/Down to increase/decrease Influence Radius. Integrate with GRS tool.

Introduces 8 falloff types:

  1. Constant
  2. Linear
  3. Sharp
  4. Root
  5. Sphere
  6. Smooth
  7. Random
  8. Inverse Square

Closes #2317

singhutsav5502 avatar Apr 11 '25 21:04 singhutsav5502

!build

Keavon avatar Apr 11 '25 22:04 Keavon

📦 Build Complete for 3303996ed8ee42b2542fd07fca34d6764a46c8bd
https://ffda505b.graphite.pages.dev

github-actions[bot] avatar Apr 11 '25 22:04 github-actions[bot]

A few notes:

  • It should work with G/R/S
  • It should apply to the original drag starting location's range of points, not a continuously updating range of points (see comparison videos below)
  • It should only show the influence circle when dragging, not always when the feature is enabled

https://files.keavon.com/-/MiniatureDisguisedScarletibis/capture_34_.mp4 vs. https://files.keavon.com/-/SlipperyStridentCaiman/capture_35_.mp4

Keavon avatar Apr 11 '25 23:04 Keavon

!build

Keavon avatar Apr 12 '25 10:04 Keavon

📦 Build Complete for 4c15feab6cb28d742e802d710642ce2b8010c7cd
https://8e2c8c2e.graphite.pages.dev

github-actions[bot] avatar Apr 12 '25 10:04 github-actions[bot]

Hi, Still working on the integration with transformation.rs for the GRS functionality.

singhutsav5502 avatar Apr 12 '25 10:04 singhutsav5502

!build

Keavon avatar Apr 13 '25 10:04 Keavon

📦 Build Complete for d60f6ea295be4f621e87ffb301f94ebcfb98aaed
https://550fd3ac.graphite.pages.dev

github-actions[bot] avatar Apr 13 '25 11:04 github-actions[bot]

!build

Keavon avatar Apr 13 '25 20:04 Keavon

📦 Build Complete for b35d2a1cf3cb8a35582d4e7bcaad78cd50e725b3
https://86f25568.graphite.pages.dev

github-actions[bot] avatar Apr 13 '25 21:04 github-actions[bot]

!build

Keavon avatar Apr 15 '25 04:04 Keavon

📦 Build Complete for f8a61c69e7f00b80c1019eadc379f99b432dc904
https://28714f29.graphite.pages.dev

github-actions[bot] avatar Apr 15 '25 05:04 github-actions[bot]

!build

Keavon avatar Apr 15 '25 22:04 Keavon

📦 Build Complete for 9e9effbb2c27d1ed8351ba93416d03e925456060
https://22249c5c.graphite.pages.dev

github-actions[bot] avatar Apr 15 '25 22:04 github-actions[bot]

!build

Keavon avatar Apr 24 '25 07:04 Keavon

📦 Build Complete for 075768b4397243b3e79fcff78599f6e07d0f9d9a
https://73457d87.graphite.pages.dev

github-actions[bot] avatar Apr 24 '25 07:04 github-actions[bot]

Outstanding issues as communicated in Discord:

  • [ ] With rotation, points seem to converge inwards:

    https://github.com/user-attachments/assets/a1e03a44-45b5-4fd7-8098-44fbb6e68902

    https://github.com/user-attachments/assets/73368523-fb99-4053-8afd-9ccae69f4ea8

  • [ ] Dragging a point with the Path tool, as opposed to using G/R/S, is pretty broken:

    https://github.com/user-attachments/assets/85aca12f-46da-4245-a2e6-2e4b6a37f322

  • [ ] Performance really doesn't scale well, it gets super sluggish with a grid like in the video above

  • [ ] Your PR adds a lot of lines of code. I'll need you to break out most of the functionality into its own file dedicated to proportional editing, since this is too much specialized behavior in the path tool.

Keavon avatar Apr 24 '25 09:04 Keavon

Hi, will start by restructuring the code into independent files first.

singhutsav5502 avatar May 06 '25 06:05 singhutsav5502