Live Paint: Make and Merge refuse type, images and other objects that aren't paths

Live Paint builds its faces and edges from path outlines alone. Make,
Merge and the Live Paint Bucket put every selected object among the
group's hidden sources, so type, an image, a symbol, a blend or a group
holding one of them vanished from the canvas. They now refuse such a
selection before changing anything ("Live Paint takes paths and compound
paths: convert type, images and other objects to paths first"), as type
and raster images can't go into a Live Paint group directly
(https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/create-live-paint-groups.html).
One predicate, vectorcraft_tools::builder::live_paint_takes (Live Paint
groups, paths, compound paths and groups of them), decides it for Make,
Merge and the Properties panel's Merge Live Paint, which no longer shows
for a selection Merge refuses. The message has an @msg row in every
catalog.

Tests: tests_build::live_paint_refuses_type_and_images_and_changes_nothing
(Merge, Make and the Bucket with type, an image or a group holding type:
refused, document, selection and undo history unchanged; a group of
paths and a path still merge) and
panels::properties::tests::merge_live_paint_is_a_quick_action_for_a_live_paint_group_and_more
(hidden with type selected). Both fail without the change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Taha-Mahmoodi
2026-10-24 19:02:09 +07:00
committed by bflatastic
co-authored by Claude Opus 5.5
parent aa35783f47
commit ff5919f416
31 changed files with 126 additions and 16 deletions
+18 -2
View File
@@ -58,7 +58,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Make",
["Object", "Live Paint"],
Some("Cmd+Alt+X"),
"{ids?|id?} build a Live Paint group from the selected paths; with a Live Paint group among them, add the others to it as livePaint.merge does → {id, faces, edges}",
"{ids?|id?} build a Live Paint group from the selected paths (paths, compound paths and groups of them; type, images and other objects are refused, nothing changes); with a Live Paint group among them, add the others to it as livePaint.merge does → {id, faces, edges}",
has_selection_or_ids,
lp_make
),
@@ -67,7 +67,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Merge",
["Object", "Live Paint"],
None,
"{ids?|id?} add the other selected paths (and Live Paint groups) to the bottom-most Live Paint group, keeping its id, its paint and its own properties (name, lock, visibility, transparency, appearance, opacity mask, graphic style link) → {id, faces, edges}",
"{ids?|id?} add the other selected paths (compound paths, groups of paths and Live Paint groups too; type, images and other objects are refused, nothing changes) to the bottom-most Live Paint group, keeping its id, its paint and its own properties (name, lock, visibility, transparency, appearance, opacity mask, graphic style link) → {id, faces, edges}",
has_multi_or_ids,
lp_merge
),
@@ -609,9 +609,24 @@ fn merged_gap_options(groups: &[GapOptions]) -> GapOptions {
if !bottom.detect && groups.iter().any(|g| g.detect) { GapOptions { detect: true, size: GapSize::Small, ..bottom } } else { bottom }
}
/// Refuse `roots` when one of them is something Live Paint can't take ([`b::live_paint_takes`]):
/// its faces and edges come from path outlines alone, so type or an image would vanish among the
/// group's hidden sources. Checked before anything changes.
fn check_live_paint_takes(d: &Document, roots: &[NodeId]) -> Result<()> {
for r in roots {
if !b::live_paint_takes(d.node(*r).ok_or(EngineError::NoNode(*r))?) {
return Err(EngineError::Other(
"Live Paint takes paths and compound paths: convert type, images and other objects to paths first".into(),
));
}
}
Ok(())
}
/// Make a Live Paint group from `roots`, or add them to the first Live Paint group among them
/// as Merge does; returns (group, faces, edges).
fn make_live(d: &mut Document, sel: &mut Selection, roots: &[NodeId]) -> Result<(NodeId, usize, usize)> {
check_live_paint_takes(d, roots)?;
if roots.iter().any(|r| d.node(*r).is_some_and(is_live_paint)) {
return merge_live(d, sel, roots);
}
@@ -644,6 +659,7 @@ fn merge_live(d: &mut Document, sel: &mut Selection, roots: &[NodeId]) -> Result
.copied()
.find(|r| d.node(*r).is_some_and(is_live_paint))
.ok_or_else(|| EngineError::Other("Live Paint Merge: select a Live Paint group and the paths to add".into()))?;
check_live_paint_takes(d, roots)?;
let old = d.node(target).cloned().ok_or(EngineError::NoNode(target))?;
// Paint to carry over: (point inside face, fill) and (point on edge, stroke).
let keep_faces: Vec<(Point, Paint)> = b::faces(&old)
+44
View File
@@ -1581,6 +1581,50 @@ fn live_paint_merge_keeps_paint_and_adds_faces() {
assert_eq!(layer_children(&s), 1);
}
/// Live Paint builds its faces and edges from path outlines alone, so Merge, Make and the Live
/// Paint Bucket refuse type, an image, or a group holding type: before, they went into the
/// group's hidden sources and vanished from the canvas. Nothing changes, not even the undo
/// history. Paths, and groups of paths, still merge.
#[test]
fn live_paint_refuses_type_and_images_and_changes_nothing() {
let mut s = session();
let g = live(&mut s);
let text = NodeId(s.execute("text.create", &json!({"x": 200, "y": 300, "text": "Hi"})).unwrap()["id"].as_u64().unwrap());
let image = add_image(&mut s, &vectorcraft_trace::Raster::from_fn(4, 4, |_, _| [0, 0, 0, 255]), Affine::translate((300.0, 300.0)));
let path = rect(&mut s, 400.0, 20.0, 40.0, 40.0);
s.execute("select.set", &json!({"ids": [text.0, path.0]})).unwrap();
let text_group = NodeId(s.execute("object.group", &json!({})).unwrap()["id"].as_u64().unwrap());
let state = |s: &Session| {
let d = s.doc().unwrap();
(d.doc.clone(), d.selection.clone(), d.history.undo.len())
};
let want = "Live Paint takes paths and compound paths: convert type, images and other objects to paths first";
for other in [text, image, text_group] {
let calls = [
("livePaint.merge", json!({"ids": [g.0, other.0]})),
("livePaint.make", json!({"ids": [g.0, other.0]})),
("livePaint.make", json!({"ids": [other.0]})),
("livePaint.fill", json!({"ids": [other.0], "point": [200, 300], "color": "#00ff00"})),
];
for (c, p) in calls {
s.execute("select.set", &json!({"ids": [g.0, other.0]})).unwrap();
let before = state(&s);
let r = s.execute(c, &p);
assert!(matches!(&r, Err(EngineError::Other(m)) if m == want), "{c} {p}: {r:?}");
assert!(state(&s) == before, "{c} {p} changed the document");
}
}
// A group of paths and a path still merge.
let (a, b) = (rect(&mut s, 120.0, 20.0, 100.0, 20.0), rect(&mut s, 120.0, 60.0, 100.0, 20.0));
s.execute("select.set", &json!({"ids": [a.0, b.0]})).unwrap();
let paths = NodeId(s.execute("object.group", &json!({})).unwrap()["id"].as_u64().unwrap());
let c = rect(&mut s, 0.0, 120.0, 100.0, 20.0);
let r = s.execute("livePaint.merge", &json!({"ids": [g.0, paths.0, c.0]})).unwrap();
assert_eq!(NodeId(r["id"].as_u64().unwrap()), g);
assert!(vectorcraft_tools::builder::live_paint_takes(&node(&s, g)));
assert!(!vectorcraft_tools::builder::live_paint_takes(&node(&s, text_group)));
}
/// Give Live Paint group `g` a lock, hidden state, appearance, knockout, opacity mask and
/// graphic style link, and return it as it then is.
fn dress_live_group(s: &mut Session, g: NodeId) -> Node {
+13
View File
@@ -39,6 +39,19 @@ pub fn is_live_paint(n: &Node) -> bool {
matches!(n.kind, NodeKind::Group { clip: false, .. }) && n.name.as_deref().is_some_and(|s| s.starts_with(LIVE_PAINT_PREFIX))
}
/// Whether Live Paint can take `n` as it is: a Live Paint group, a path or compound path, or a
/// group of those. Type, images, symbols, blends, meshes and the rest have to be converted to
/// paths first (<https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/create-live-paint-groups.html>);
/// Make and Merge refuse them rather than hide them among the group's sources.
pub fn live_paint_takes(n: &Node) -> bool {
is_live_paint(n)
|| match &n.kind {
NodeKind::Path { .. } | NodeKind::Compound { .. } => true,
NodeKind::Group { children, .. } => children.iter().all(|c| live_paint_takes(c)),
_ => false,
}
}
fn named(n: &Node, name: &str) -> bool {
n.name.as_deref() == Some(name)
}
+1
View File
@@ -3754,6 +3754,7 @@ axis Both И двете
@msg Installed plug-in {_1} Инсталирана добавка {_1}
@msg Internal error: {msg} (please report this bug) Вътрешна грешка: {msg} (моля, докладвайте този софтуерен дефект)
@msg Live Paint Merge: select a Live Paint group and the paths to add Обединяване в интерактивно боядисване: изберете група за интерактивно боядисване и пътищата за добавяне
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Интерактивното боядисване приема пътища и съставни пътища: първо преобразувайте текста, изображенията и другите обекти в пътища
@msg Live Paint: select paths or compound paths Интерактивно боядисване: изберете пътища или съставни пътища
@msg Live Paint: these paths are too degenerate to paint Интерактивно боядисване: тези пътища са твърде дегенерирали за боядисване
@msg Make Guides: select paths Създаване на водачи: изберете пътища
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4142,6 +4142,7 @@ imageTrace Outline Obrys
@msg Installed plug-in {_1} Nainstalován zásuvný modul {_1}
@msg Internal error: {msg} (please report this bug) Vnitřní chyba: {msg} (nahlaste prosím tuto chybu)
@msg Live Paint Merge: select a Live Paint group and the paths to add Sloučit živou malbu: vyberte skupinu živé malby a cesty, které chcete přidat
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Živá malba přijímá cesty a složené cesty: text, obrazy a jiné objekty nejprve převeďte na cesty
@msg Live Paint: select paths or compound paths Živá malba: vyberte cesty nebo složené cesty
@msg Live Paint: these paths are too degenerate to paint Živá malba: tyto cesty jsou příliš degenerované, aby je bylo možné malovat
@msg Make Guides: select paths Vytvořit vodítka: vyberte cesty
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3875,6 +3875,7 @@ imageTrace Outline Kontur
@msg Installed plug-in {_1} Installerede plug-in'en {_1}
@msg Internal error: {msg} (please report this bug) Intern fejl: {msg} (meld venligst denne fejl)
@msg Live Paint Merge: select a Live Paint group and the paths to add Live Paint-fletning: markér en Live Paint-gruppe og de kurver, der skal tilføjes
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Live Paint tager kurver og sammensatte kurver: konvertér først tekst, billeder og andre objekter til kurver
@msg Live Paint: select paths or compound paths Live Paint: markér kurver eller sammensatte kurver
@msg Live Paint: these paths are too degenerate to paint Live Paint: disse kurver er for degenererede til at blive malet
@msg Make Guides: select paths Opret hjælpelinjer: markér kurver
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3762,6 +3762,7 @@ theme Appearance Erscheinungsbild
@msg Installed plug-in {_1} Plug-in {_1} installiert
@msg Internal error: {msg} (please report this bug) Interner Fehler: {msg} (bitte melden Sie diesen Fehler)
@msg Live Paint Merge: select a Live Paint group and the paths to add Interaktiv malen – Zusammenfügen: Wählen Sie eine Interaktiv-malen-Gruppe und die hinzuzufügenden Pfade aus
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Interaktiv malen nimmt Pfade und zusammengesetzte Pfade an: Wandeln Sie Text, Bilder und andere Objekte zuerst in Pfade um
@msg Live Paint: select paths or compound paths Interaktiv malen: Wählen Sie Pfade oder zusammengesetzte Pfade aus
@msg Live Paint: these paths are too degenerate to paint Interaktiv malen: Diese Pfade sind zu entartet, um sie zu bemalen
@msg Make Guides: select paths Hilfslinien erstellen: Wählen Sie Pfade aus
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -2104,6 +2104,7 @@ axis Both Και τα δύο
@msg Installed plug-in {_1} Εγκαταστάθηκε η επέκταση {_1}
@msg Internal error: {msg} (please report this bug) Εσωτερικό σφάλμα: {msg} (παρακαλούμε αναφέρετε αυτό το σφάλμα)
@msg Live Paint Merge: select a Live Paint group and the paths to add Συγχώνευση δυναμικής βαφής: επιλέξτε ομάδα δυναμικής βαφής και τις διαδρομές προς προσθήκη
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Η δυναμική βαφή δέχεται διαδρομές και σύνθετες διαδρομές: μετατρέψτε πρώτα κείμενο, εικόνες και άλλα αντικείμενα σε διαδρομές
@msg Live Paint: select paths or compound paths Δυναμική βαφή: επιλέξτε διαδρομές ή σύνθετες διαδρομές
@msg Live Paint: these paths are too degenerate to paint Δυναμική βαφή: αυτές οι διαδρομές είναι πολύ εκφυλισμένες για να χρωματιστούν
@msg Make Guides: select paths Δημιουργία οδηγών: επιλέξτε διαδρομές
Can't render this file because it contains an unexpected character in line 2069 and column 19.
+1
View File
@@ -3838,6 +3838,7 @@ axis Both Ambos
@msg Installed plug-in {_1} Se instaló el plugin {_1}
@msg Internal error: {msg} (please report this bug) Error interno: {msg} (por favor, informa de este error)
@msg Live Paint Merge: select a Live Paint group and the paths to add Combinar pintura interactiva: selecciona un grupo de pintura interactiva y los trazados que quieres agregar
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first La pintura interactiva admite trazados y trazados compuestos: convierte primero el texto, las imágenes y otros objetos en trazados
@msg Live Paint: select paths or compound paths Pintura interactiva: selecciona trazados o trazados compuestos
@msg Live Paint: these paths are too degenerate to paint Pintura interactiva: estos trazados están demasiado degenerados para pintarlos
@msg Make Guides: select paths Crear guías: selecciona trazados
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4060,6 +4060,7 @@ imageTrace Outline Ääriviiva
@msg Installed plug-in {_1} Asennettiin laajennus {_1}
@msg Internal error: {msg} (please report this bug) Sisäinen virhe: {msg} (ilmoita tästä virheestä)
@msg Live Paint Merge: select a Live Paint group and the paths to add Elävän maalauksen yhdistäminen: valitse elävän maalauksen ryhmä ja lisättävät polut
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Elävä maalaus ottaa polkuja ja yhdistelmäpolkuja: muunna teksti, kuvat ja muut objektit ensin poluiksi
@msg Live Paint: select paths or compound paths Elävä maalaus: valitse polkuja tai yhdistelmäpolkuja
@msg Live Paint: these paths are too degenerate to paint Elävä maalaus: nämä polut ovat liian surkastuneita maalattaviksi
@msg Make Guides: select paths Luo apuviivat: valitse polkuja
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3835,6 +3835,7 @@ axis Both Les deux
@msg Installed plug-in {_1} Module externe {_1} installé
@msg Internal error: {msg} (please report this bug) Erreur interne : {msg} (merci de signaler ce bogue)
@msg Live Paint Merge: select a Live Paint group and the paths to add Fusion de peinture dynamique : sélectionnez un groupe de peinture dynamique et les tracés à ajouter
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first La peinture dynamique accepte les tracés et les tracés transparents : convertissez d'abord le texte, les images et les autres objets en tracés
@msg Live Paint: select paths or compound paths Peinture dynamique : sélectionnez des tracés ou des tracés transparents
@msg Live Paint: these paths are too degenerate to paint Peinture dynamique : ces tracés sont trop dégénérés pour être peints
@msg Make Guides: select paths Créer des repères : sélectionnez des tracés
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4705,6 +4705,7 @@ imageTrace Outline Körvonal
@msg larger than 256 MB nagyobb 256 MB-nál
@msg layers can't be wrap objects réteg nem lehet körbefuttató objektum
@msg Live Paint Merge: select a Live Paint group and the paths to add Élő festés egyesítése: jelölj ki egy élőfestés-csoportot és a hozzáadandó útvonalakat
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Az élő festés útvonalakat és összetett útvonalakat fogad: előbb alakítsd útvonallá a szöveget, a képeket és a többi objektumot
@msg Live Paint: select paths or compound paths Élő festés: jelölj ki útvonalakat vagy összetett útvonalakat
@msg Live Paint: these paths are too degenerate to paint Élő festés: ezek az útvonalak túlságosan elfajultak a festéshez
@msg Loading VectorCraft… A VectorCraft betöltése…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3875,6 +3875,7 @@ imageTrace Outline Kontur
@msg Installed plug-in {_1} Berhasil memasang plug-in {_1}
@msg Internal error: {msg} (please report this bug) Kesalahan internal: {msg} (harap laporkan bug ini)
@msg Live Paint Merge: select a Live Paint group and the paths to add Gabungkan Live Paint: pilih grup Live Paint dan jalur yang akan ditambahkan
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Live Paint menerima jalur dan jalur majemuk: konversikan dulu teks, gambar, dan objek lain menjadi jalur
@msg Live Paint: select paths or compound paths Live Paint: pilih jalur atau jalur majemuk
@msg Live Paint: these paths are too degenerate to paint Live Paint: jalur ini terlalu terdegenerasi untuk dicat
@msg Make Guides: select paths Buat panduan: pilih jalur
Can't render this file because it contains an unexpected character in line 3840 and column 19.
+1
View File
@@ -3878,6 +3878,7 @@ axis Both Entrambi
@msg Installed plug-in {_1} Plug-in installato: {_1}
@msg Internal error: {msg} (please report this bug) Errore interno: {msg} (segnala questo bug)
@msg Live Paint Merge: select a Live Paint group and the paths to add Fondi pittura dinamica: seleziona un gruppo di pittura dinamica e i tracciati da aggiungere
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first La pittura dinamica accetta tracciati e tracciati composti: converti prima in tracciati testo, immagini e altri oggetti
@msg Live Paint: select paths or compound paths Pittura dinamica: seleziona tracciati o tracciati composti
@msg Live Paint: these paths are too degenerate to paint Pittura dinamica: questi tracciati sono troppo degeneri per essere dipinti
@msg Make Guides: select paths Crea guide: seleziona tracciati
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3929,6 +3929,7 @@ swatch Bright Violet ビビッドバイオレット
@msg the art has no bounds アートに境界がありません
@msg Image Trace: the traced image is missing 画像トレース: トレース元の画像が見つかりません
@msg Live Paint Merge: select a Live Paint group and the paths to add ライブペイントの結合: ライブペイントグループと、追加するパスを選択してください
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first ライブペイントで扱えるのはパスと複合パスです: テキスト、画像、その他のオブジェクトは先にパスに変換してください
@msg Live Paint: select paths or compound paths ライブペイント: パスまたは複合パスを選択してください
@msg Live Paint: these paths are too degenerate to paint ライブペイント: これらのパスは形状がつぶれすぎていてペイントできません
@msg Shape Builder: no region under the pointer シェイプ形成ツール: ポインターの下に領域がありません
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3637,6 +3637,7 @@ font-technology Variable ცვლადი
@msg Installed plug-in {_1} დაინსტალირდა პლაგინი {_1}
@msg Internal error: {msg} (please report this bug) შიდა შეცდომა: {msg} (გთხოვთ, შეგვატყობინოთ ამ ხარვეზის შესახებ)
@msg Live Paint Merge: select a Live Paint group and the paths to add ცოცხალი შეღებვის შერწყმა: მონიშნეთ ცოცხალი შეღებვის ჯგუფი და დასამატებელი ტრაექტორიები
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first ცოცხალი შეღებვა იღებს ტრაექტორიებს და შედგენილ ტრაექტორიებს: ჯერ გადააქციეთ ტექსტი, გამოსახულებები და სხვა ობიექტები ტრაექტორიებად
@msg Live Paint: select paths or compound paths ცოცხალი შეღებვა: მონიშნეთ ტრაექტორიები ან შედგენილი ტრაექტორიები
@msg Live Paint: these paths are too degenerate to paint ცოცხალი შეღებვა: ეს ტრაექტორიები ზედმეტად გადაგვარებულია შესაღებად
@msg Make Guides: select paths დამხმარე ხაზების შექმნა: მონიშნეთ ტრაექტორიები
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3861,6 +3861,7 @@ theme Appearance 외관
@msg the art has no bounds 아트웍에 경계가 없습니다
@msg Image Trace: the traced image is missing 이미지 추적: 추적한 이미지가 없습니다
@msg Live Paint Merge: select a Live Paint group and the paths to add 라이브 페인트 병합: 라이브 페인트 그룹과 추가할 패스를 선택하세요
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first 라이브 페인트는 패스와 컴파운드 패스만 사용할 수 있습니다: 텍스트, 이미지 및 기타 개체를 먼저 패스로 변환하세요
@msg Live Paint: select paths or compound paths 라이브 페인트: 패스 또는 컴파운드 패스를 선택하세요
@msg Live Paint: these paths are too degenerate to paint 라이브 페인트: 이 패스는 퇴화되어 칠할 수 없습니다
@msg Shape Builder: no region under the pointer 모양 빌더: 포인터 아래에 영역이 없습니다
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3889,6 +3889,7 @@ imageTrace Outline Contour
@msg Installed plug-in {_1} Plug-in {_1} geïnstalleerd
@msg Internal error: {msg} (please report this bug) Interne fout: {msg} (meld deze bug alsjeblieft)
@msg Live Paint Merge: select a Live Paint group and the paths to add Live Paint samenvoegen: selecteer een Live Paint-groep en de paden om toe te voegen
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Live Paint neemt paden en samengestelde paden: zet tekst, afbeeldingen en andere objecten eerst om in paden
@msg Live Paint: select paths or compound paths Live Paint: selecteer paden of samengestelde paden
@msg Live Paint: these paths are too degenerate to paint Live Paint: deze paden zijn te gedegenereerd om te verven
@msg Make Guides: select paths Hulplijnen maken: selecteer paden
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3964,6 +3964,7 @@ imageTrace Outline Kontur
@msg Installed plug-in {_1} Zainstalowano wtyczkę {_1}
@msg Internal error: {msg} (please report this bug) Błąd wewnętrzny: {msg} (zgłoś ten błąd)
@msg Live Paint Merge: select a Live Paint group and the paths to add Scal aktywne malowanie: zaznacz grupę aktywnego malowania i ścieżki do dodania
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Aktywne malowanie przyjmuje ścieżki i ścieżki złożone: najpierw przekształć tekst, obrazy i inne obiekty w ścieżki
@msg Live Paint: select paths or compound paths Aktywne malowanie: zaznacz ścieżki lub ścieżki złożone
@msg Live Paint: these paths are too degenerate to paint Aktywne malowanie: te ścieżki są zbyt zdegenerowane, aby je malować
@msg Make Guides: select paths Utwórz linie pomocnicze: zaznacz ścieżki
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3421,6 +3421,7 @@ axis Both Ambos
@msg Installed plug-in {_1} Plug-in {_1} instalado
@msg Internal error: {msg} (please report this bug) Erro interno: {msg} (relate este bug)
@msg Live Paint Merge: select a Live Paint group and the paths to add Mesclar Pintura dinâmica: selecione um grupo de Pintura dinâmica e os traçados a adicionar
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first A pintura dinâmica aceita traçados e traçados compostos: converta primeiro texto, imagens e outros objetos em traçados
@msg Live Paint: select paths or compound paths Pintura dinâmica: selecione traçados ou traçados compostos
@msg Live Paint: these paths are too degenerate to paint Pintura dinâmica: estes traçados são degenerados demais para pintar
@msg Make Guides: select paths Criar guias: selecione traçados
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -3874,6 +3874,7 @@ axis Both Оба
@msg Installed plug-in {_1} Установлен модуль {_1}
@msg Internal error: {msg} (please report this bug) Внутренняя ошибка: {msg} (пожалуйста, сообщите об этой ошибке)
@msg Live Paint Merge: select a Live Paint group and the paths to add Объединение быстрой заливки: выделите группу быстрой заливки и контуры для добавления
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Быстрая заливка принимает контуры и составные контуры: сначала преобразуйте текст, изображения и другие объекты в контуры
@msg Live Paint: select paths or compound paths Быстрая заливка: выделите контуры или составные контуры
@msg Live Paint: these paths are too degenerate to paint Быстрая заливка: эти контуры слишком вырождены для заливки
@msg Make Guides: select paths Создание направляющих: выделите контуры
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3758,6 +3758,7 @@ axis Both Båda
@msg Installed plug-in {_1} Installerade insticksmodulen {_1}
@msg Internal error: {msg} (please report this bug) Internt fel: {msg} (rapportera gärna felet)
@msg Live Paint Merge: select a Live Paint group and the paths to add Sammanfoga Live Paint: markera en Live Paint-grupp och de banor som ska läggas till
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Live Paint tar banor och sammansatta banor: konvertera först text, bilder och andra objekt till banor
@msg Live Paint: select paths or compound paths Live Paint: markera banor eller sammansatta banor
@msg Live Paint: these paths are too degenerate to paint Live Paint: de här banorna är för degenererade för att målas
@msg Make Guides: select paths Skapa stödlinjer: markera banor
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1
View File
@@ -3647,6 +3647,7 @@ axis Both Her İkisi
@msg Installed plug-in {_1} Yüklü eklenti {_1}
@msg Internal error: {msg} (please report this bug) Dahili hata: {msg} (lütfen bu hatayı bildirin)
@msg Live Paint Merge: select a Live Paint group and the paths to add Canlı Boyama Birleştirme: Canlı Boyama grubunu ve eklenecek yolları seçin
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Canlı Boyama yolları ve bileşik yolları kabul eder: önce metni, görüntüleri ve diğer nesneleri yollara dönüştürün
@msg Live Paint: select paths or compound paths Canlı Boyama: yolları veya bileşik yolları seçin
@msg Live Paint: these paths are too degenerate to paint Canlı Boyama: Bu yollar boyanamayacak kadar yozlaşmış
@msg Make Guides: select paths Kılavuzlar Oluşturun: yolları seçin
Can't render this file because it contains an unexpected character in line 5 and column 25.
+1
View File
@@ -3862,6 +3862,7 @@ axis Both Обидві
@msg Installed plug-in {_1} Встановлено модуль {_1}
@msg Internal error: {msg} (please report this bug) Внутрішня помилка: {msg} (будь ласка, повідомте про цю помилку)
@msg Live Paint Merge: select a Live Paint group and the paths to add Об’єднання швидкої заливки: виділіть групу швидкої заливки та контури для додавання
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Швидка заливка приймає контури та складені контури: спершу перетворіть текст, зображення й інші об'єкти на контури
@msg Live Paint: select paths or compound paths Швидка заливка: виділіть контури або складені контури
@msg Live Paint: these paths are too degenerate to paint Швидка заливка: ці контури занадто вироджені для заливки
@msg Make Guides: select paths Створення напрямних: виділіть контури
Can't render this file because it contains an unexpected character in line 749 and column 40.
+1
View File
@@ -4351,6 +4351,7 @@ theme Appearance Giao diện
@msg layers can't be wrap objects lớp không thể là đối tượng bọc
@msg linked pictures show the low-resolution preview saved in the file until their files are found: relink them in the Links panel ảnh liên kết hiển thị bản xem trước độ phân giải thấp đã lưu trong tệp cho đến khi tìm thấy tệp gốc: liên kết lại trong bảng Liên kết
@msg Live Paint Merge: select a Live Paint group and the paths to add Hợp nhất tô trực tiếp: chọn nhóm tô trực tiếp và các đường dẫn để thêm
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first Tô trực tiếp nhận đường dẫn và đường dẫn phức: hãy chuyển văn bản, hình ảnh và các đối tượng khác thành đường dẫn trước
@msg Live Paint: select paths or compound paths Tô trực tiếp: chọn đường dẫn hoặc đường dẫn phức
@msg Live Paint: these paths are too degenerate to paint Tô trực tiếp: các đường dẫn này quá suy biến để tô
@msg Loading VectorCraft… Đang tải VectorCraft…
Can't render this file because it contains an unexpected character in line 4054 and column 10.
+1
View File
@@ -3672,6 +3672,7 @@ imageTrace Outline 轮廓
@msg the art has no bounds 图稿没有边界
@msg Image Trace: the traced image is missing 图像描摹:缺少所描摹的图像
@msg Live Paint Merge: select a Live Paint group and the paths to add 实时上色合并:请选择一个实时上色组以及要添加的路径
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first 实时上色只接受路径和复合路径:请先将文字、图像和其他对象转换为路径
@msg Live Paint: select paths or compound paths 实时上色:请选择路径或复合路径
@msg Live Paint: these paths are too degenerate to paint 实时上色:这些路径过于退化,无法上色
@msg Shape Builder: no region under the pointer 形状生成器:指针下方没有区域
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -1654,6 +1654,7 @@ file-filter Templates 範本
@msg the art has no bounds 圖稿沒有邊界
@msg Image Trace: the traced image is missing 影像描圖:找不到描圖的影像
@msg Live Paint Merge: select a Live Paint group and the paths to add 即時上色合併:請選取即時上色群組和要加入的路徑
@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first 即時上色只接受路徑和複合路徑:請先將文字、影像和其他物件轉換為路徑
@msg Live Paint: select paths or compound paths 即時上色:請選取路徑或複合路徑
@msg Live Paint: these paths are too degenerate to paint 即時上色:這些路徑過度退化,無法上色
@msg Shape Builder: no region under the pointer 形狀建立:指標下方沒有區域
Can't render this file because it contains an unexpected character in line 6 and column 47.
+18 -8
View File
@@ -116,7 +116,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
// Paint group selected with more to merge into it, as the Properties panel overview lists them
// (<https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/properties-panel-overview.html>).
let blend_options = n_sel == 1 && app.session.tool_id() == "blend" && matches!(first.as_ref().map(|n| &n.kind), Some(NodeKind::Blend { .. }));
let merge_live_paint = n_sel > 1 && selects_live_paint(app);
let merge_live_paint = n_sel > 1 && can_merge_live_paint(app);
let mut actions: Vec<(&str, &str)> = vec![];
if n_sel > 1 {
actions.push((tl!("Group"), "object.group"));
@@ -160,11 +160,14 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
global_edit_row(app, ui);
}
/// Whether a Live Paint group is among the selected objects.
fn selects_live_paint(app: &VectorcraftApp) -> bool {
app.session
.active()
.is_some_and(|st| st.selection.objects.iter().filter_map(|id| st.doc.node(*id)).any(vectorcraft_tools::builder::is_live_paint))
/// Whether Merge Live Paint can take the selection: a Live Paint group among the selected objects
/// and nothing Live Paint refuses (type, images and the rest; `livePaint.merge` refuses them too).
fn can_merge_live_paint(app: &VectorcraftApp) -> bool {
use vectorcraft_tools::builder::{is_live_paint, live_paint_takes};
app.session.active().is_some_and(|st| {
let nodes = || st.selection.objects.iter().filter_map(|id| st.doc.node(*id));
nodes().any(is_live_paint) && nodes().all(live_paint_takes)
})
}
/// The Corners of the one path whose corners Direct Selection has selected: their kind and radius,
@@ -2169,7 +2172,8 @@ mod tests {
}
/// A Live Paint group selected with a path has Merge Live Paint in Quick Actions, which adds
/// the path to the group in one undo step. Not for the group alone, nor for plain paths.
/// the path to the group in one undo step. Not for the group alone, nor for plain paths, nor
/// with type selected, which Live Paint refuses.
#[test]
fn merge_live_paint_is_a_quick_action_for_a_live_paint_group_and_more() {
let mut app = new_app();
@@ -2177,8 +2181,14 @@ mod tests {
app.run("select.set", json!({"ids": [a, b]})).unwrap();
let group = app.run("livePaint.make", json!({})).unwrap()["id"].clone();
let (c, d) = (rect(&mut app, 140.0, 30.0, 60.0, 60.0), rect(&mut app, 300.0, 200.0, 40.0, 40.0));
let text = app.run("text.create", json!({"x": 50, "y": 250, "text": "Hi"})).unwrap()["id"].clone();
let ctx = egui::Context::default();
for (ids, why) in [(json!([group]), "the group alone"), (json!([c, d]), "two plain paths")] {
for (ids, why) in [
(json!([group]), "the group alone"),
(json!([c, d]), "two plain paths"),
(json!([group, text]), "the group and type"),
(json!([group, c, text]), "the group, a path and type"),
] {
app.run("select.set", json!({"ids": ids})).unwrap();
assert!(!shows(&tall(&mut app, &ctx, vec![]), "Merge Live Paint"), "{why}");
}
+3 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -1
View File
File diff suppressed because one or more lines are too long