mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Add node introspection API
Closes #1110 Test Plan: query the introspectNode Endpoint from js Reviewers: Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1183
This commit is contained in:
committed by
Keavon Chambers
parent
0af42ee6f9
commit
bea7cc8dd0
@@ -275,7 +275,7 @@ impl ProtoNetwork {
|
||||
let paths = self.nodes.iter().map(|(_, node)| node.document_node_path.clone()).collect::<Vec<_>>();
|
||||
|
||||
let resolved_lookup = resolved.clone();
|
||||
if let Some((input_node, id, input, path)) = self.nodes.iter_mut().filter(|(id, _)| !resolved_lookup.contains(id)).find_map(|(id, node)| {
|
||||
if let Some((input_node, id, input, mut path)) = self.nodes.iter_mut().filter(|(id, _)| !resolved_lookup.contains(id)).find_map(|(id, node)| {
|
||||
if let ProtoNodeInput::Node(input_node, false) = node.input {
|
||||
resolved.insert(*id);
|
||||
let pre_node_input = inputs.get(input_node as usize).expect("input node should exist");
|
||||
@@ -288,6 +288,7 @@ impl ProtoNetwork {
|
||||
}) {
|
||||
lookup.insert(id, compose_node_id);
|
||||
self.replace_node_references(&lookup, true);
|
||||
path.push(id);
|
||||
self.nodes.push((
|
||||
compose_node_id,
|
||||
ProtoNode {
|
||||
|
||||
Reference in New Issue
Block a user