Concept to Vector: insert results outside plug-in generated art

An image inside a plug-in's generated art group took the variations as
new members of that group, and the next Edit Generated Art redrew the
group and deleted them. The group now counts as generated, so the
results go beside it, as they do for the other generated groups.
This commit is contained in:
dotCooCoo committed 2026-12-04 17:22:41 -08:00
1 parent e8ebbc5707
commit 6a84088dc8
2 files changed
+10 -6

No files matched your search

+4 -3
View File
@@ -164,11 +164,12 @@ fn shown_image_node(n: &Node) -> Option<&Node> {
}
/// Is `n` a group whose members are made or placed from data it holds (a graph, an Objects on
/// Path, Shaper, dimension, flare or Live Paint group, a compound shape), so that a member added
/// to it would be placed again, replaced or combined with the others?
/// Path, Shaper, dimension, flare or Live Paint group, a compound shape, a plug-in's generated
/// art), so that a member added to it would be placed again, replaced or combined with the others?
fn generated(n: &Node) -> bool {
let e = n.extras();
e.graph.is_some()
e.generated.is_some()
|| e.graph.is_some()
|| e.objects_on_path.is_some()
|| e.shaper.is_some()
|| e.dimension.is_some()
+6 -3
View File
@@ -1077,13 +1077,16 @@ fn insert_puts_the_results_outside_a_live_paint_group() {
assert!(*d.node(group).unwrap() == before, "the group is unchanged");
}
/// For an image in a graph, Shaper, dimension or flare group or a compound shape, the results go
/// beside the group, whose members stay as they are.
/// For an image in a graph, Shaper, dimension or flare group, a compound shape or a plug-in's
/// generated art, the results go beside the group, whose members stay as they are.
#[test]
fn insert_puts_the_results_outside_the_other_generated_groups() {
use vectorcraft_doc::dimension::{Dimension, DimensionMode, DimensionOptions};
type Mark = fn(&mut Node);
let kinds: [(&str, Mark); 5] = [
let kinds: [(&str, Mark); 6] = [
("plug-in generated art", |g| {
g.extras_mut().generated = Some(Box::new(vectorcraft_doc::generated::GeneratedArt::new("test.plugin", "Test", serde_json::Map::new())));
}),
("graph", |g| g.extras_mut().graph = Some(Box::default())),
("Shaper", |g| g.extras_mut().shaper = Some(Box::default())),
("dimension", |g| {