Improve older document upgrading compatibility and make node type errors clearer (#2201)

* Improve older document upgrading compatibility and make node type errors clearer

Misc.

* Fixes

* Avoid unwrap
This commit is contained in:
Keavon Chambers
2025-01-21 01:40:43 -08:00
committed by GitHub
parent eec0ef761c
commit 8505ed3f10
13 changed files with 154 additions and 74 deletions

View File

@@ -588,7 +588,7 @@ impl ConcatElement for GraphicGroup {
}
}
#[node_macro::node(category(""))]
#[node_macro::node(category(""), path(graphene_core::vector))]
async fn sample_points<F: 'n + Send + Copy>(
#[implementations(
(),
@@ -815,7 +815,7 @@ async fn poisson_disk_points<F: 'n + Send>(
result
}
#[node_macro::node(category(""))]
#[node_macro::node(category(""), path(graphene_core::vector))]
async fn subpath_segment_lengths<F: 'n + Send>(
#[implementations(
(),
@@ -979,6 +979,8 @@ async fn morph<F: 'n + Send + Copy>(
let target = target.eval(footprint).await;
let mut result = VectorData::empty();
let time = time.clamp(0., 1.);
// Lerp styles
result.alpha_blending = if time < 0.5 { source.alpha_blending } else { target.alpha_blending };
result.style = source.style.lerp(&target.style, time);