Skip to content

feat(canvas): add path tool and vector layers#9194

Draft
DustyShoe wants to merge 2 commits into
invoke-ai:mainfrom
DustyShoe:feat(canvas)--Splines-tool
Draft

feat(canvas): add path tool and vector layers#9194
DustyShoe wants to merge 2 commits into
invoke-ai:mainfrom
DustyShoe:feat(canvas)--Splines-tool

Conversation

@DustyShoe
Copy link
Copy Markdown
Collaborator

Summary

This draft PR introduces the first pass of spline/path support for the canvas by adding a dedicated vector_layer entity and an initial Bezier path editing workflow.

The goal of this PR is to get early feedback on the data model, editing UX, and trace flow before expanding the feature further.

What is included

  • adds vector_layer to the canvas entity stack
  • adds persisted/serializable vector layer state and project recall support
  • adds open Bezier path creation in the path tool
  • adds vector-layer edit mode
  • supports multiple paths per vector layer
  • supports switching the active path by clicking another path on the same layer
  • shows control handles only for the active control point
  • supports point editing operations:
    • drag anchor
    • pull handles from an anchor
    • drag handles
    • Shift+click to insert a point on the active path
    • Ctrl+click to delete a point
  • adds layer-level Edit
  • adds layer-level Trace All Paths
  • traces all paths in the vector layer into a new raster layer
  • adds type/store/selector/renderer integration for vector layers

Current UX model

  • a canvas can contain multiple vector layers
  • each vector layer can contain multiple paths
  • when a vector layer is in edit mode, only one path is active at a time
  • clicking another path in the same layer makes that path active for editing
  • changes to the previous path remain in place
  • handles are shown only for the active control point
  • Accept / Discard apply to the current layer edit session

Not included yet

  • vector layer transform workflow
  • freehand to Bezier approximation
  • closed-path fill flow
  • create inpaint mask from vector paths
  • create regional guidance from vector paths
  • trace to an existing target raster layer
  • per-path trace actions

Known limitations

  • this first pass is focused on open paths and trace
  • Trace All Paths currently always creates a new raster layer
  • the edit flow is usable, but still needs broader UX validation
  • some edge cases around dense/overlapping path editing may still need refinement

Feedback and suggestions are welcome!

@github-actions github-actions Bot added the frontend PRs that change frontend files label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant