Skip to content

Commit 13226f7

Browse files
Firestar99Keavon
authored andcommitted
Re-export all of gcore in gstd and rename 'Image' node to 'Image Value' (#2733)
* rename `image` node to `image_value` * reexport the entirety of `gcore` in `gstd`
1 parent 6898586 commit 13226f7

5 files changed

Lines changed: 13 additions & 15 deletions

File tree

editor/src/messages/portfolio/document/graph_operation/utility_types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ impl<'a> ModifyInputsContext<'a> {
211211

212212
pub fn insert_image_data(&mut self, image_frame: RasterDataTable<CPU>, layer: LayerNodeIdentifier) {
213213
let transform = resolve_document_node_type("Transform").expect("Transform node does not exist").default_node_template();
214-
let image = resolve_document_node_type("Image")
215-
.expect("Image node does not exist")
214+
let image = resolve_document_node_type("Image Value")
215+
.expect("ImageValue node does not exist")
216216
.node_template_input_override([Some(NodeInput::value(TaggedValue::None, false)), Some(NodeInput::value(TaggedValue::RasterData(image_frame), false))]);
217217

218218
let image_id = NodeId::new();

node-graph/gstd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ wgpu = ["gpu", "graph-craft/wgpu"]
1313
wasm = ["wasm-bindgen", "web-sys"]
1414
imaginate = ["image/png", "base64", "web-sys", "wasm-bindgen-futures"]
1515
image-compare = []
16-
vello = ["dep:vello", "gpu"]
16+
vello = ["dep:vello", "gpu", "graphene-core/vello"]
1717
resvg = []
1818
wayland = ["graph-craft/wayland"]
1919

node-graph/gstd/src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
pub mod any;
2-
pub mod http;
3-
pub mod raster;
4-
pub mod text;
5-
pub mod vector;
6-
pub use graphene_core::*;
72
pub mod brush;
83
pub mod dehaze;
94
pub mod filter;
5+
pub mod http;
106
pub mod image_color_palette;
7+
pub mod raster;
8+
pub mod text;
9+
pub mod vector;
1110
#[cfg(feature = "wasm")]
1211
pub mod wasm_application_io;
12+
13+
pub use graphene_core::*;

node-graph/gstd/src/raster.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ use fastnoise_lite;
33
use glam::{DAffine2, DVec2, Vec2};
44
use graphene_core::instances::Instance;
55
use graphene_core::raster::bbox::Bbox;
6-
use graphene_core::raster::{
7-
Alpha, AlphaMut, Bitmap, BitmapMut, CellularDistanceFunction, CellularReturnType, Channel, DomainWarpType, FractalType, Image, LinearChannel, Luminance, NoiseType, RGBMut,
8-
};
6+
pub use graphene_core::raster::*;
97
use graphene_core::raster_types::{CPU, Raster, RasterDataTable};
108
use graphene_core::transform::Transform;
11-
use graphene_core::{AlphaBlending, Color, Ctx, ExtractFootprint};
9+
use graphene_core::{AlphaBlending, Ctx, ExtractFootprint};
1210
use rand::prelude::*;
1311
use rand_chacha::ChaCha8Rng;
1412
use std::fmt::Debug;
@@ -303,7 +301,7 @@ fn empty_image(_: impl Ctx, transform: DAffine2, color: Color) -> RasterDataTabl
303301

304302
/// Constructs a raster image.
305303
#[node_macro::node(category(""))]
306-
fn image(_: impl Ctx, _primary: (), image: RasterDataTable<CPU>) -> RasterDataTable<CPU> {
304+
fn image_value(_: impl Ctx, _primary: (), image: RasterDataTable<CPU>) -> RasterDataTable<CPU> {
307305
image
308306
}
309307

node-graph/gstd/src/text.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use crate::vector::{VectorData, VectorDataTable};
22
use graph_craft::wasm_application_io::WasmEditorApi;
33
use graphene_core::Ctx;
4-
use graphene_core::text::TypesettingConfig;
5-
pub use graphene_core::text::{Font, FontCache, bounding_box, load_face, to_path};
4+
pub use graphene_core::text::*;
65

76
#[node_macro::node(category(""))]
87
fn text<'i: 'n>(

0 commit comments

Comments
 (0)