mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-12-01 15:53:26 -10:00
Reorganize the node catalog's categories and hide Debug nodes in production builds
12 lines
511 B
Rust
12 lines
511 B
Rust
use core_types::Ctx;
|
|
use core_types::list::Item;
|
|
use glam::{DAffine2, DVec2};
|
|
|
|
/// Meant for debugging purposes, not general use. Logs the input value to the console and passes it through unchanged.
|
|
#[node_macro::node(category("Data: I/O"), icon("NodeDebugLog"))]
|
|
fn debug_log<T: std::fmt::Debug>(_: impl Ctx, #[implementations(bool, f64, i64, DVec2, DAffine2, String)] value: Item<T>) -> Item<T> {
|
|
// KEEP THIS `debug!()` - It acts as the output for the debug node itself
|
|
log::debug!("{value:#?}");
|
|
value
|
|
}
|