Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions node-graph/nodes/vector/src/vector_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@ async fn auto_tangents(
#[default(true)]
preserve_existing: bool,
) -> Table<Vector> {
if spread == 0. && preserve_existing {
return source;
Comment on lines +877 to +878
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The added if statement introduces a functional change that deviates from the expected behavior of spread = 0. (sharp corner) when preserve_existing is true.

If spread is 0. and preserve_existing is true, the existing logic (lines 911-929) correctly handles two scenarios:

  1. Points with non-zero existing handles are preserved (due to preserve_existing).
  2. Points with zero-length existing handles (i.e., handles at the anchor position) are explicitly set to None (due to spread = 0.), making them sharp corners.

The current early return return source; prevents scenario 2 from occurring. This means if a point has a handle that is exactly at its anchor position, it will not be removed, which contradicts the "sharp corner" definition of spread = 0..

To maintain the correct behavior, this early return should be removed, allowing the subsequent logic to process all points as intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense

}

source
.iter()
.map(|source| {
Expand Down
Loading