GSOC 2025: Advanced vector editing tool modes #2666
Replies: 13 comments
-
Week 1:
|
Beta Was this translation helpful? Give feedback.
-
Week 2:
2025-06-11.18-42-20.mp42025-06-13.01-20-03.mp42025-06-14.00-53-36.mp4 |
Beta Was this translation helpful? Give feedback.
-
Week 3:
|
Beta Was this translation helpful? Give feedback.
-
Week 4:
|
Beta Was this translation helpful? Give feedback.
-
Week 5:
|
Beta Was this translation helpful? Give feedback.
-
Week 6:
|
Beta Was this translation helpful? Give feedback.
-
Week 7:
|
Beta Was this translation helpful? Give feedback.
-
Week 8:
![]() |
Beta Was this translation helpful? Give feedback.
-
Week 9:
![]() |
Beta Was this translation helpful? Give feedback.
-
Week 10:
Screencast from 11-08-25 09:01:13 AM IST.webm (merge points feat) |
Beta Was this translation helpful? Give feedback.
-
Week 11:
|
Beta Was this translation helpful? Give feedback.
-
Week 12:Solved these following minor regressions in the path tool (PR Open #3070) -
|
Beta Was this translation helpful? Give feedback.
-
Week 13:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm Adesh Gupta (@4adex ), and I’ll be working with Graphite as a GSoC 2025 contributor. My project is titled "Advanced Vector Editing Tool Modes", and it focuses on improving the vector editing experience in the Graphite editor by introducing new and state of the art tool features and extending existing tools to support vector meshes.
Introduction
The aim of this project is to add Segment Editing Mode and Region Editing Mode to the Path Tool, allowing more granular and flexible manipulation of vector elements. These modes will support individual and combined selections, with features like lasso/bounding-box selection, segment bending, region dragging, and more.
Alongside this, I will be refactoring the Pen and Path Tools to better support vector meshes. Current vector tools are limited to paths and struggle with shared anchors or overlapping regions. My work will enable operations such as merging anchors, gluing/peeling segments, and creating segments between selected anchors—expanding the editing capabilities significantly.
Benefits
Deliverables
Final Report
The project is overall a success, enhancing the vector editing tools, introducing new modes for more immersive and precise vector editing, improving existing features, and adding support for vector mesh editing by pen and path tool. Path tool now has a new segment editing mode which is equivalent of blender's "Edge Select Mode", it allows the user to precisely manipulate vector segments, without doing redundant task with anchor points. Both path tool and pen tool are now debugged for vector mesh support, and additional features have been incorporated for vector meshes.
The next step for the project will be to first finalize the design of remaining features implemented and merge all of them one by one, find the existing bugs and prune them. Thereafter continue with addition of new path editing modes such as knife tool, which is mentioned as a stretch task in the proposal. I will also be working upon contributing in implementing newly designed context menus. I am excited to continue with my contributions in the project, helping it to achieve all of its future goals. This GSoC project was a very good experience, collaborating with other skilled contributors, working on a large and good codebase, and designing new features for Graphite.
Path Tool: Segment editing mode #2712
This is one of the major contributions done in this project, which is introducing a "segment editing mode" similar to blender's "Edge Select Mode". This means user can perform all of the operations that were done on points now on segments also. These operations include - selection, dragging, deleting, etc. Additionally features such as "insert point on segment" and "molding segments" were also added for improved user experience. One of the important tasks was to define the
SelectedLayerState
and to expose relevant methods to be used inside tools, it only used to store theselected_points
, but now it also supportsselected_segments
.Selection had different challenges, "click to select" needed its own overlay to visually define which segments are selected and which segment is being hovered over. Box selection and lasso selection also had design challenges. Touched and enclosed selection modes needed their own implementations (https://pomax.github.io/bezierinfo/#boundingbox) to decide whether a bezier curve is partially inside or completely inside a polygon or not.
Delete segment was done as a modification to the vector,
G/R/S
feature support is also added to the segments. One can select a segment, pan it withG
, rotate it withR
and scale it withS
.Path Tool: Improved overlays and dynamic contextual hints #2860
This came as a byproduct of working on the segment editing feature, the partially transparent overlay on hover provides dynamic context to the user and is very intuitive. Segments and points both have these semi transparent hover overlays now.
Hints in the hints bar are now dynamic, an operation is hinted only when it can be performed according to current states. This also solved many TODO's related to hints in the path tool code.
Pen and Path Tool: Improving support for vector mesh editing
Vector meshes is an experimental feature in Graphite (similar to vector networks in Figma), which allows the users to draw mesh of vector paths, without being bound to the traditional SVG constraints. This project aimed to improve tooling support for making and editing vector meshes.
Debugging existing features #2695
In traditional vector programs, a single anchor point is not expected to have more than two segments connected, some features of Graphite were also implemented having that assumption. These made tools to break when used with vector meshes, I found such edge cases that were present in pen and path tool and re-implemented the logic in a safer way which works for more general set of vector meshes.
Pen tool can start and end in between segments #2692
This was a quality of life improvement which I proposed in my proposal, and has been implemented and merged. When drawing with the pen tool, if the user want to break the segment at a point, and attach the incoming segment there, he/she needs to switch to path tool and then switch back to the pen tool for doing the same. The new improved pen tool allows you to start drawing a new segment from a point on the segment, and also end the incoming segment on a new point on the segment.
Path Tool: Cut, Copy, Paste, Duplicate for vector data #2812
Path Tool currently did not supported copying and pasting geometry (points, segments). This was a feature which was necessary to extend the usability of Graphite as a vector editing program. It was a priority issue which was not initially part of the project, but it aligned very much with the direction and scope, hence was given to me by my mentor. The most challenging task was to decide which data structure is going to be serialized, and using the geometry information in deserialized data to modify the vector during paste.
Miscellaneous Contributions
These additional contributions, while not part of the project's primary objectives, closely aligned with the goal of enhancing vector editing capabilities in Graphite. They further improved the user experience and expanded the toolset available for vector manipulation.
Point Sliding Feature #2682
Before starting off the project I was contributing on Graphite to complete #1870. During the coding period I worked on completing "Sliding Point" feature which later also got a followup PR for shifting the behavior from
Ctrl
Shift
drag to,G``G
because it will be equivalent to blender's move vertex along segment (#2913)Double Click to alter layer selection #2794
Path tool was able to work on multiple layers and layers can be added into the selection with a single click, but this also lead to wrongly clicking layers. This PR attempted to improve the layer switching and selection using double clicking (more details related to design in the PR).
Make node chooser auto filter by layer input #2841
This was a small quality of life improvement which was needed before open sauce, this uses the existing filtering logic based on node type of the incoming node. The main challenge was to determine the node type of the rightmost node which is connected to the layer.
Make Path Node Editable Button
This feature is also a small user experience improvement, which allows users to insert a new Path node at the end of steam of nodes, just before the layer. It allows the user to make checkpoints of the vector modifications done (having some modifications in one node, rest in other and so on). Adding node manually always makes that possible, but this UI button makes it much more accessible.
Remove existing bugs in the path tool #3070
Many of the recent developments in the path tool also introduces some regressions which needed to be pruned. This PR was an attempt to collect all those regressions which were high priority and remove them covering all the edge cases.
New Actions
Actions are similar to blender context menu options, things which can be done in one click and perform some change into the vector. Some new actions have been implemented which will facilitate vector mesh editing and vector editing in general by the path tool. These actions include -
Merge Point #2966
Attempts to join the points which are nearby in the vector meshes of selected layers. Finds the points which are close within a certain threshold, if they are, a new point is added at their mass center, old points are deleted, and all the connections are rebuilt. Hence the merged point is at the centroid of all old points (which were close under threshold).
Gluing Segments #3038
Attempts to joint the segments which are close to each other in the selected layers. The initial prototype has been implemented in the coding period and needs to be refined further (under process).
merge.segments.feat.webm
Peel and Separate Segment #3038
Separating and peeling a selected segment. Separate segment had a challenge of deciding at which newer segment the old connection will be placed, in current version that is managed by comparing the dot product of incoming handle with perpendicular vector of the segment. Initial prototype has been implemented in the coding period and is under the process of definition.
Notes about region editing mode and other tasks
Ctrl
+J
) is already present which I was not aware about when making the proposal, hence that is also not implemented separately but vector mesh support has been added to it.On a final note, contributing to a project like Graphite has been an incredibly rewarding and educational experience. Thank for providing this opportunity!
Beta Was this translation helpful? Give feedback.
All reactions