You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The objective was to provide 3 (2 in case of pen tool) modes for the viewer that changes how the handles are shown of the selected anchors. The specific requirements and intended behaviour is well written in the issue which this closes#2261.
The approach is summarised below -
Added overlay_mode_type in options of both tools which can be modified by the radio buttons in the tool options layout.
For each tool they are enum which control the behaviour in Overlays tool message.
path_overlays is made more modular by giving another argument, which specifies whether all handles, specific handles, frontier handles, or no handles to be drawn.
get_selected_segments is for getting the vector of segmentIds of all segments which are associated with selected elements, which is used specifically for implementing mode 2 and 3.
For mode 3, the core logic is finding those points which are only attached to one segment in all of the relevant segments, this approach also takes care of base cases like when there is a loop, etc.
overlay_bezier_handles utility function is created to avoid repetition of code.
4adex
changed the title
Path tool only show frontier overlays
Reduce path editing clutter with options to hide non-selected anchors' handles
Feb 7, 2025
While in mode 2 or mode 3, when the new selection (on mouse down) has only anchors, then previous selection of points is stored in saved_points_before_handle_drag in tool_data
In mode 3, if only one point is selected then behaviour is of mode 2.
While dragging a handle you can also see the opposite handle.
Below are four separate frontiers. But the current implementation only treats 1 and 4 as frontiers, which means we don't see handles on either end of frontiers 2 and 3. We should see both handles around that unselected point, as a result.
Another issue: in the Pen tool, when not drawing, all handles are shown regardless of mode.
We made it so when dragging a handle, once done, it returns the selection to the previous state— that works when you release the drag, but not when you abort the drag by right clicking or hitting escape.
Keavon
changed the title
Reduce path editing clutter with options to hide non-selected anchors' handles
Add Pen and Path tool modes to avoid showing all handles
Feb 12, 2025
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The objective was to provide 3 (2 in case of pen tool) modes for the viewer that changes how the handles are shown of the selected anchors. The specific requirements and intended behaviour is well written in the issue which this closes #2261.
The approach is summarised below -
overlay_mode_type
in options of both tools which can be modified by the radio buttons in the tool options layout.Overlays
tool message.path_overlays
is made more modular by giving another argument, which specifies whether all handles, specific handles, frontier handles, or no handles to be drawn.get_selected_segments
is for getting the vector of segmentIds of all segments which are associated with selected elements, which is used specifically for implementing mode 2 and 3.overlay_bezier_handles
utility function is created to avoid repetition of code.