From 2fbe099c48ccbe0bab15e633b95c8221289c8438 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 22 Nov 2026 19:15:57 -0800 Subject: [PATCH] Plug-ins: refuse replacing a compound path's members when one isn't a path A member that is not a path (a compound path inside a compound path) is not in the input's `path`, so a changed `path` or `type: "path"` deleted it, together with any hidden or locked members it held. The host now refuses such an output with an error naming the compound path. A compound handed back as it was still keeps the member. docs/plugins.md also says that new members keep the old ids by position but not their names or live shapes. The test covers a nested compound member and turning a compound with a guide member into a guide path. --- crates/engine/src/tests/plugins.rs | 22 ++++++++++++++++++++-- crates/plugins/src/objects.rs | 10 +++++++--- crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/da.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/id.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + docs/plugins.md | 9 +++++---- 28 files changed, 57 insertions(+), 9 deletions(-) diff --git a/crates/engine/src/tests/plugins.rs b/crates/engine/src/tests/plugins.rs index 402a24eb68..9625e2ec2f 100644 --- a/crates/engine/src/tests/plugins.rs +++ b/crates/engine/src/tests/plugins.rs @@ -239,7 +239,16 @@ fn a_filter_keeps_or_replaces_a_compound_path_s_members_whole() { }; let hidden_only = compound_of(&mut s, vec![hidden(h, 360.0)]); let locked_only = compound_of(&mut s, vec![Node::path(i, square_at(360.0), Appearance::default()), locked(j, 380.0)]); - for target in [hidden_only, locked_only] { + // A member that is itself a compound path, shown and unlocked but holding a hidden member: its + // geometry isn't in the input, so a new path or a plain path would drop it. + let [k, l, m, _] = new_ids(&mut s); + let inner = Node::new(k, NodeKind::Compound { children: vec![Arc::new(hidden(l, 400.0))], rule: FillRule::NonZero }); + let nested = compound_of(&mut s, vec![Node::path(m, square_at(440.0), Appearance::default()), inner]); + let was_nested = node(&s, nested).clone(); + run(&mut s, "plugin.run", json!({"id": "test.engine.compound.echo", "ids": [nested.0]})); + assert_eq!(node(&s, nested).kind, was_nested.kind, "handed back as it was, a nested compound member stays"); + let flagged = "a hidden, locked or guide member"; + for (target, why) in [(hidden_only, flagged), (locked_only, flagged), (nested, "a member that isn't a path")] { install_wat(&mut s, &reshape("test.engine.compound.reshape", target, json!({}))); let flatten = tpl::returning( &tpl::manifest("test.engine.compound.flatten", "filter", "{}"), @@ -249,7 +258,7 @@ fn a_filter_keeps_or_replaces_a_compound_path_s_members_whole() { let before = (s.doc().unwrap().doc.clone(), s.doc().unwrap().history.undo.len()); for id in ["test.engine.compound.reshape", "test.engine.compound.flatten"] { let e = s.execute("plugin.run", &json!({"id": id, "ids": [target.0]})).unwrap_err().to_string(); - assert!(e.contains(&format!("compound path {} has a hidden, locked or guide member", target.0)), "{id}: {e}"); + assert!(e.contains(&format!("compound path {} has {why}", target.0)), "{id}: {e}"); assert_eq!((s.doc().unwrap().doc.clone(), s.doc().unwrap().history.undo.len()), before, "{id}"); } } @@ -284,6 +293,15 @@ fn a_filter_keeps_or_replaces_a_compound_path_s_members_whole() { assert_eq!(members(&s, target).iter().map(|m| m.3.clone()).collect::>(), [Some(square_at(200.0)), Some(square_at(240.0))], "{id}"); assert_eq!(guides(&s, target), [on, on], "{id}: every new member takes the output's `guide`"); } + // Turning it into a plain path is allowed the same way when the output sets `guide`. + let target = guide_of(&mut s); + let flatten = tpl::returning( + &tpl::manifest("test.engine.compound.flatten.guide", "filter", "{}"), + &json!({"objects": [{"id": target.0, "type": "path", "guide": true}]}).to_string(), + ); + install_wat(&mut s, &flatten); + run(&mut s, "plugin.run", json!({"id": "test.engine.compound.flatten.guide", "ids": [target.0]})); + assert!(matches!(node(&s, target).kind, NodeKind::Path { guide: true, .. }), "{:?}", node(&s, target).kind); } #[test] diff --git a/crates/plugins/src/objects.rs b/crates/plugins/src/objects.rs index 7445b10863..ad69c25720 100644 --- a/crates/plugins/src/objects.rs +++ b/crates/plugins/src/objects.rs @@ -1037,11 +1037,15 @@ fn same_geometry(returned: &PathData, current: &PathData) -> bool { returned.subpaths.iter().eq(current.subpaths.iter().filter(|sp| !sp.anchors.is_empty())) } -/// Refuses an output that replaces the members of compound path `n` while one of them is hidden, -/// locked or (unless the output sets `guide`) a guide. +/// Refuses an output that replaces the members of compound path `n` while one of them isn't a path +/// (plug-ins aren't given its geometry), or is hidden, locked or (unless the output sets `guide`) a +/// guide. fn check_members_replaceable(n: &Node, children: &[Arc], sets_guide: bool, at: &str) -> Result<()> { + let id = n.id.0; + if children.iter().any(|c| c.path_data().is_none()) { + return Err(out_err(at, format!("compound path {id} has a member that isn't a path, so its members can't be replaced"))); + } if children.iter().any(|c| !c.visible || c.locked || (!sets_guide && is_guide(c))) { - let id = n.id.0; return Err(out_err(at, format!("compound path {id} has a hidden, locked or guide member, so its members can't be replaced"))); } Ok(()) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 1a4dc70fa3..7824182049 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -7787,6 +7787,7 @@ variable-list-end {0}, {1} {0} i {1} @msg the output la sortida @msg the path has no anchor points el traçat no té punts d’ancoratge @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced el traçat compost {id} té un membre ocult, bloquejat o guia, per tant no se’n poden substituir els membres +@msg compound path {id} has a member that isn't a path, so its members can't be replaced el traçat compost {id} té un membre que no és un traçat, per tant no se’n poden substituir els membres @msg too many anchor points (limit {MAX_ANCHORS}) massa punts d’ancoratge (límit {MAX_ANCHORS}) @msg true or false true o false @msg a number >= {_1} un nombre >= {_1} diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index dc683ca4f8..5b1c5eacca 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -7397,6 +7397,7 @@ axis Y Axis osa Y @msg the output výstup @msg the path has no anchor points cesta nemá žádné kotevní body @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced složená cesta {id} má skrytý, zamčený nebo vodítkový člen, takže její členy nelze nahradit +@msg compound path {id} has a member that isn't a path, so its members can't be replaced složená cesta {id} má člen, který není cestou, takže její členy nelze nahradit @msg too many anchor points (limit {MAX_ANCHORS}) příliš mnoho kotevních bodů (limit {MAX_ANCHORS}) @msg true or false true nebo false @msg a number >= {_1} číslo >= {_1} diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 6886e7765e..8b9f7fc12b 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -628,6 +628,7 @@ liquify-list-end {0}, {1} {0} og {1} @msg the output outputtet @msg the path has no anchor points kurven har ingen ankerpunkter @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced den sammensatte kurve {id} har et skjult, låst eller hjælpelinjemedlem, så dens medlemmer kan ikke erstattes +@msg compound path {id} has a member that isn't a path, so its members can't be replaced den sammensatte kurve {id} har et medlem, der ikke er en kurve, så dens medlemmer kan ikke erstattes @msg too many anchor points (limit {MAX_ANCHORS}) for mange ankerpunkter (grænse {MAX_ANCHORS}) @msg true or false true eller false @msg a number >= {_1} et tal >= {_1} diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 5193dd73d2..1629db5e7d 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -6980,6 +6980,7 @@ axis Y Axis Y-Achse @msg the output die Ausgabe @msg the path has no anchor points der Pfad hat keine Ankerpunkte @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced der zusammengesetzte Pfad {id} hat ein ausgeblendetes, gesperrtes oder als Hilfslinie dienendes Element, daher lassen sich seine Elemente nicht ersetzen +@msg compound path {id} has a member that isn't a path, so its members can't be replaced der zusammengesetzte Pfad {id} hat ein Element, das kein Pfad ist, daher lassen sich seine Elemente nicht ersetzen @msg too many anchor points (limit {MAX_ANCHORS}) zu viele Ankerpunkte (Grenze {MAX_ANCHORS}) @msg true or false true oder false @msg a number >= {_1} eine Zahl >= {_1} diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 9ddf8dfec3..c190ca48cb 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -7387,6 +7387,7 @@ axis Y Axis Άξονας Y @msg the output η έξοδος @msg the path has no anchor points η διαδρομή δεν έχει σημεία αγκύρωσης @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced η σύνθετη διαδρομή {id} έχει κρυφό, κλειδωμένο ή οδηγό μέλος, οπότε τα μέλη της δεν μπορούν να αντικατασταθούν +@msg compound path {id} has a member that isn't a path, so its members can't be replaced η σύνθετη διαδρομή {id} έχει μέλος που δεν είναι διαδρομή, οπότε τα μέλη της δεν μπορούν να αντικατασταθούν @msg too many anchor points (limit {MAX_ANCHORS}) πάρα πολλά σημεία αγκύρωσης (όριο {MAX_ANCHORS}) @msg true or false true ή false @msg a number >= {_1} αριθμός >= {_1} diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 29a840f0f0..b411ebb22e 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -7373,6 +7373,7 @@ axis Y Axis Eje Y @msg the output la salida @msg the path has no anchor points el trazado no tiene puntos de ancla @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced el trazado compuesto {id} tiene un miembro oculto, bloqueado o guía, por lo que sus miembros no se pueden reemplazar +@msg compound path {id} has a member that isn't a path, so its members can't be replaced el trazado compuesto {id} tiene un miembro que no es un trazado, por lo que sus miembros no se pueden reemplazar @msg too many anchor points (limit {MAX_ANCHORS}) demasiados puntos de ancla (límite {MAX_ANCHORS}) @msg true or false true o false @msg a number >= {_1} un número >= {_1} diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 6b37414b59..aac92465f5 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -7464,6 +7464,7 @@ axis Y Axis Y-akseli @msg the output tuloste @msg the path has no anchor points polulla ei ole ankkuripisteitä @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced yhdistelmäpolulla {id} on piilotettu, lukittu tai apuviivana oleva jäsen, joten sen jäseniä ei voi korvata +@msg compound path {id} has a member that isn't a path, so its members can't be replaced yhdistelmäpolulla {id} on jäsen, joka ei ole polku, joten sen jäseniä ei voi korvata @msg too many anchor points (limit {MAX_ANCHORS}) liian monta ankkuripistettä (raja {MAX_ANCHORS}) @msg true or false true tai false @msg a number >= {_1} luku >= {_1} diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index b62cf5e517..3f9db12cd2 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -7393,6 +7393,7 @@ axis Y Axis Axe Y @msg the output la sortie @msg the path has no anchor points le tracé n’a aucun point d’ancrage @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced le tracé transparent {id} a un membre masqué, verrouillé ou repère, donc ses membres ne peuvent pas être remplacés +@msg compound path {id} has a member that isn't a path, so its members can't be replaced le tracé transparent {id} a un membre qui n’est pas un tracé, donc ses membres ne peuvent pas être remplacés @msg too many anchor points (limit {MAX_ANCHORS}) trop de points d’ancrage (limite {MAX_ANCHORS}) @msg true or false true ou false @msg a number >= {_1} un nombre >= {_1} diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 1dda08adae..ae468c125b 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -6581,6 +6581,7 @@ arrowhead Feather पंख @msg the output आउटपुट @msg the path has no anchor points पाथ में कोई एंकर पॉइंट नहीं है @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced कंपाउंड पाथ {id} का कोई सदस्य छिपा हुआ, बंद या गाइड है, इसलिए इसके सदस्य बदले नहीं जा सकते +@msg compound path {id} has a member that isn't a path, so its members can't be replaced कंपाउंड पाथ {id} का कोई सदस्य पाथ नहीं है, इसलिए इसके सदस्य बदले नहीं जा सकते @msg too many anchor points (limit {MAX_ANCHORS}) बहुत अधिक एंकर पॉइंट (सीमा {MAX_ANCHORS}) @msg true or false true या false @msg a number >= {_1} एक संख्या >= {_1} diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index c244cdc7bd..ad7e67a4a1 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -7382,6 +7382,7 @@ axis Y Axis Y tengely @msg the output a kimenet @msg the path has no anchor points az útvonalnak nincsenek horgonypontjai @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced a(z) {id} összetett útvonalnak van rejtett, zárolt vagy segédvonal tagja, ezért a tagjai nem cserélhetők le +@msg compound path {id} has a member that isn't a path, so its members can't be replaced a(z) {id} összetett útvonalnak van olyan tagja, amely nem útvonal, ezért a tagjai nem cserélhetők le @msg too many anchor points (limit {MAX_ANCHORS}) túl sok horgonypont (korlát: {MAX_ANCHORS}) @msg true or false true vagy false @msg a number >= {_1} szám >= {_1} diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index b4c886ab91..8c40fe6503 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -510,6 +510,7 @@ @msg the output keluaran @msg the path has no anchor points jalur tidak memiliki titik jangkar @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced jalur majemuk {id} memiliki anggota yang tersembunyi, terkunci, atau garis panduan, sehingga anggotanya tidak dapat diganti +@msg compound path {id} has a member that isn't a path, so its members can't be replaced jalur majemuk {id} memiliki anggota yang bukan jalur, sehingga anggotanya tidak dapat diganti @msg too many anchor points (limit {MAX_ANCHORS}) terlalu banyak titik jangkar (batas {MAX_ANCHORS}) @msg true or false true atau false @msg a number >= {_1} angka >= {_1} diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 23d79f1f9d..cb534ca7a7 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -7019,6 +7019,7 @@ axis Y Axis Asse Y @msg the output l’output @msg the path has no anchor points il tracciato non ha punti di ancoraggio @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced il tracciato composto {id} ha un membro nascosto, bloccato o guida, quindi i suoi membri non possono essere sostituiti +@msg compound path {id} has a member that isn't a path, so its members can't be replaced il tracciato composto {id} ha un membro che non è un tracciato, quindi i suoi membri non possono essere sostituiti @msg too many anchor points (limit {MAX_ANCHORS}) troppi punti di ancoraggio (limite {MAX_ANCHORS}) @msg true or false true o false @msg a number >= {_1} un numero >= {_1} diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 49aa86259e..fe8cc71f64 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -7094,6 +7094,7 @@ axis Y Axis Y 軸 @msg the output 出力 @msg the path has no anchor points パスにアンカーポイントがありません @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced 複合パス {id} に非表示、ロック、またはガイドのメンバーがあるため、メンバーを置き換えられません +@msg compound path {id} has a member that isn't a path, so its members can't be replaced 複合パス {id} にパスではないメンバーがあるため、メンバーを置き換えられません @msg too many anchor points (limit {MAX_ANCHORS}) アンカーポイントが多すぎます (上限 {MAX_ANCHORS}) @msg true or false true または false @msg a number >= {_1} {_1} 以上の数値 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 6de759cb7d..27e3aa4b63 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -9500,6 +9500,7 @@ axis Y Axis Y ღერძი @msg the output გამოტანა @msg the path has no anchor points ტრაექტორიას საყრდენი წერტილები არ აქვს @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced შედგენილ ტრაექტორიას {id} აქვს დამალული, ჩაკეტილი ან დამხმარე ხაზის წევრი, ამიტომ მისი წევრების ჩანაცვლება შეუძლებელია +@msg compound path {id} has a member that isn't a path, so its members can't be replaced შედგენილ ტრაექტორიას {id} აქვს წევრი, რომელიც ტრაექტორია არ არის, ამიტომ მისი წევრების ჩანაცვლება შეუძლებელია @msg too many anchor points (limit {MAX_ANCHORS}) ძალიან ბევრი საყრდენი წერტილი (ლიმიტი {MAX_ANCHORS}) @msg true or false true ან false @msg a number >= {_1} რიცხვი >= {_1} diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 9bdd856619..1e5b9e950c 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -6991,6 +6991,7 @@ axis Y Axis Y축 @msg the output 출력 @msg the path has no anchor points 패스에 앵커 포인트가 없습니다 @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced 컴파운드 패스 {id}에 숨겨졌거나 잠겼거나 안내선인 멤버가 있어 멤버를 바꿀 수 없습니다 +@msg compound path {id} has a member that isn't a path, so its members can't be replaced 컴파운드 패스 {id}에 패스가 아닌 멤버가 있어 멤버를 바꿀 수 없습니다 @msg too many anchor points (limit {MAX_ANCHORS}) 앵커 포인트가 너무 많습니다(한도 {MAX_ANCHORS}) @msg true or false true 또는 false @msg a number >= {_1} {_1} 이상인 숫자 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 23189ecd79..caeeabed57 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -474,6 +474,7 @@ liquify-list-end {0}, {1} {0} en {1} @msg the output de uitvoer @msg the path has no anchor points het pad heeft geen ankerpunten @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced het samengestelde pad {id} heeft een verborgen, vergrendeld of hulplijnlid, dus de leden kunnen niet worden vervangen +@msg compound path {id} has a member that isn't a path, so its members can't be replaced het samengestelde pad {id} heeft een lid dat geen pad is, dus de leden kunnen niet worden vervangen @msg too many anchor points (limit {MAX_ANCHORS}) te veel ankerpunten (limiet {MAX_ANCHORS}) @msg true or false true of false @msg a number >= {_1} een getal >= {_1} diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 2feaa45650..691fb29e77 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -7252,6 +7252,7 @@ axis Y Axis Oś Y @msg the output wyjście @msg the path has no anchor points ścieżka nie ma punktów kontrolnych @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced ścieżka złożona {id} ma ukryty, zablokowany lub będący linią pomocniczą element, więc jej elementów nie można zastąpić +@msg compound path {id} has a member that isn't a path, so its members can't be replaced ścieżka złożona {id} ma element, który nie jest ścieżką, więc jej elementów nie można zastąpić @msg too many anchor points (limit {MAX_ANCHORS}) za dużo punktów kontrolnych (limit {MAX_ANCHORS}) @msg true or false true lub false @msg a number >= {_1} liczbą >= {_1} diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 84fa97541e..295b54d447 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -7296,6 +7296,7 @@ axis Y Axis Eixo Y @msg the output a saída @msg the path has no anchor points o caminho não tem pontos de ancoragem @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced o caminho composto {id} tem um membro oculto, bloqueado ou guia, por isso seus membros não podem ser substituídos +@msg compound path {id} has a member that isn't a path, so its members can't be replaced o caminho composto {id} tem um membro que não é um caminho, por isso seus membros não podem ser substituídos @msg too many anchor points (limit {MAX_ANCHORS}) pontos de ancoragem demais (limite {MAX_ANCHORS}) @msg true or false true ou false @msg a number >= {_1} um número >= {_1} diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index f8c097ba9d..9bebde840d 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -7019,6 +7019,7 @@ axis Y Axis Ось Y @msg the output вывод @msg the path has no anchor points у контура нет опорных точек @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced у составного контура {id} есть скрытый, заблокированный или направляющий элемент, поэтому его элементы нельзя заменить +@msg compound path {id} has a member that isn't a path, so its members can't be replaced у составного контура {id} есть элемент, который не является контуром, поэтому его элементы нельзя заменить @msg too many anchor points (limit {MAX_ANCHORS}) слишком много опорных точек (предел {MAX_ANCHORS}) @msg true or false true или false @msg a number >= {_1} число >= {_1} diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index d6f6f39897..62ca329655 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -7409,6 +7409,7 @@ axis Y Axis Y-axel @msg the output utdata @msg the path has no anchor points banan har inga ankarpunkter @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced den sammansatta banan {id} har en dold, låst eller stödlinjemedlem, så dess medlemmar kan inte ersättas +@msg compound path {id} has a member that isn't a path, so its members can't be replaced den sammansatta banan {id} har en medlem som inte är en bana, så dess medlemmar kan inte ersättas @msg too many anchor points (limit {MAX_ANCHORS}) för många ankarpunkter (gräns {MAX_ANCHORS}) @msg true or false true eller false @msg a number >= {_1} ett tal >= {_1} diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index f006fb298e..6a805e1c55 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -7469,6 +7469,7 @@ axis Y Axis Y ekseni @msg the output çıktı @msg the path has no anchor points yolun bağlantı noktası yok @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced {id} bileşik yolunun gizli, kilitli veya kılavuz olan bir üyesi var, bu yüzden üyeleri değiştirilemez +@msg compound path {id} has a member that isn't a path, so its members can't be replaced {id} bileşik yolunun yol olmayan bir üyesi var, bu yüzden üyeleri değiştirilemez @msg too many anchor points (limit {MAX_ANCHORS}) çok fazla bağlantı noktası (sınır {MAX_ANCHORS}) @msg true or false true veya false @msg a number >= {_1} bir sayı >= {_1} diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 4829c577ac..ecfc2bc82b 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -7001,6 +7001,7 @@ axis Y Axis Вісь Y @msg the output виведення @msg the path has no anchor points контур не має опорних точок @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced складений контур {id} має прихований, заблокований або напрямний елемент, тому його елементи не можна замінити +@msg compound path {id} has a member that isn't a path, so its members can't be replaced складений контур {id} має елемент, який не є контуром, тому його елементи не можна замінити @msg too many anchor points (limit {MAX_ANCHORS}) забагато опорних точок (межа {MAX_ANCHORS}) @msg true or false true або false @msg a number >= {_1} число >= {_1} diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index ee744d7ff2..d02e834dcb 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -7048,6 +7048,7 @@ axis Y Axis Trục Y @msg the output đầu ra @msg the path has no anchor points đường dẫn không có điểm neo @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced đường dẫn phức {id} có thành phần bị ẩn, bị khóa hoặc là đường căn, nên không thể thay thế các thành phần của nó +@msg compound path {id} has a member that isn't a path, so its members can't be replaced đường dẫn phức {id} có thành phần không phải là đường dẫn, nên không thể thay thế các thành phần của nó @msg too many anchor points (limit {MAX_ANCHORS}) quá nhiều điểm neo (giới hạn {MAX_ANCHORS}) @msg true or false true hoặc false @msg a number >= {_1} một số >= {_1} diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 3d497ec2b8..adfaa791f2 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -7229,6 +7229,7 @@ axis Y Axis Y 轴 @msg the output 输出 @msg the path has no anchor points 路径没有锚点 @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced 复合路径 {id} 有隐藏、锁定或参考线成员,因此无法替换其成员 +@msg compound path {id} has a member that isn't a path, so its members can't be replaced 复合路径 {id} 有不是路径的成员,因此无法替换其成员 @msg too many anchor points (limit {MAX_ANCHORS}) 锚点过多(上限 {MAX_ANCHORS}) @msg true or false true 或 false @msg a number >= {_1} 大于或等于 {_1} 的数字 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 16c937b529..9fc557df5e 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -7050,6 +7050,7 @@ axis Y Axis Y 軸 @msg the output 輸出 @msg the path has no anchor points 路徑沒有錨點 @msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced 複合路徑 {id} 有隱藏、鎖定或參考線成員,因此無法取代其成員 +@msg compound path {id} has a member that isn't a path, so its members can't be replaced 複合路徑 {id} 有不是路徑的成員,因此無法取代其成員 @msg too many anchor points (limit {MAX_ANCHORS}) 錨點過多(上限 {MAX_ANCHORS}) @msg true or false true 或 false @msg a number >= {_1} 大於或等於 {_1} 的數字 diff --git a/docs/plugins.md b/docs/plugins.md index a7d685b314..7bbf7c4a73 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -777,10 +777,11 @@ For an **object filter**, the output is the new state of the input objects: - A `path` returned as it was keeps a live shape live (a rectangle keeps its corner widgets); a changed one makes it a plain path. - A compound path whose `path` is returned as it was, or left out, keeps its members as they are, hidden and locked - ones included; a changed `path` replaces its members with one plain member per subpath. The host refuses a `path` - with no anchor points, so return a compound path that has none without `path`. While a member is hidden, locked or a - guide, the host refuses a changed `path` and `type: "path"` for it (a guide member is allowed when the output also - sets `guide`). + ones included; a changed `path` replaces its members with one plain member per subpath, which keeps the old members' + ids by position but not their names or live shapes. The host refuses a `path` with no anchor points, so return a + compound path that has none without `path`. While a member is hidden, locked or a guide, or is not a path (its + geometry is not in the input's `path`), the host refuses a changed `path` and `type: "path"` for it (a guide member + is allowed when the output also sets `guide`). - The host compares a returned `path` with the input coordinate by coordinate, exactly. A JSON parser that does not read numbers back exactly as they were written (in Rust, `serde_json` without its `float_roundtrip` feature) can change the last digit of a coordinate, so leave `path` out when the geometry does not change.