Graphite/node-graph/nodes/gcore/src
Dennis Kobert fafc687d84
Migrate memo nodes to node macro and make implementing other persistent nodes easier (#3552)
* Add #[data] and #[serialize] attributes to node macro

- Add #[data] attribute for struct fields that aren't node parameters
  - Data fields are initialized with Default::default()
  - Passed as references to the underlying function
  - Excluded from registry metadata (internal state)
  - Generic types in data fields allowed without #[implementations]

- Add #[serialize] attribute for custom Node::serialize() implementation
  - Receives references to all data fields
  - Generates serialize() method in Node trait impl

- Conditional derives based on data field presence
  - With data fields: Debug, Clone only
  - Without data fields: Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash

* Refactor Memo and Monitor Node to use node macro

* Move Complex type into type alias

* Fix format

* Update node-graph/nodes/gcore/src/memo.rs

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Update node-graph/nodes/gcore/src/memo.rs

Co-authored-by: Keavon Chambers <keavon@keavon.com>

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-05 22:28:02 +01:00
..
animation.rs New node: Pointer Position (#3535) 2025-12-27 16:02:23 -08:00
context_modification.rs Restructure node crates (#3384) 2025-11-18 10:21:54 +00:00
debug.rs Restructure node crates (#3384) 2025-11-18 10:21:54 +00:00
extract_xy.rs Restructure node crates (#3384) 2025-11-18 10:21:54 +00:00
lib.rs Restructure node crates (#3384) 2025-11-18 10:21:54 +00:00
logic.rs Replace text-only tooltips with custom richly styled tooltips (#3436) 2025-11-30 13:32:58 -08:00
memo.rs Migrate memo nodes to node macro and make implementing other persistent nodes easier (#3552) 2026-01-05 22:28:02 +01:00
ops.rs Restructure node crates (#3384) 2025-11-18 10:21:54 +00:00