Skip to content

Commit 4dc9e7f

Browse files
committed
Tidy up the TaggedValue variants
1 parent 36dc451 commit 4dc9e7f

1 file changed

Lines changed: 21 additions & 25 deletions

File tree

  • node-graph/graph-craft/src/document

node-graph/graph-craft/src/document/value.rs

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,27 @@ use crate::proto::{Any as DAny, FutureAny};
44
use brush_nodes::brush_cache::BrushCache;
55
use brush_nodes::brush_stroke::BrushStroke;
66
use core_types::table::Table;
7+
use core_types::transform::Footprint;
78
use core_types::uuid::NodeId;
89
use core_types::{CacheHash, Color, ContextFeatures, MemoHash, Node, Type};
910
use dyn_any::DynAny;
1011
pub use dyn_any::StaticType;
1112
use glam::{Affine2, Vec2};
1213
pub use glam::{DAffine2, DVec2, IVec2, UVec2};
13-
use graphic_types::Artboard;
14-
use graphic_types::Graphic;
15-
use graphic_types::Vector;
16-
use graphic_types::raster_types::Image;
17-
use graphic_types::raster_types::{CPU, Raster};
18-
use graphic_types::vector_types::vector;
19-
use graphic_types::vector_types::vector::ReferencePoint;
20-
use graphic_types::vector_types::vector::style::Fill;
21-
use graphic_types::vector_types::vector::style::GradientStops;
14+
use graphic_types::raster_types::{CPU, Image, Raster};
15+
use graphic_types::vector_types::vector::style::{Fill, Gradient, GradientStops, Stroke};
16+
use graphic_types::vector_types::vector::{self, ReferencePoint};
17+
use graphic_types::{Artboard, Graphic, Vector};
18+
use raster_nodes::curve::Curve;
2219
use rendering::RenderMetadata;
2320
use std::fmt::Display;
2421
use std::hash::Hash;
2522
use std::marker::PhantomData;
2623
use std::str::FromStr;
2724
pub use std::sync::Arc;
25+
use text_nodes::Font;
2826
use text_nodes::vector_types::GradientStop;
27+
use vector::VectorModification;
2928

3029
pub struct TaggedValueTypeError;
3130

@@ -166,15 +165,6 @@ macro_rules! tagged_value {
166165
}
167166

168167
tagged_value! {
169-
// ===============
170-
// PRIMITIVE TYPES
171-
// ===============
172-
F32(f32),
173-
F64(f64),
174-
U32(u32),
175-
U64(u64),
176-
Bool(bool),
177-
String(String),
178168
// ===========
179169
// TABLE TYPES
180170
// ===========
@@ -202,23 +192,29 @@ tagged_value! {
202192
#[serde(alias = "GradientPositions", alias = "GradientStops")]
203193
GradientTable(Table<GradientStops>),
204194
// ============
205-
// STRUCT TYPES
195+
// SCALAR TYPES
206196
// ============
197+
F32(f32),
198+
F64(f64),
199+
U32(u32),
200+
U64(u64),
201+
Bool(bool),
202+
String(String),
207203
FVec2(Vec2),
208204
FAffine2(Affine2),
209205
#[serde(alias = "IVec2", alias = "UVec2")]
210206
DVec2(DVec2),
211207
DAffine2(DAffine2),
212-
Stroke(graphic_types::vector_types::vector::style::Stroke),
213-
Gradient(graphic_types::vector_types::vector::style::Gradient),
214-
Font(text_nodes::Font),
208+
Stroke(Stroke),
209+
Gradient(Gradient),
210+
Font(Font),
215211
BrushStrokes(Vec<BrushStroke>),
216212
BrushCache(BrushCache),
217213
DocumentNode(DocumentNode),
218214
ContextFeatures(ContextFeatures),
219-
Curve(raster_nodes::curve::Curve),
220-
Footprint(core_types::transform::Footprint),
221-
VectorModification(Box<vector::VectorModification>),
215+
Curve(Curve),
216+
Footprint(Footprint),
217+
VectorModification(Box<VectorModification>),
222218
ImageData(Image<Color>),
223219
// ==========
224220
// ENUM TYPES

0 commit comments

Comments
 (0)