Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve point IDs without a path node #2068

Open
0HyperCube opened this issue Oct 22, 2024 · 2 comments
Open

Preserve point IDs without a path node #2068

0HyperCube opened this issue Oct 22, 2024 · 2 comments
Labels
Architecture Involves architecture or engineering work or discussion Crash A panic which crashed the editor

Comments

@0HyperCube
Copy link
Member

When there is no path node, the compute_modified_vector function (included below) relies on the click_targets. However click targets don't store PointIds, SegementIds, or colinear handles. This leads to a couple of issues:

  • If you select a point on ellipse (no dragging) the colinear check box won't be filled.
  • If the segments are in an odd order (e.g. with the bevel node), inserting a point in a segment crashes.

self.document_metadata
.click_targets
.get(&layer)
.map(|click| click.iter().map(ClickTarget::subpath))
.map(|subpaths| VectorData::from_subpaths(subpaths, true))
}

@0HyperCube 0HyperCube added Architecture Involves architecture or engineering work or discussion Rust Crash A panic which crashed the editor labels Oct 22, 2024
@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Oct 22, 2024
@adamgerhant
Copy link
Collaborator

I think it would be best to automatically insert a Path node when the editor creates vector data. I don't think relying on the click targets is a good idea.

@Keavon
Copy link
Member

Keavon commented Dec 22, 2024

A related issue that's a consequence of this:

The Path tool's options bar checkbox for "Colinear Handles" only correctly displays the current status for a selected point if the layer has a Path node. If you draw an ellipse, none of the points have "Colinear Handles" checked until adding a downstream Path node, then the checkboxes populate their correct values. So this problem applies to vector data coming from somewhere in the graph flow without a Path node being involved, such as a vector shape generator node rather than a Path node.

@Keavon Keavon removed the Rust label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Involves architecture or engineering work or discussion Crash A panic which crashed the editor
Projects
Status: Short-Term
Development

No branches or pull requests

4 participants
@Keavon @0HyperCube @adamgerhant and others