Instance tables refactor part 4: replace ArtboardGroups with multi-row Instances<Artboard> (#2265)

* Clean up dyn_any usages

* Migrate ArtboardGroup to ArtboardGroupTable (not yet flattened)

* Reorder graphical data imports

* Flatten and remove ArtboardGroup in favor of ArtboardGroupTable

* Fix test
This commit is contained in:
Keavon Chambers
2025-03-02 17:30:29 -08:00
parent 2f6c6e28f0
commit 19a140682e
32 changed files with 233 additions and 156 deletions

View File

@@ -3,6 +3,7 @@ use crate::raster::BlendMode;
use crate::Color;
use dyn_any::DynAny;
use glam::DVec2;
use std::hash::{Hash, Hasher};

View File

@@ -5,6 +5,7 @@ use crate::renderer::format_transform_matrix;
use crate::Color;
use dyn_any::DynAny;
use glam::{DAffine2, DVec2};
use std::fmt::{self, Display, Write};

View File

@@ -670,6 +670,7 @@ async fn subpath_segment_lengths(_: impl Ctx, vector_data: VectorDataTable) -> V
#[node_macro::node(name("Spline"), category("Vector"), path(graphene_core::vector))]
async fn spline(_: impl Ctx, mut vector_data: VectorDataTable) -> VectorDataTable {
let original_transform = vector_data.transform();
let vector_data = vector_data.one_instance_mut().instance;
// Exit early if there are no points to generate splines from.
@@ -707,7 +708,9 @@ async fn spline(_: impl Ctx, mut vector_data: VectorDataTable) -> VectorDataTabl
}
vector_data.segment_domain = segment_domain;
VectorDataTable::new(vector_data.clone())
let mut result = VectorDataTable::new(vector_data.clone());
*result.transform_mut() = original_transform;
result
}
#[node_macro::node(category("Vector"), path(graphene_core::vector))]