mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 06:38:11 +08:00
Add ::IDENTITY to node macro to return a ProtoNodeIdentifier that is always a &'static str (#2842)
* fix warnings on master * make the `ProtoNodeIdentifier` of a Node be accessible and always a borrowed `&'static str` * always generate `node_name::identifier()`, even with `skip_impl` * make `FrontendNodeType` use Cow * remove broken `DocumentNodeDefinition`s for old GPU nodes * don't reexport `graphic_element` in it's entirety, only data structures * adjust everything to use the new `node_name::identifier()` * fixup imports for wasm * turn identifier fn into a constant
This commit is contained in:
@@ -12,7 +12,7 @@ pub mod debug;
|
||||
pub mod extract_xy;
|
||||
pub mod generic;
|
||||
pub mod gradient;
|
||||
mod graphic_element;
|
||||
pub mod graphic_element;
|
||||
pub mod instances;
|
||||
pub mod logic;
|
||||
pub mod math;
|
||||
@@ -35,7 +35,7 @@ pub use blending::*;
|
||||
pub use context::*;
|
||||
pub use ctor;
|
||||
pub use dyn_any::{StaticTypeSized, WasmNotSend, WasmNotSync};
|
||||
pub use graphic_element::*;
|
||||
pub use graphic_element::{Artboard, ArtboardGroupTable, GraphicElement, GraphicGroupTable};
|
||||
pub use memo::MemoHash;
|
||||
pub use num_traits;
|
||||
pub use raster::Color;
|
||||
@@ -161,7 +161,7 @@ where
|
||||
|
||||
pub trait NodeInputDecleration {
|
||||
const INDEX: usize;
|
||||
fn identifier() -> &'static str;
|
||||
fn identifier() -> ProtoNodeIdentifier;
|
||||
type Result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user