mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Fix the Into nodes, which were broken but unused except in GPU nodes (#2480)
* Prototype document network level into node insertion * Fix generic type resolution * Cleanup * Remove network nesting
This commit is contained in:
@@ -281,21 +281,16 @@ impl DocumentNode {
|
||||
self.inputs[index] = NodeInput::Node { node_id, output_index, lambda };
|
||||
let input_source = &mut self.original_location.inputs_source;
|
||||
for source in source {
|
||||
input_source.insert(source, index + self.original_location.skip_inputs - skip);
|
||||
input_source.insert(source, (index + self.original_location.skip_inputs).saturating_sub(skip));
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_proto_node(mut self) -> ProtoNode {
|
||||
assert!(!self.inputs.is_empty() || self.manual_composition.is_some(), "Resolving document node {self:#?} with no inputs");
|
||||
let DocumentNodeImplementation::ProtoNode(fqn) = self.implementation else {
|
||||
let DocumentNodeImplementation::ProtoNode(identifier) = self.implementation else {
|
||||
unreachable!("tried to resolve not flattened node on resolved node {self:?}");
|
||||
};
|
||||
|
||||
// TODO replace with proper generics removal
|
||||
let identifier = match fqn.name.clone().split_once('<') {
|
||||
Some((path, _generics)) => ProtoNodeIdentifier { name: Cow::Owned(path.to_string()) },
|
||||
_ => ProtoNodeIdentifier { name: fqn.name },
|
||||
};
|
||||
let (input, mut args) = if let Some(ty) = self.manual_composition {
|
||||
(ProtoNodeInput::ManualComposition(ty), ConstructionArgs::Nodes(vec![]))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user