mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-27 16:34:05 +00:00
Improve the categorization across many nodes
This commit is contained in:
parent
2ec0ff38f3
commit
fdb09e334b
11 changed files with 41 additions and 54 deletions
|
@ -60,7 +60,7 @@ async fn create_surface<'a: 'n>(_: impl Ctx, editor: &'a WasmEditorApi) -> Arc<W
|
|||
// }
|
||||
// }
|
||||
|
||||
#[node_macro::node(category("Network"))]
|
||||
#[node_macro::node(category("Web Request"))]
|
||||
async fn load_resource<'a: 'n>(_: impl Ctx, _primary: (), #[scope("editor-api")] editor: &'a WasmEditorApi, #[name("URL")] url: String) -> Arc<[u8]> {
|
||||
let Some(api) = editor.application_io.as_ref() else {
|
||||
return Arc::from(include_bytes!("../../graph-craft/src/null.png").to_vec());
|
||||
|
@ -75,7 +75,7 @@ async fn load_resource<'a: 'n>(_: impl Ctx, _primary: (), #[scope("editor-api")]
|
|||
data
|
||||
}
|
||||
|
||||
#[node_macro::node(category("Network"))]
|
||||
#[node_macro::node(category("Web Request"))]
|
||||
fn decode_image(_: impl Ctx, data: Arc<[u8]>) -> RasterDataTable<CPU> {
|
||||
let Some(image) = image::load_from_memory(data.as_ref()).ok() else {
|
||||
return RasterDataTable::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue