Rename leveled_record_value_edge to leveled_record_value_source

This commit is contained in:
Dennis Kobert
2026-09-06 16:27:01 +00:00
parent 1e91511f93
commit 2921f44e5c
2 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -10,7 +10,7 @@ use core_types::list::List;
use core_types::registry::SourceHandle; use core_types::registry::SourceHandle;
use core_types::transform::Footprint; use core_types::transform::Footprint;
use core_types::uuid::NodeId; use core_types::uuid::NodeId;
use core_types::value::{leveled_record_value_edge, record_value_source}; use core_types::value::{leveled_record_value_source, record_value_source};
use core_types::{CacheHash, Color, ContextModification, MemoHash, Type, TypeDescriptor}; use core_types::{CacheHash, Color, ContextModification, MemoHash, Type, TypeDescriptor};
use dyn_any::DynAny; use dyn_any::DynAny;
pub use dyn_any::StaticType; pub use dyn_any::StaticType;
@@ -323,7 +323,7 @@ macro_rules! tagged_value {
macro_rules! check_level { macro_rules! check_level {
($list:ty, $element:ty) => { ($list:ty, $element:ty) => {
if name == core_types::normalize_type_name(std::any::type_name::<$list>()) { if name == core_types::normalize_type_name(std::any::type_name::<$list>()) {
return Ok(leveled_record_value_edge(Vec::<$element>::new())); return Ok(leveled_record_value_source(Vec::<$element>::new()));
} }
}; };
} }
@@ -332,16 +332,16 @@ macro_rules! tagged_value {
check_level!(List<Raster<CPU>>, Raster<CPU>); check_level!(List<Raster<CPU>>, Raster<CPU>);
// One default lane rather than an empty level: an unwired path input // One default lane rather than an empty level: an unwired path input
// starts from a blank vector, as the legacy path modify synthesized itself. // starts from a blank vector, as the legacy path modify synthesized itself.
if name == core_types::normalize_type_name(std::any::type_name::<List<Vector>>()) { return Ok(leveled_record_value_edge(vec![Vector::default()])); } if name == core_types::normalize_type_name(std::any::type_name::<List<Vector>>()) { return Ok(leveled_record_value_source(vec![Vector::default()])); }
check_level!(List<String>, String); check_level!(List<String>, String);
if name == core_types::normalize_type_name(std::any::type_name::<DocumentNode>()) { return Ok(record_value_source(DocumentNode::default())); } if name == core_types::normalize_type_name(std::any::type_name::<DocumentNode>()) { return Ok(record_value_source(DocumentNode::default())); }
if name == core_types::normalize_type_name(std::any::type_name::<Resource>()) { return Ok(record_value_source(Resource::default())); } if name == core_types::normalize_type_name(std::any::type_name::<Resource>()) { return Ok(record_value_source(Resource::default())); }
Self::from_type_or_none(&Type::Concrete(td)).to_edge() Self::from_type_or_none(&Type::Concrete(td)).to_edge()
} }
Self::F64Array(values) => Ok(leveled_record_value_edge(values)), Self::F64Array(values) => Ok(leveled_record_value_source(values)),
Self::Color(color) => Ok(leveled_record_value_edge(color.into_iter().collect::<Vec<_>>())), Self::Color(color) => Ok(leveled_record_value_source(color.into_iter().collect::<Vec<_>>())),
Self::Gradient(stops) => Ok(leveled_record_value_edge(vec![stops])), Self::Gradient(stops) => Ok(leveled_record_value_source(vec![stops])),
Self::BrushStrokes(strokes) => Ok(leveled_record_value_edge(strokes)), Self::BrushStrokes(strokes) => Ok(leveled_record_value_source(strokes)),
// ======================= // =======================
// AUTO-GENERATED VARIANTS // AUTO-GENERATED VARIANTS
// ======================= // =======================
+2 -2
View File
@@ -90,8 +90,8 @@ where
} }
} }
/// The native record edge of a constant level: the edge type is the element's. /// The native record source of a constant level: the source type is the element's.
pub fn leveled_record_value_edge<T: Clone + Send + Sync + crate::CacheHash + PartialEq + dyn_any::StaticTypeSized + 'static>(values: Vec<T>) -> crate::registry::SourceHandle pub fn leveled_record_value_source<T: Clone + Send + Sync + crate::CacheHash + PartialEq + dyn_any::StaticTypeSized + 'static>(values: Vec<T>) -> crate::registry::SourceHandle
where where
T::Static: Clone + Send + Sync, T::Static: Clone + Send + Sync,
{ {