Share one graph runtime between the editor api scope and the executor

This commit is contained in:
Dennis Kobert
2026-07-30 17:26:39 +00:00
parent f13806efcd
commit 41fc175088
9 changed files with 90 additions and 18 deletions
+1
View File
@@ -3,6 +3,7 @@ pub mod render_background;
pub mod render_cache;
pub mod render_node;
pub mod render_pixel_preview;
pub mod runtime;
pub mod text;
pub use blending_nodes;
pub use brush_nodes as brush;
+11
View File
@@ -0,0 +1,11 @@
pub use core_types::runtime::*;
use crate::platform_application_io::editor_api;
use core_types::Ctx;
use graph_craft::application_io::PlatformEditorApi;
use std::sync::Arc;
#[node_macro::node(category(""), inject_scope)]
pub fn runtime(_: impl Ctx, #[scope(editor_api::IDENTIFIER)] editor_api: Arc<PlatformEditorApi>) -> RuntimeHandle {
editor_api.runtime.clone()
}