Rename 'Image Value' node to 'Image' and have its input value be an image not a raster table (#4037)

* Rename 'Image Value' node to 'Image' and have its input value be Image<Color> not Table<Raster<CPU>>

* Add a Properties panel widget labeling "width x height" for images in the Image node

* Add Image<Color> node registry entry for MonitorNode

* Code review
This commit is contained in:
Keavon Chambers
2026-04-22 16:00:03 -07:00
committed by GitHub
parent c2e1208d82
commit d3f36a95cf
11 changed files with 57 additions and 34 deletions

View File

@@ -225,6 +225,7 @@ tagged_value! {
Curve(raster_nodes::curve::Curve),
Footprint(core_types::transform::Footprint),
VectorModification(Box<vector::VectorModification>),
ImageData(Image<Color>),
// ==========
// ENUM TYPES
// ==========

View File

@@ -71,6 +71,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => Table<Raster<GPU>>]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => Table<Color>]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => Table<GradientStops>]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => Image<Color>]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => String]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => IVec2]),
async_node!(graphene_core::memo::MonitorNode<_, _, _>, input: Context, fn_params: [Context => DVec2]),

View File

@@ -297,8 +297,8 @@ pub fn empty_image(_: impl Ctx, transform: DAffine2, color: Table<Color>) -> Tab
}
#[node_macro::node(category(""))]
pub fn image_value(_: impl Ctx, _primary: (), image: Table<Raster<CPU>>) -> Table<Raster<CPU>> {
image
pub fn image(_: impl Ctx, _primary: (), image: Image<Color>) -> Table<Raster<CPU>> {
Table::new_from_element(Raster::new_cpu(image))
}
#[node_macro::node(category("Raster: Pattern"))]