mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 16:18:12 +08:00
Bundle Graphite using Tauri (#873)
* Setup tauri component for graphite editor Integrate graphite into tauri app Split interpreted-executor out of graph-craft * Add gpu execution node * General Cleanup
This commit is contained in:
committed by
Keavon Chambers
parent
52cc770a1e
commit
7d8f94462a
@@ -321,17 +321,12 @@ impl ProtoNetwork {
|
||||
}
|
||||
|
||||
fn replace_node_references(&mut self, lookup: &HashMap<u64, u64>) {
|
||||
self.nodes.iter_mut().for_each(|(sid, node)| {
|
||||
self.nodes.iter_mut().for_each(|(_, node)| {
|
||||
node.map_ids(|id| *lookup.get(&id).expect("node not found in lookup table"));
|
||||
});
|
||||
self.inputs = self.inputs.iter().map(|id| *lookup.get(id).unwrap()).collect();
|
||||
self.output = *lookup.get(&self.output).unwrap();
|
||||
}
|
||||
|
||||
fn replace_ids_with_lookup(&mut self, lookup: HashMap<u64, u64>) {
|
||||
self.nodes.iter_mut().for_each(|(id, _)| *id = *lookup.get(id).unwrap());
|
||||
self.replace_node_references(&lookup);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user