mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Resolve scopes before flattening network (#4235)
* Compiler changes * Run preprocessor on wrapping network * Remove test nodes * FIx * move generate_node_paths call to compiler * Make it more obvious what input is set to
This commit is contained in:
@@ -9,11 +9,11 @@ use interpreted_executor::dynamic_executor::DynamicExecutor;
|
||||
use interpreted_executor::util::wrap_network_in_scope;
|
||||
|
||||
pub fn setup_network(name: &str) -> (DynamicExecutor, ProtoNetwork) {
|
||||
let mut network = load_from_name(name);
|
||||
let network = load_from_name(name);
|
||||
let editor_api = std::sync::Arc::new(EditorApi::default());
|
||||
let mut network = wrap_network_in_scope(network, editor_api);
|
||||
let preprocessor = preprocessor::Preprocessor::new();
|
||||
preprocessor.expand_network(&mut network, &ResourceRegistry::default()).unwrap();
|
||||
let network = wrap_network_in_scope(network, editor_api);
|
||||
preprocessor.preprocess(&mut network, &ResourceRegistry::default()).unwrap();
|
||||
let proto_network = compile(network);
|
||||
let executor = block_on(DynamicExecutor::new(proto_network.clone())).unwrap();
|
||||
(executor, proto_network)
|
||||
|
||||
Reference in New Issue
Block a user