mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +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
@@ -16,7 +16,7 @@ use document_legacy::layers::layer_info::LayerDataType;
|
||||
use document_legacy::layers::style::RenderData;
|
||||
use document_legacy::Operation as DocumentOperation;
|
||||
use graph_craft::document::value::TaggedValue;
|
||||
use graph_craft::document::NodeInput;
|
||||
use graph_craft::document::{NodeId, NodeInput};
|
||||
use graphene_core::raster::Image;
|
||||
use graphene_core::text::Font;
|
||||
|
||||
@@ -606,6 +606,10 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
||||
}
|
||||
|
||||
impl PortfolioMessageHandler {
|
||||
pub fn introspect_node(&self, node_path: &[NodeId]) -> Option<String> {
|
||||
self.executor.introspect_node(node_path)
|
||||
}
|
||||
|
||||
pub fn document(&self, document_id: u64) -> Option<&DocumentMessageHandler> {
|
||||
self.documents.get(&document_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user