Files
materialcraft/crates/core/src/missing_node.rs
chasse20 d318484b41 Checkpoint native SBS primitive workflow
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.

Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
2026-11-05 18:23:06 -05:00

23 lines
675 B
Rust

use crate::Node;
use crate::Value;
pub const MISSING_NODE: &str = "missing_node";
pub fn missing_ports(node: &Node) -> (Vec<String>, Vec<(String, bool)>) {
let list = |key: &str| -> Vec<String> {
match node.params.get(key) {
Some(Value::Text(s)) => s.split(',').map(str::trim).filter(|p| !p.is_empty()).take(64).map(str::to_string).collect(),
_ => Vec::new(),
}
};
let outputs = list("outputs")
.into_iter()
.map(|o| match o.split_once(':') {
Some((id, kind)) => (id.to_string(), kind == "gray"),
None => (o, false),
})
.collect();
(list("inputs"), outputs)
}