mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 20:31:02 +01:00
Plug-ins: Apply Last Filter and Last Filter… repeat the last filter plug-in
Object › Plug-ins now starts with Apply Last Filter (plugin.applyLastFilter) and Last Filter… (plugin.lastFilter). Once a filter plug-in's plugin.run succeeds (its menu item, its dialog's OK, a shortcut, a request, the last plugin.run step of a command.batch or of an Action Batch that processed a file or data set, or a background run once its result is applied), Apply <name> runs it again on the selection with the same parameters, without its dialog, as one undo step, and <name>… opens its dialog with those parameters. A filter's own dialog opens with the parameters it last ran with in the session. Previews, Cancel, failed runs, a plug-in's own commands and live effects don't count. Both items are grayed out, and return an error through automation, with no document open, before a filter ran, once that filter was removed or installed again, or when its manifest no longer takes the parameters as they are. The parameters are kept for the session only, for at most 64 filters. The help page describes the same pair for filters: https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=357 Where the items sit and when they are grayed out are VectorCraft's own rules. Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
1 parent
db9acab4da
commit
1592cee7a8
46 files changed
+718
-12
No files matched your search
@@ -124,7 +124,7 @@ pub fn describe(p: &Plugin) -> Value {
|
||||
|
||||
/// The plug-in's own parameters from command params: `params` if given, else the top-level keys
|
||||
/// minus the ones the command itself uses.
|
||||
fn plugin_params(p: &Value) -> Value {
|
||||
pub fn plugin_params(p: &Value) -> Value {
|
||||
if let Some(v) = p.get("params") {
|
||||
return v.clone();
|
||||
}
|
||||
|
||||
@@ -1993,7 +1993,19 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"plugin.dialog",
|
||||
"Plug-in…",
|
||||
"",
|
||||
"{id: an object filter plug-in (plugin.list), params?: {…}} Object › Plug-ins: run the filter at once when it takes no parameters or params are given (plugin.run), else open its dialog (dialog `plugin`: a field per parameter, `__plugin` the id, live preview; OK runs plugin.run as one undo step). A heavy filter, and a filter that lists `progress` and no commandAllowlist, run in the background when they run at once or OK runs them without a kept preview → {background: true, status} (see plugin.cancelRuns)",
|
||||
"{id: an object filter plug-in (plugin.list), params?: {…}} Object › Plug-ins: run the filter at once when it takes no parameters or params are given (plugin.run), else open its dialog (dialog `plugin`: a field per parameter at the value the filter last ran with in this session, else its default, `__plugin` the id, live preview; OK runs plugin.run as one undo step). A heavy filter, and a filter that lists `progress` and no commandAllowlist, run in the background when they run at once or OK runs them without a kept preview → {background: true, status} (see plugin.cancelRuns)",
|
||||
),
|
||||
(
|
||||
"plugin.applyLastFilter",
|
||||
"Apply Last Filter",
|
||||
"",
|
||||
"{} Object › Plug-ins › Apply <filter name>: run the object filter that last ran in this session (a plugin.run that succeeded: its menu item, its dialog's OK, a request, a command.batch step or an action.batch step; not a plug-in's own commands) again on the selection with the same parameters, without its dialog, as one undo step; it runs in the background where its menu item would → plugin.run's result | {background: true, status}. An error with no document open, when no filter ran yet, when that filter was removed or installed again (the same module too) since, or when its manifest no longer takes those parameters as they are",
|
||||
),
|
||||
(
|
||||
"plugin.lastFilter",
|
||||
"Last Filter…",
|
||||
"",
|
||||
"{} Object › Plug-ins › <filter name>…: open the dialog of the object filter that last ran in this session (see plugin.applyLastFilter) with the parameters it ran with (dialog `plugin`); OK runs it as one undo step and Cancel changes nothing. A filter without parameters runs at once. The same errors as plugin.applyLastFilter",
|
||||
),
|
||||
(
|
||||
"ui.installPlugin",
|
||||
|
||||
@@ -109,6 +109,7 @@ impl VectorcraftApp {
|
||||
titlebar_inset: 0.0,
|
||||
last_effect: None,
|
||||
last_pathfinder: None,
|
||||
last_filters: Default::default(),
|
||||
last_warp: None,
|
||||
character_focus: None,
|
||||
run_count: 0,
|
||||
|
||||
@@ -247,6 +247,7 @@ impl VectorcraftApp {
|
||||
let ime_before = crate::ime::stamp(&mut self.session, ime_view);
|
||||
let cursor_settings = (self.session.caps_lock, self.session.prefs.use_precise_cursors);
|
||||
let spot_base = panels::color_guide::before_command(self);
|
||||
let plugins_before = dialogs::plugin::before_command();
|
||||
let r = self.session.execute(id, ¶ms).map_err(|e| e.to_string());
|
||||
let r = panels::actions::after_recorded_command(self, r);
|
||||
if r.is_ok() && cursor_settings != (self.session.caps_lock, self.session.prefs.use_precise_cursors) {
|
||||
@@ -262,6 +263,8 @@ impl VectorcraftApp {
|
||||
{
|
||||
self.last_pathfinder = Some(op.to_string());
|
||||
}
|
||||
// A filter plug-in run becomes Object › Plug-ins › Apply Last Filter.
|
||||
dialogs::plugin::after_command(self, id, ¶ms, &r, plugins_before);
|
||||
let copied = r.is_ok() && self.publish_copy(id);
|
||||
self.sync_views();
|
||||
self.refresh_replace_font_warning(false);
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
//! background too, with its progress and Cancel, when it runs at once or when OK runs it without a
|
||||
//! kept preview ([`in_background`]). A filter or live effect with commands of
|
||||
//! its own is a submenu named after it, holding its item and then its commands; a command with
|
||||
//! parameters opens the same dialog for them ([`open_command`]). Exporters are formats of File › Export ›
|
||||
//! parameters opens the same dialog for them ([`open_command`]). Object › Plug-ins starts with
|
||||
//! Apply Last Filter and Last Filter…, which run the filter that last ran again with the same
|
||||
//! parameters or open its dialog with them, and a filter's dialog opens with the parameters it last
|
||||
//! ran with in the session ([`LastFilters`]). Exporters are formats of File › Export ›
|
||||
//! Export As; one with parameters opens dialog `pluginExport` once the file is picked, and its
|
||||
//! Export button writes the file. Importers open the files File › Open finds no built-in format
|
||||
//! for, and File › Open With lists them, to open a file with one of them by name; one with
|
||||
@@ -120,8 +123,173 @@ pub fn effect_menu() -> Option<Item> {
|
||||
(!items.is_empty()).then_some(Item::Sub("Plug-ins", items))
|
||||
}
|
||||
|
||||
/// Object › Plug-ins' first items: Apply Last Filter, which runs the filter that last ran again with
|
||||
/// the same parameters, and Last Filter…, which opens its dialog with them. Each is named after the
|
||||
/// filter once one has run ([`last_filter_name`]).
|
||||
pub fn last_filter_menu() -> Vec<Item> {
|
||||
vec![Item::Cmd("Apply Last Filter", APPLY_LAST, Value::Null), Item::Cmd("Last Filter…", LAST, Value::Null), Item::Sep]
|
||||
}
|
||||
|
||||
/// Apply Last Filter's command id.
|
||||
pub const APPLY_LAST: &str = "plugin.applyLastFilter";
|
||||
|
||||
/// Last Filter…'s command id.
|
||||
pub const LAST: &str = "plugin.lastFilter";
|
||||
|
||||
/// The error of Apply Last Filter and Last Filter… when no filter can run again: none ran in this
|
||||
/// session, or the one that ran last was removed or installed again, or its parameters no longer fit it.
|
||||
pub const NO_LAST_FILTER: &str = "no plug-in filter to repeat: run one from Object › Plug-ins first";
|
||||
|
||||
/// The most filters whose last parameters [`LastFilters`] keeps.
|
||||
const MAX_REMEMBERED: usize = 64;
|
||||
|
||||
/// The parameters filter `id` last ran with, as its manifest resolved them, and the installation
|
||||
/// that ran with them (its [`Plugin::serial`]; installing the plug-in again gives it a new one).
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
struct Used {
|
||||
id: String,
|
||||
serial: u64,
|
||||
params: Map<String, Value>,
|
||||
}
|
||||
|
||||
/// The parameters each object filter last ran with in this session (`plugin.run`), the filter that
|
||||
/// ran last at the end, for at most [`MAX_REMEMBERED`] filters. They are never saved.
|
||||
#[derive(Default)]
|
||||
pub struct LastFilters {
|
||||
used: Vec<Used>,
|
||||
}
|
||||
|
||||
impl LastFilters {
|
||||
/// The id of the filter that ran last, whether or not it can run again.
|
||||
pub fn last_id(&self) -> Option<&str> {
|
||||
self.used.last().map(|u| u.id.as_str())
|
||||
}
|
||||
}
|
||||
|
||||
/// Notes a `plugin.run` with params `p` that succeeded: its filter ran last, with the
|
||||
/// parameters its manifest resolves from `p`. Anything else (not a filter, parameters the manifest
|
||||
/// refuses) is not noted.
|
||||
pub(crate) fn record(app: &mut VectorcraftApp, p: &Value) {
|
||||
let Some(plugin) = p.get("id").and_then(Value::as_str).and_then(registry::get) else { return };
|
||||
let m = plugin.manifest();
|
||||
if m.kind != Kind::Filter {
|
||||
return;
|
||||
}
|
||||
let Ok(params) = m.resolve_params(&vectorcraft_engine::cmd::plugin::plugin_params(p)) else { return };
|
||||
let used = &mut app.last_filters.used;
|
||||
used.retain(|u| u.id != m.id);
|
||||
used.push(Used { id: m.id.clone(), serial: plugin.serial(), params });
|
||||
if used.len() > MAX_REMEMBERED {
|
||||
used.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// The plug-in registry's revision before a command runs, for [`after_command`].
|
||||
pub(crate) fn before_command() -> u64 {
|
||||
registry::revision()
|
||||
}
|
||||
|
||||
/// After command `id` with `params` ran with result `r`, the registry at revision `before` when it
|
||||
/// started: a `plugin.run` that succeeded, or the last `plugin.run` step of a batch that succeeded
|
||||
/// (`command.batch`, or `action.batch` on at least one file or data set), is noted as the filter
|
||||
/// that ran last ([`record`]).
|
||||
pub(crate) fn after_command(app: &mut VectorcraftApp, id: &str, params: &Value, r: &Result<Value, String>, before: u64) {
|
||||
let Ok(reply) = r else { return };
|
||||
// Action Batch returns success even when files or data sets fail, and runs every step on each
|
||||
// one that doesn't.
|
||||
let played = |v: &Value| v.get("count").and_then(Value::as_u64).unwrap_or(0) > v.get("failed").and_then(Value::as_u64).unwrap_or(0);
|
||||
let ran = match id {
|
||||
CMD => Some(params),
|
||||
"command.batch" | "action.batch" if id == "command.batch" || played(reply) => {
|
||||
let steps = params.get("commands").and_then(Value::as_array).map(Vec::as_slice).unwrap_or_default();
|
||||
let Some(at) = steps.iter().rposition(|s| step_id(s) == Some(CMD)) else { return };
|
||||
let p = steps[at].get("params").unwrap_or(&Value::Null);
|
||||
// The plug-in installed under the id now is the one that ran when no later step changed
|
||||
// the plug-ins, or when it was installed before the batch (installing gives a new serial).
|
||||
let changed_later = steps[at + 1..].iter().any(|s| step_id(s).is_some_and(|c| REGISTRY_CHANGES.contains(&c)));
|
||||
let installed_before = p.get("id").and_then(Value::as_str).and_then(registry::get).is_some_and(|q| q.serial() <= before);
|
||||
if changed_later && !installed_before {
|
||||
forget(app, p);
|
||||
return;
|
||||
}
|
||||
Some(p)
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
if let Some(p) = ran.cloned() {
|
||||
record(app, &p);
|
||||
}
|
||||
}
|
||||
|
||||
/// The command id of batch step `s`.
|
||||
fn step_id(s: &Value) -> Option<&str> {
|
||||
s.get("command").and_then(Value::as_str)
|
||||
}
|
||||
|
||||
/// The commands that install, remove or reload plug-ins.
|
||||
const REGISTRY_CHANGES: [&str; 3] = ["plugin.install", "plugin.remove", "plugin.reload"];
|
||||
|
||||
/// Notes the filter `plugin.run` params `p` name as the one that ran last, without parameters or a
|
||||
/// module, so that Apply Last Filter and Last Filter… stay off until a filter runs again.
|
||||
fn forget(app: &mut VectorcraftApp, p: &Value) {
|
||||
let Some(id) = p.get("id").and_then(Value::as_str) else { return };
|
||||
let used = &mut app.last_filters.used;
|
||||
used.retain(|u| u.id != id);
|
||||
// Serial 0 belongs to no installed plug-in.
|
||||
used.push(Used { id: id.to_string(), serial: 0, params: Map::new() });
|
||||
if used.len() > MAX_REMEMBERED {
|
||||
used.remove(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// Filter `id`'s last parameters, while the installation that ran with them is still installed under
|
||||
/// its id and its manifest takes them as they are.
|
||||
fn remembered(app: &VectorcraftApp, id: &str) -> Option<(Arc<Plugin>, Map<String, Value>)> {
|
||||
let used = app.last_filters.used.iter().find(|u| u.id == id)?;
|
||||
let plugin = registry::get(id).filter(|p| p.manifest().kind == Kind::Filter && p.serial() == used.serial)?;
|
||||
let params = Value::Object(used.params.clone());
|
||||
plugin.manifest().resolve_params(¶ms).ok().filter(|r| *r == used.params)?;
|
||||
Some((plugin, used.params.clone()))
|
||||
}
|
||||
|
||||
/// The filter that ran last and its parameters, while it can run again with them ([`remembered`]).
|
||||
pub(crate) fn last_filter(app: &VectorcraftApp) -> Option<(Arc<Plugin>, Map<String, Value>)> {
|
||||
remembered(app, app.last_filters.last_id()?)
|
||||
}
|
||||
|
||||
/// The name Apply Last Filter and Last Filter… show once a filter ran that can run again
|
||||
/// ([`last_filter`]): the filter's own name, without an ellipsis at its end and with hidden
|
||||
/// characters shown as escapes, as a submenu named after a plug-in shows it. `None` before.
|
||||
pub(crate) fn last_filter_name(app: &VectorcraftApp) -> Option<String> {
|
||||
let (plugin, _) = last_filter(app)?;
|
||||
let name = plugin.manifest().name.trim().trim_end_matches('…').trim_end().to_string();
|
||||
Some(permissions::display_text(&name, permissions::MAX_SHOWN_NAME))
|
||||
}
|
||||
|
||||
/// `plugin.applyLastFilter`: runs the filter that ran last again, with the same parameters, on the
|
||||
/// selection, without its dialog, as its menu item runs it ([`run`]).
|
||||
pub fn apply_last(app: &mut VectorcraftApp) -> Result<Value, String> {
|
||||
app.session.active().ok_or("no document open")?;
|
||||
let (plugin, params) = last_filter(app).ok_or(NO_LAST_FILTER)?;
|
||||
let p = json!({"id": plugin.id(), "params": params});
|
||||
run(app, &plugin, p)
|
||||
}
|
||||
|
||||
/// `plugin.lastFilter`: opens the dialog of the filter that ran last with the parameters it ran
|
||||
/// with; one without parameters runs at once, as its menu item runs it.
|
||||
pub fn open_last(app: &mut VectorcraftApp) -> Result<Value, String> {
|
||||
app.session.active().ok_or("no document open")?;
|
||||
let (plugin, params) = last_filter(app).ok_or(NO_LAST_FILTER)?;
|
||||
if plugin.manifest().params.is_empty() {
|
||||
return run(app, &plugin, json!({"id": plugin.id(), "params": params}));
|
||||
}
|
||||
open_dialog(app, plugin.manifest(), params);
|
||||
Ok(Value::Null)
|
||||
}
|
||||
|
||||
/// `plugin.dialog {id, params?}`: run filter `id` at once when it takes no parameters or `params`
|
||||
/// are given, else open its dialog prefilled with its defaults.
|
||||
/// are given, else open its dialog prefilled with the parameters it last ran with in this session
|
||||
/// ([`remembered`]), or with its defaults.
|
||||
pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
let id = p.get("id").and_then(Value::as_str).ok_or("missing `id` (see plugin.list)")?;
|
||||
let plugin = registry::get(id).ok_or_else(|| format!("no plug-in {id:?} is installed"))?;
|
||||
@@ -136,12 +304,19 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
if m.params.is_empty() || given.is_some() {
|
||||
return run(app, &plugin, json!({"id": id, "params": given.cloned().unwrap_or(Value::Null)}));
|
||||
}
|
||||
let values = remembered(app, id).map(|(_, params)| params).unwrap_or_else(|| m.defaults());
|
||||
open_dialog(app, m, values);
|
||||
Ok(Value::Null)
|
||||
}
|
||||
|
||||
/// Opens filter `m`'s dialog with its parameters at `values`, with Preview on for a light filter.
|
||||
fn open_dialog(app: &mut VectorcraftApp, m: &Manifest, values: Map<String, Value>) {
|
||||
let mut fields = fields_for(m);
|
||||
fields.extend(values);
|
||||
if m.budget == Budget::Light {
|
||||
fields.insert("preview".into(), json!(true));
|
||||
}
|
||||
app.ui.dialog = Some(Dialog { kind: KIND.into(), fields });
|
||||
Ok(Value::Null)
|
||||
}
|
||||
|
||||
/// The fields of plug-in `m`'s dialog: its parameters at their defaults, `__plugin` (its id) and
|
||||
@@ -266,7 +441,15 @@ fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result<Value, String> {
|
||||
}
|
||||
r
|
||||
}
|
||||
_ => form::commit_preview(app, &command(d), params(d)),
|
||||
_ => {
|
||||
let r = form::commit_preview(app, &command(d), params(d));
|
||||
// A kept preview commits without running `plugin.run` again ([`after_command`]); for
|
||||
// the filter's own run, `params(d)` is `plugin.run`'s `{id, params}`.
|
||||
if r.is_ok() && own_run {
|
||||
record(app, ¶ms(d));
|
||||
}
|
||||
r
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1998,6 +1998,9 @@ font-technology Variable Променливи
|
||||
Last Effect: {name} Посл. ефект: {name}
|
||||
Last Effect: {} Посл. ефект: {}
|
||||
Last Effect… Посл. ефект…
|
||||
Apply Last Filter Прилагане на последния филтър
|
||||
Last Filter… Посл. филтър…
|
||||
Apply {filter} Прилагане на {filter}
|
||||
Last Page Последна страница
|
||||
Latin Латиница
|
||||
Thai Тайландски
|
||||
@@ -5008,6 +5011,7 @@ axis Both И двете
|
||||
@msg no document няма документ
|
||||
@msg no document open няма отворен документ
|
||||
@msg no effect applied yet все още няма приложен ефект
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first няма филтър от приставка за повторение: първо стартирайте такъв от Обект › Приставки
|
||||
@msg no Pathfinder operation applied yet все още няма приложена операция на Pathfinder
|
||||
@msg no effect at index {k} няма ефект на индекс {k}
|
||||
@msg no end record няма краен запис
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -539,6 +539,9 @@
|
||||
Effect Efekat
|
||||
Apply Last Effect Primijeni posljednji efekat
|
||||
Last Effect… Posljednji efekat…
|
||||
Apply Last Filter Primijeni posljednji filter
|
||||
Last Filter… Posljednji filter…
|
||||
Apply {filter} Primijeni {filter}
|
||||
Document Raster Effects Settings… Postavke rasterskih efekata dokumenta…
|
||||
Vector Effects Vektorski efekti
|
||||
3D and Materials 3D i materijali
|
||||
@@ -5439,6 +5442,7 @@ imageTrace Outline Obris
|
||||
@msg no document nema dokumenta
|
||||
@msg no document open nijedan dokument nije otvoren
|
||||
@msg no effect applied yet još nije primijenjen nijedan efekat
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first nema filtera dodatka za ponavljanje: prvo pokrenite jedan iz Objekat › Dodaci
|
||||
@msg no effect at index {k} nema efekta na indeksu {k}
|
||||
@msg no end record nema završnog zapisa
|
||||
@msg no file manager here ovdje nema upravitelja datoteka
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -2554,6 +2554,9 @@ digits Malayalam Malaiàlam
|
||||
Last Effect: {name} Últim efecte: {name}
|
||||
Last Effect: {} Últim efecte: {}
|
||||
Last Effect… Últim efecte…
|
||||
Apply Last Filter Aplica l’últim filtre
|
||||
Last Filter… Últim filtre…
|
||||
Apply {filter} Aplica {filter}
|
||||
Last Page Última pàgina
|
||||
Latin Llatí
|
||||
Latin Extended Llatí estès
|
||||
@@ -6879,6 +6882,7 @@ liquify-list-end {0}, {1} {0} i {1}
|
||||
@msg no document no hi ha document
|
||||
@msg no document open no hi ha cap document obert
|
||||
@msg no effect applied yet encara no s’ha aplicat cap efecte
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first no hi ha cap filtre de complement per repetir: executeu-ne primer un des d’Objecte › Complements
|
||||
@msg no Pathfinder operation applied yet encara no s’ha aplicat cap operació del Cercador de traçats
|
||||
@msg no effect at index {k} no hi ha cap efecte a l’índex {k}
|
||||
@msg no empty artboards to delete no hi ha taulers buits per suprimir
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -553,6 +553,9 @@
|
||||
Effect Efekt
|
||||
Apply Last Effect Použít poslední efekt
|
||||
Last Effect… Poslední efekt…
|
||||
Apply Last Filter Použít poslední filtr
|
||||
Last Filter… Poslední filtr…
|
||||
Apply {filter} Použít {filter}
|
||||
Document Raster Effects Settings… Nastavení rastrových efektů dokumentu…
|
||||
Vector Effects Vektorové efekty
|
||||
3D and Materials 3D a materiály
|
||||
@@ -5764,6 +5767,7 @@ liquify-list-end {0}, {1} {0} a {1}
|
||||
@msg no document žádný dokument
|
||||
@msg no document open není otevřen žádný dokument
|
||||
@msg no effect applied yet zatím nebyl použit žádný efekt
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first žádný filtr zásuvného modulu k zopakování: nejprve jeden spusťte z nabídky Objekt › Zásuvné moduly
|
||||
@msg no Pathfinder operation applied yet zatím nebyla použita žádná operace s cestami
|
||||
@msg no effect at index {k} na indexu {k} není žádný efekt
|
||||
@msg no end record chybí koncový záznam
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3267,6 +3267,9 @@ liquify-list-end {0}, {1} {0} og {1}
|
||||
Effect Effekt
|
||||
Apply Last Effect Anvend sidste effekt
|
||||
Last Effect… Sidste effekt…
|
||||
Apply Last Filter Anvend sidste filter
|
||||
Last Filter… Sidste filter…
|
||||
Apply {filter} Anvend {filter}
|
||||
Document Raster Effects Settings… Indstillinger for rastereffekter i dokumentet…
|
||||
Vector Effects Vektoreffekter
|
||||
3D and Materials 3D og materialer
|
||||
@@ -7962,6 +7965,7 @@ imageTrace Outline Kontur
|
||||
@msg no document intet dokument
|
||||
@msg no document open intet åbent dokument
|
||||
@msg no effect applied yet ingen effekt er anvendt endnu
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first intet plug-in-filter at gentage: kør først et fra Objekt › Plug-ins
|
||||
@msg no Pathfinder operation applied yet ingen Pathfinder-handling er anvendt endnu
|
||||
@msg no effect at index {k} ingen effekt ved indeks {k}
|
||||
@msg no end record ingen slutpost
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2079,6 +2079,9 @@ file-filter Templates Vorlagen
|
||||
Last Effect: {name} Letzter Effekt: {name}
|
||||
Last Effect: {} Letzter Effekt: {}
|
||||
Last Effect… Letzter Effekt…
|
||||
Apply Last Filter Letzten Filter anwenden
|
||||
Last Filter… Letzter Filter…
|
||||
Apply {filter} {filter} anwenden
|
||||
Last Page Letzte Seite
|
||||
Latin Lateinisch
|
||||
Thai Thai
|
||||
@@ -5342,6 +5345,7 @@ liquify-list-end {0}, {1} {0} und {1}
|
||||
@msg no document kein Dokument
|
||||
@msg no document open kein Dokument geöffnet
|
||||
@msg no effect applied yet noch kein Effekt angewendet
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first kein Plug-in-Filter zum Wiederholen: Führen Sie zuerst einen über Objekt › Plug-ins aus
|
||||
@msg no Pathfinder operation applied yet noch keine Pathfinder-Operation angewendet
|
||||
@msg no effect at index {k} kein Effekt bei Index {k}
|
||||
@msg no end record kein Endeintrag
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1973,6 +1973,9 @@ font-technology Variable Μεταβλητές
|
||||
Last Effect: {name} Τελευταίο εφέ: {name}
|
||||
Last Effect: {} Τελευταίο εφέ: {}
|
||||
Last Effect… Τελευταίο εφέ…
|
||||
Apply Last Filter Εφαρμογή τελευταίου φίλτρου
|
||||
Last Filter… Τελευταίο φίλτρο…
|
||||
Apply {filter} Εφαρμογή {filter}
|
||||
Last Page Τελευταία σελίδα
|
||||
Latin Extended Εκτεταμένα λατινικά
|
||||
Latin-1 Supplement Συμπλήρωμα Latin-1
|
||||
@@ -5399,6 +5402,7 @@ digits Malayalam Μαλαγιάλαμ
|
||||
@msg no document δεν υπάρχει έγγραφο
|
||||
@msg no document open δεν υπάρχει ανοιχτό έγγραφο
|
||||
@msg no effect applied yet δεν έχει εφαρμοστεί ακόμη εφέ
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first δεν υπάρχει φίλτρο πρόσθετου για επανάληψη: εκτελέστε πρώτα ένα από το Αντικείμενο › Πρόσθετα
|
||||
@msg no Pathfinder operation applied yet δεν έχει εφαρμοστεί ακόμη λειτουργία Pathfinder
|
||||
@msg no effect at index {k} δεν υπάρχει εφέ στον δείκτη {k}
|
||||
@msg no end record λείπει η εγγραφή τέλους
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2077,6 +2077,9 @@ font-technology Variable Variables
|
||||
Last Effect: {name} Último efecto: {name}
|
||||
Last Effect: {} Último efecto: {}
|
||||
Last Effect… Último efecto…
|
||||
Apply Last Filter Aplicar último filtro
|
||||
Last Filter… Último filtro…
|
||||
Apply {filter} Aplicar {filter}
|
||||
Last Page Última página
|
||||
Latin Latín
|
||||
Thai Tailandés
|
||||
@@ -5452,6 +5455,7 @@ liquify-list-end {0}, {1} {0}, {1}
|
||||
@msg no document no hay documento
|
||||
@msg no document open no hay ningún documento abierto
|
||||
@msg no effect applied yet todavía no se aplicó ningún efecto
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first no hay ningún filtro de plugin que repetir: ejecute primero uno desde Objeto › Plugins
|
||||
@msg no Pathfinder operation applied yet todavía no se aplicó ninguna operación de Buscatrazos
|
||||
@msg no effect at index {k} no hay ningún efecto en el índice {k}
|
||||
@msg no end record no hay registro final
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -550,6 +550,9 @@
|
||||
Effect Tehoste
|
||||
Apply Last Effect Käytä viimeisintä tehostetta
|
||||
Last Effect… Viimeisin tehoste…
|
||||
Apply Last Filter Käytä viimeisintä suodinta
|
||||
Last Filter… Viimeisin suodin…
|
||||
Apply {filter} Käytä: {filter}
|
||||
Document Raster Effects Settings… Asiakirjan rasteritehosteiden asetukset…
|
||||
Vector Effects Vektoritehosteet
|
||||
3D and Materials 3D ja materiaalit
|
||||
@@ -5683,6 +5686,7 @@ liquify-list-end {0}, {1} {0} ja {1}
|
||||
@msg no document ei asiakirjaa
|
||||
@msg no document open asiakirjaa ei ole auki
|
||||
@msg no effect applied yet tehostetta ei ole vielä käytetty
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first ei toistettavaa laajennussuodinta: suorita ensin yksi kohdasta Objekti › Laajennukset
|
||||
@msg no Pathfinder operation applied yet polunetsimen toimintoa ei ole vielä käytetty
|
||||
@msg no effect at index {k} ei tehostetta indeksissä {k}
|
||||
@msg no end record ei loppumerkintää
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2067,6 +2067,9 @@ font-technology Variable Variables
|
||||
Last Effect: {name} Dernier effet : {name}
|
||||
Last Effect: {} Dernier effet : {}
|
||||
Last Effect… Dernier effet…
|
||||
Apply Last Filter Appliquer le dernier filtre
|
||||
Last Filter… Dernier filtre…
|
||||
Apply {filter} Appliquer {filter}
|
||||
Last Page Dernière page
|
||||
Latin Latin
|
||||
Thai Thaï
|
||||
@@ -5411,6 +5414,7 @@ liquify-list-end {0}, {1} {0} et {1}
|
||||
@msg no document aucun document
|
||||
@msg no document open aucun document ouvert
|
||||
@msg no effect applied yet aucun effet appliqué pour l’instant
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first aucun filtre de module externe à répéter. Exécutez-en d’abord un depuis Objet › Modules externes
|
||||
@msg no Pathfinder operation applied yet aucune opération Pathfinder appliquée pour l’instant
|
||||
@msg no effect at index {k} aucun effet à l’indice {k}
|
||||
@msg no end record aucun enregistrement de fin
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2072,6 +2072,9 @@
|
||||
Redos ફરીથી કરો
|
||||
Last Effect: {name} છેલ્લી ઇફેક્ટ: {name}
|
||||
Last Effect… છેલ્લી ઇફેક્ટ…
|
||||
Apply Last Filter છેલ્લું ફિલ્ટર લાગુ કરો
|
||||
Last Filter… છેલ્લું ફિલ્ટર…
|
||||
Apply {filter} {filter} લાગુ કરો
|
||||
Last Page છેલ્લું પેજ
|
||||
Last commit છેલ્લો કમિટ
|
||||
Latin લેટિન
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -3053,6 +3053,9 @@ arrowhead Feather पंख
|
||||
Last Effect: {} अंतिम इफ़ेक्ट: {}
|
||||
Last Effect: {name} अंतिम इफ़ेक्ट: {name}
|
||||
Last Effect… अंतिम इफ़ेक्ट…
|
||||
Apply Last Filter पिछला फ़िल्टर लागू करें
|
||||
Last Filter… अंतिम फ़िल्टर…
|
||||
Apply {filter} {filter} लागू करें
|
||||
Last Page अंतिम पृष्ठ
|
||||
Latin लैटिन
|
||||
Latin Extended लैटिन विस्तारित
|
||||
@@ -8403,6 +8406,7 @@ liquify-list-end {0}, {1} {0} और {1}
|
||||
@msg no document कोई डॉक्यूमेंट नहीं
|
||||
@msg no document open कोई डॉक्यूमेंट खुला नहीं है
|
||||
@msg no effect applied yet अभी तक लागू नहीं
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first दोहराने के लिए कोई प्लग-इन फ़िल्टर नहीं: पहले ऑब्जेक्ट › प्लग-इन्स से एक चलाएँ
|
||||
@msg no effect at index {k} इंडेक्स {k} पर कोई इफ़ेक्ट नहीं
|
||||
@msg no empty artboards to delete हटाने के लिए कोई खाली आर्टबोर्ड नहीं
|
||||
@msg no encoder for {_1} yet अभी तक {_1} के लिए कोई एनकोडर नहीं
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2562,6 +2562,9 @@ file-filter Templates Sablonok
|
||||
Last Effect: {name} Legutóbbi effektus: {name}
|
||||
Last Effect: {} Legutóbbi effektus: {}
|
||||
Last Effect… Legutóbbi effektus…
|
||||
Apply Last Filter Legutóbbi szűrő alkalmazása
|
||||
Last Filter… Legutóbbi szűrő…
|
||||
Apply {filter} {filter} alkalmazása
|
||||
Last Page Utolsó oldal
|
||||
Latin Latin
|
||||
Latin Extended Bővített latin
|
||||
@@ -6139,6 +6142,7 @@ liquify-list-end {0}, {1} {0} és {1}
|
||||
@msg no document nincs dokumentum
|
||||
@msg no document open nincs megnyitott dokumentum
|
||||
@msg no effect applied yet még nincs alkalmazott effektus
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first nincs ismételhető bővítményszűrő: előbb futtasson egyet az Objektum › Bővítmények menüből
|
||||
@msg no Pathfinder operation applied yet még nincs alkalmazott útvonalkezelő-művelet
|
||||
@msg no effect at index {k} ezen az indexen nincs effektus: {k}
|
||||
@msg no end record nincs záró rekord
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1144,6 +1144,9 @@
|
||||
Effect Efek
|
||||
Apply Last Effect Terapkan efek terakhir
|
||||
Last Effect… Efek terakhir…
|
||||
Apply Last Filter Terapkan filter terakhir
|
||||
Last Filter… Filter terakhir…
|
||||
Apply {filter} Terapkan {filter}
|
||||
Document Raster Effects Settings… Pengaturan efek raster dokumen…
|
||||
Vector Effects Efek vektor
|
||||
3D and Materials 3D dan material
|
||||
@@ -5811,6 +5814,7 @@ imageTrace Outline Kontur
|
||||
@msg no document tidak ada dokumen
|
||||
@msg no document open tidak ada dokumen yang terbuka
|
||||
@msg no effect applied yet belum ada efek yang diterapkan
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first tidak ada filter plug-in untuk diulang: jalankan satu dari Objek › Plug-in terlebih dahulu
|
||||
@msg no Pathfinder operation applied yet belum ada operasi Pathfinder yang diterapkan
|
||||
@msg no effect at index {k} tidak ada efek pada indeks {k}
|
||||
@msg no end record tidak ada rekaman akhir
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2119,6 +2119,9 @@ file-filter Templates Modelli
|
||||
Last Effect: {name} Ultimo effetto: {name}
|
||||
Last Effect: {} Ultimo effetto: {}
|
||||
Last Effect… Ultimo effetto…
|
||||
Apply Last Filter Applica ultimo filtro
|
||||
Last Filter… Ultimo filtro…
|
||||
Apply {filter} Applica {filter}
|
||||
Last Page Ultima pagina
|
||||
Latin Latino
|
||||
Thai Thailandese
|
||||
@@ -5479,6 +5482,7 @@ liquify-list-end {0}, {1} {0} e {1}
|
||||
@msg no document nessun documento
|
||||
@msg no document open nessun documento aperto
|
||||
@msg no effect applied yet nessun effetto ancora applicato
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first nessun filtro plug-in da ripetere: eseguine prima uno da Oggetto › Plug-in
|
||||
@msg no Pathfinder operation applied yet nessuna operazione di elaborazione tracciati ancora applicata
|
||||
@msg no effect at index {k} nessun effetto all'indice {k}
|
||||
@msg no end record nessun record finale
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -621,6 +621,9 @@ digits Malayalam マラヤーラム数字
|
||||
Effect 効果
|
||||
Apply Last Effect 前回の効果を適用
|
||||
Last Effect… 前回の効果…
|
||||
Apply Last Filter 前回のフィルターを適用
|
||||
Last Filter… 前回のフィルター…
|
||||
Apply {filter} 「{filter}」を適用
|
||||
Document Raster Effects Settings… ドキュメントのラスタライズ効果設定…
|
||||
Vector Effects ベクター効果
|
||||
3D and Materials 3D とマテリアル
|
||||
@@ -5712,6 +5715,7 @@ variable-list-end {0}, {1} {0}、{1}
|
||||
@msg no PNG encoder PNG エンコーダーがありません
|
||||
@msg no document open ドキュメントが開かれていません
|
||||
@msg no effect applied yet まだ効果を適用していません
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first 繰り返すプラグインフィルターがありません:先にオブジェクト › プラグインからフィルターを実行してください
|
||||
@msg no Pathfinder operation applied yet まだパスファインダーの操作を適用していません
|
||||
@msg no such perspective grid preset 指定された遠近グリッドプリセットが見つかりません
|
||||
@msg no such recent file 指定された最近使ったファイルが見つかりません
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2683,6 +2683,9 @@
|
||||
Effect ეფექტი
|
||||
Apply Last Effect ბოლო ეფექტის გამოყენება
|
||||
Last Effect… ბოლო ეფექტი…
|
||||
Apply Last Filter ბოლო ფილტრის გამოყენება
|
||||
Last Filter… ბოლო ფილტრი…
|
||||
Apply {filter} გამოყენება: {filter}
|
||||
Document Raster Effects Settings… დოკუმენტის რასტრული ეფექტების პარამეტრები…
|
||||
Vector Effects ვექტორული ეფექტები
|
||||
3D and Materials 3D და მასალები
|
||||
@@ -7217,6 +7220,7 @@ font-technology Variable ცვლადი
|
||||
@msg no document დოკუმენტი არ არის
|
||||
@msg no document open გახსნილი დოკუმენტი არ არის
|
||||
@msg no effect applied yet ეფექტი ჯერ არ გამოყენებულა
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first გასამეორებელი პლაგინის ფილტრი არ არის: ჯერ გაუშვით ერთი მენიუდან ობიექტი › პლაგინები
|
||||
@msg no Pathfinder operation applied yet ტრაექტორიების ოპერაცია ჯერ არ გამოყენებულა
|
||||
@msg no effect at index {k} ინდექსზე {k} ეფექტი არ არის
|
||||
@msg no end record დასასრულის ჩანაწერი არ არის
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -614,6 +614,9 @@ digits Malayalam 말라얄람어
|
||||
Effect 효과
|
||||
Apply Last Effect 마지막 효과 적용
|
||||
Last Effect… 마지막 효과…
|
||||
Apply Last Filter 마지막 필터 적용
|
||||
Last Filter… 마지막 필터…
|
||||
Apply {filter} {filter} 적용
|
||||
Document Raster Effects Settings… 문서 래스터 효과 설정…
|
||||
Vector Effects 벡터 효과
|
||||
3D and Materials 3D 및 재질
|
||||
@@ -5641,6 +5644,7 @@ variable-list-end {0}, {1} {0} 및 {1}
|
||||
@msg no PNG encoder PNG 인코더가 없습니다
|
||||
@msg no document open 열린 문서가 없습니다
|
||||
@msg no effect applied yet 아직 적용된 효과가 없습니다
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first 반복할 플러그인 필터가 없습니다: 먼저 개체 › 플러그인에서 필터를 실행하세요
|
||||
@msg no Pathfinder operation applied yet 아직 적용된 패스파인더 작업이 없습니다
|
||||
@msg no such perspective grid preset 해당 원근 격자 프리셋이 없습니다
|
||||
@msg no such recent file 해당 최근 파일이 없습니다
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1131,6 +1131,9 @@ liquify-list-end {0}, {1} {0} en {1}
|
||||
Effect Effect
|
||||
Apply Last Effect Laatste effect toepassen
|
||||
Last Effect… Laatste effect…
|
||||
Apply Last Filter Laatste filter toepassen
|
||||
Last Filter… Laatste filter…
|
||||
Apply {filter} {filter} toepassen
|
||||
Document Raster Effects Settings… Instellingen voor documentrastereffecten…
|
||||
Vector Effects Vectoreffecten
|
||||
3D and Materials 3D en materialen
|
||||
@@ -5833,6 +5836,7 @@ imageTrace Outline Contour
|
||||
@msg no document geen document
|
||||
@msg no document open geen document geopend
|
||||
@msg no effect applied yet nog geen effect toegepast
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first geen plug-infilter om te herhalen: voer er eerst een uit via Object › Plug-ins
|
||||
@msg no Pathfinder operation applied yet nog geen Pathfinder-bewerking toegepast
|
||||
@msg no effect at index {k} geen effect op index {k}
|
||||
@msg no end record geen eindrecord
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -512,6 +512,9 @@
|
||||
Effect Efekt
|
||||
Apply Last Effect Zastosuj ostatni efekt
|
||||
Last Effect… Ostatni efekt…
|
||||
Apply Last Filter Zastosuj ostatni filtr
|
||||
Last Filter… Ostatni filtr…
|
||||
Apply {filter} Zastosuj {filter}
|
||||
Document Raster Effects Settings… Ustawienia efektów rastrowych dokumentu…
|
||||
Vector Effects Efekty wektorowe
|
||||
3D and Materials 3D i materiały
|
||||
@@ -5583,6 +5586,7 @@ liquify-list-end {0}, {1} {0} i {1}
|
||||
@msg no document brak dokumentu
|
||||
@msg no document open brak otwartego dokumentu
|
||||
@msg no effect applied yet nie zastosowano jeszcze żadnego efektu
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first brak filtra wtyczki do powtórzenia: najpierw uruchom jeden z menu Obiekt › Wtyczki
|
||||
@msg no Pathfinder operation applied yet nie zastosowano jeszcze żadnej operacji odnajdywania ścieżek
|
||||
@msg no effect at index {k} brak efektu o indeksie {k}
|
||||
@msg no end record brak rekordu końcowego
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1757,6 +1757,9 @@ antiAlias Sharp Nítido
|
||||
Polygonal Lasso Laço poligonal
|
||||
Last Effect: {name} Último Efeito: {name}
|
||||
Last Effect… Último Efeito…
|
||||
Apply Last Filter Aplicar Último Filtro
|
||||
Last Filter… Último Filtro…
|
||||
Apply {filter} Aplicar {filter}
|
||||
Last Page Última Página
|
||||
Layer Options… Opções de Camada…
|
||||
Layers Camadas
|
||||
@@ -4719,6 +4722,7 @@ axis Both Ambos
|
||||
@msg no document nenhum documento
|
||||
@msg no document open nenhum documento aberto
|
||||
@msg no effect applied yet nenhum efeito aplicado ainda
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first nenhum filtro de plug-in para repetir: execute um em Objeto › Plug-ins primeiro
|
||||
@msg no Pathfinder operation applied yet nenhuma operação do Localizador de Caminhos aplicada ainda
|
||||
@msg no effect at index {k} nenhum efeito no índice {k}
|
||||
@msg no end record sem registro final
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2104,6 +2104,9 @@ file-filter Templates Шаблоны
|
||||
Last Effect: {name} Последний эффект: {name}
|
||||
Last Effect: {} Последний эффект: {}
|
||||
Last Effect… Последний эффект…
|
||||
Apply Last Filter Применить последний фильтр
|
||||
Last Filter… Последний фильтр…
|
||||
Apply {filter} Применить {filter}
|
||||
Last Page Последняя страница
|
||||
Latin Латиница
|
||||
Thai Тайская
|
||||
@@ -5474,6 +5477,7 @@ liquify-list-end {0}, {1} {0} и {1}
|
||||
@msg no document нет документа
|
||||
@msg no document open нет открытого документа
|
||||
@msg no effect applied yet эффект ещё не применён
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first нет фильтра модуля для повтора: сначала запустите фильтр из меню Объект › Модули
|
||||
@msg no Pathfinder operation applied yet операция обработки контуров ещё не применена
|
||||
@msg no effect at index {k} нет эффекта с индексом {k}
|
||||
@msg no end record нет конечной записи
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2020,6 +2020,9 @@ font-technology Variable Variabla
|
||||
Last Effect: {name} Senaste effekten: {name}
|
||||
Last Effect: {} Senaste effekten: {}
|
||||
Last Effect… Senaste effekten…
|
||||
Apply Last Filter Använd senaste filtret
|
||||
Last Filter… Senaste filtret…
|
||||
Apply {filter} Använd {filter}
|
||||
Last Page Sista sidan
|
||||
Latin Latin
|
||||
Thai Thailändska
|
||||
@@ -5337,6 +5340,7 @@ liquify-list-end {0}, {1} {0} och {1}
|
||||
@msg no document inget dokument
|
||||
@msg no document open inget dokument är öppet
|
||||
@msg no effect applied yet ingen effekt har använts än
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first inget pluginfilter att upprepa: kör först ett från Objekt › Plugins
|
||||
@msg no Pathfinder operation applied yet ingen banfinnaråtgärd har använts än
|
||||
@msg no effect at index {k} ingen effekt vid index {k}
|
||||
@msg no end record ingen slutpost
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -517,6 +517,23 @@ fn attributes_panel_options_strings_are_in_complete_catalogs() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Object › Plug-ins › Apply Last Filter and Last Filter…, the template that names Apply after the
|
||||
/// filter, and the error when no filter can run again.
|
||||
#[test]
|
||||
fn last_filter_strings_are_in_complete_catalogs() {
|
||||
for lang in LANGUAGES.iter().filter(|lang| lang.complete_menus) {
|
||||
for label in ["Apply Last Filter", "Last Filter…", "Apply {filter}"] {
|
||||
assert!(lang.catalog().plain(label).is_some(), "{} is missing {label}", lang.code);
|
||||
}
|
||||
}
|
||||
let none = crate::dialogs::plugin::NO_LAST_FILTER;
|
||||
assert!(message_literals().contains(none));
|
||||
for code in COMPLETE_MESSAGES {
|
||||
let lang = Lang::from_code(code).expect("registered");
|
||||
assert_ne!(message(lang, none), none, "{code}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Area Type Options › First Baseline's choices (the dropdown reads them in the "effect" context,
|
||||
/// falling back to the plain row).
|
||||
#[test]
|
||||
|
||||
@@ -1899,6 +1899,9 @@ font-technology Variable Değişken
|
||||
Last Effect: {name} Son Etki: {name}
|
||||
Last Effect: {} Son Etki: {}
|
||||
Last Effect… Son Etki…
|
||||
Apply Last Filter Son Filtreyi Uygula
|
||||
Last Filter… Son Filtre…
|
||||
Apply {filter} {filter} Uygula
|
||||
Last Page Son Sayfa
|
||||
Latin Latince
|
||||
Thai Tay dili
|
||||
@@ -5162,6 +5165,7 @@ liquify-list-end {0}, {1} {0} ve {1}
|
||||
@msg no document belge yok
|
||||
@msg no document open hiçbir belge açık değil
|
||||
@msg no effect applied yet henüz hiçbir efekt uygulanmadı
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first yinelenecek eklenti filtresi yok: önce Nesne › Eklentiler menüsünden birini çalıştırın
|
||||
@msg no Pathfinder operation applied yet henüz hiçbir Yol Bulucu işlemi uygulanmadı
|
||||
@msg no effect at index {k} {k} endeksinde etkisi yok
|
||||
@msg no end record son kayıt yok
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2113,6 +2113,9 @@ file-filter Templates Шаблони
|
||||
Last Effect: {name} Останній ефект: {name}
|
||||
Last Effect: {} Останній ефект: {}
|
||||
Last Effect… Останній ефект…
|
||||
Apply Last Filter Застосувати останній фільтр
|
||||
Last Filter… Останній фільтр…
|
||||
Apply {filter} Застосувати {filter}
|
||||
Last Page Остання сторінка
|
||||
Latin Латиниця
|
||||
Thai Тайська
|
||||
@@ -5463,6 +5466,7 @@ liquify-list-end {0}, {1} {0} і {1}
|
||||
@msg no document немає документа
|
||||
@msg no document open немає відкритого документа
|
||||
@msg no effect applied yet ефект ще не застосований
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first немає фільтра модуля для повторення: спершу запустіть фільтр із меню Об’єкт › Модулі
|
||||
@msg no Pathfinder operation applied yet операцію обробки контурів ще не застосовано
|
||||
@msg no effect at index {k} немає ефекту з індексом {k}
|
||||
@msg no end record немає кінцевого запису
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2409,6 +2409,9 @@ digits Hindi Hindi
|
||||
Last Effect: {name} Hiệu ứng vừa dùng: {name}
|
||||
Last Effect: {} Hiệu ứng vừa dùng: {}
|
||||
Last Effect… Hiệu ứng vừa dùng…
|
||||
Apply Last Filter Áp dụng bộ lọc cuối
|
||||
Last Filter… Bộ lọc vừa dùng…
|
||||
Apply {filter} Áp dụng {filter}
|
||||
Last Page Trang cuối
|
||||
Latin Latinh
|
||||
Latin Extended Latin mở rộng
|
||||
@@ -5833,6 +5836,7 @@ liquify-list-end {0}, {1} {0} và {1}
|
||||
@msg no document không có tài liệu
|
||||
@msg no document open không có tài liệu nào đang mở
|
||||
@msg no effect applied yet chưa áp dụng hiệu ứng
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first không có bộ lọc plug-in nào để lặp lại: hãy chạy một bộ lọc từ Đối tượng › Plug-in trước
|
||||
@msg no Pathfinder operation applied yet chưa áp dụng thao tác Pathfinder
|
||||
@msg no effect at index {k} không có hiệu ứng tại chỉ mục {k}
|
||||
@msg no end record không có bản ghi kết thúc
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1994,6 +1994,9 @@ file-filter Templates 模板
|
||||
Last Effect: {name} 最后一次效果:{name}
|
||||
Last Effect: {} 上次效果:{}
|
||||
Last Effect… 上次效果…
|
||||
Apply Last Filter 应用上一次滤镜
|
||||
Last Filter… 上次滤镜…
|
||||
Apply {filter} 应用“{filter}”
|
||||
Last Page 最后一页
|
||||
Latin Extended 拉丁文扩充
|
||||
Latin-1 Supplement 拉丁文-1 补充
|
||||
@@ -5377,6 +5380,7 @@ imageTrace Outline 轮廓
|
||||
@msg no PNG encoder 没有 PNG 编码器
|
||||
@msg no document open 没有打开的文档
|
||||
@msg no effect applied yet 尚未应用任何效果
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first 没有可重复的增效工具滤镜:请先从“对象 › 增效工具”运行一个
|
||||
@msg no Pathfinder operation applied yet 尚未应用任何路径查找器操作
|
||||
@msg no such perspective grid preset 没有此透视网格预设
|
||||
@msg no such recent file 没有此最近使用的文件
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2723,6 +2723,7 @@ file-filter Templates 範本
|
||||
@msg no PNG encoder 沒有 PNG 編碼器
|
||||
@msg no document open 沒有開啟的文件
|
||||
@msg no effect applied yet 尚未套用任何效果
|
||||
@msg no plug-in filter to repeat: run one from Object › Plug-ins first 沒有可重複的增效模組濾鏡:請先從「物件 › 增效模組」執行一個
|
||||
@msg no Pathfinder operation applied yet 尚未套用任何路徑管理員操作
|
||||
@msg no such perspective grid preset 沒有這個透視格點預設集
|
||||
@msg no such recent file 沒有這個最近使用的檔案
|
||||
@@ -3387,6 +3388,9 @@ liquify-list-end {0}, {1} {0}和{1}
|
||||
Last Effect: {name} 最後一次效果:{name}
|
||||
Last Effect: {} 上次效果:{}
|
||||
Last Effect… 最後一次效果…
|
||||
Apply Last Filter 套用上次的濾鏡
|
||||
Last Filter… 上次的濾鏡…
|
||||
Apply {filter} 套用「{filter}」
|
||||
Last Page 最後一頁
|
||||
Latin 拉丁文
|
||||
Thai 泰文
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -165,6 +165,8 @@ pub struct VectorcraftApp {
|
||||
pub last_effect: Option<(String, serde_json::Value)>,
|
||||
/// Last successful destructive Pathfinder operation, repeated on the current selection.
|
||||
pub last_pathfinder: Option<String>,
|
||||
/// The parameters each object filter plug-in last ran with (Object › Plug-ins › Apply Last Filter).
|
||||
pub last_filters: dialogs::plugin::LastFilters,
|
||||
/// Last confirmed Warp Options (bend, distortion, orientation) for the next new warp dialog.
|
||||
pub last_warp: Option<serde_json::Value>,
|
||||
/// The Character panel field that takes the keyboard focus when the panel next draws it
|
||||
|
||||
@@ -98,6 +98,12 @@ fn command_label(app: &VectorcraftApp, id: &str, label: &str) -> Option<String>
|
||||
Some((e, _)) => format!("Last Effect: {}", vectorcraft_effects::effect_info(e).map(|i| i.label).unwrap_or(e.as_str())),
|
||||
None => label.into(),
|
||||
},
|
||||
// Apply Last Filter and Last Filter… are named after the filter that ran last.
|
||||
crate::dialogs::plugin::APPLY_LAST | crate::dialogs::plugin::LAST => match crate::dialogs::plugin::last_filter_name(app) {
|
||||
Some(name) if id == crate::dialogs::plugin::APPLY_LAST => format!("Apply {name}"),
|
||||
Some(name) => format!("{name}…"),
|
||||
None => label.into(),
|
||||
},
|
||||
// Edit Contents reads Edit Envelope while an envelope's contents are being edited.
|
||||
"object.envelope.editContents" => {
|
||||
let editing = app.session.active().is_some_and(|st| {
|
||||
@@ -192,6 +198,12 @@ pub fn display_label(app: &VectorcraftApp, id: &str, label: &str) -> String {
|
||||
}
|
||||
None => crate::i18n::tr_id(lang, id, label).to_string(),
|
||||
},
|
||||
// The filter's name is the plug-in's own text, never translated.
|
||||
crate::dialogs::plugin::APPLY_LAST | crate::dialogs::plugin::LAST => match crate::dialogs::plugin::last_filter_name(app) {
|
||||
Some(name) if id == crate::dialogs::plugin::APPLY_LAST => fmt(tl!("Apply {filter}"), &[("filter", &name)]),
|
||||
Some(name) => format!("{name}…"),
|
||||
None => crate::i18n::tr_id(lang, id, label).to_string(),
|
||||
},
|
||||
_ => {
|
||||
let shown = dynamic_label(app, id, label);
|
||||
if shows_a_name(id, &shown) { shown } else { crate::i18n::tr_id(lang, id, &shown).to_string() }
|
||||
|
||||
@@ -1227,6 +1227,8 @@ fn run_ui_part13(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option<Result
|
||||
}
|
||||
"ui.printPresetDialog" => crate::dialogs::print::open_preset(app, p),
|
||||
"plugin.dialog" => crate::dialogs::plugin::open(app, p),
|
||||
crate::dialogs::plugin::APPLY_LAST => crate::dialogs::plugin::apply_last(app),
|
||||
crate::dialogs::plugin::LAST => crate::dialogs::plugin::open_last(app),
|
||||
"ui.installPlugin" => io::install_plugin(app, p),
|
||||
"plugin.cancelRuns" => Ok(crate::plugin_runs::cancel_all(app)),
|
||||
"plugin.hideRuns" => Ok(crate::plugin_runs::hide_all(app)),
|
||||
|
||||
@@ -376,6 +376,10 @@ fn ui_enabled(app: &VectorcraftApp, id: &str) -> bool {
|
||||
"view.guides" | "view.grid" => !app.ui.view.trim_view,
|
||||
"view.refreshMonitorProfile" => app.session.prefs.monitor_profile_display && app.display_profile.has_reader(),
|
||||
"plugin.dialog" => app.session.active().is_some(),
|
||||
// A filter may take no objects and add new ones, so no selection is needed.
|
||||
crate::dialogs::plugin::APPLY_LAST | crate::dialogs::plugin::LAST => {
|
||||
app.session.active().is_some() && crate::dialogs::plugin::last_filter(app).is_some()
|
||||
}
|
||||
"ui.perspectiveGridDialog" | "ui.savePerspectivePreset" => app.session.active().is_some(),
|
||||
id if id.starts_with(crate::dialogs::perspective_presets::SLOT) => {
|
||||
app.session.active().is_some() && crate::dialogs::perspective_presets::slot_preset(app, id).is_some()
|
||||
|
||||
@@ -396,7 +396,10 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec<Item>)> {
|
||||
],
|
||||
),
|
||||
Sep,
|
||||
sub("Plug-ins", [crate::addons::plugin_menu(), crate::dialogs::plugin::object_menu()].concat()),
|
||||
sub(
|
||||
"Plug-ins",
|
||||
[crate::dialogs::plugin::last_filter_menu(), crate::addons::plugin_menu(), crate::dialogs::plugin::object_menu()].concat(),
|
||||
),
|
||||
],
|
||||
),
|
||||
(
|
||||
|
||||
@@ -1994,7 +1994,19 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"plugin.dialog",
|
||||
"Plug-in…",
|
||||
"",
|
||||
"{id: an object filter plug-in (plugin.list), params?: {…}} Object › Plug-ins: run the filter at once when it takes no parameters or params are given (plugin.run), else open its dialog (dialog `plugin`: a field per parameter, `__plugin` the id, live preview; OK runs plugin.run as one undo step). A heavy filter, and a filter that lists `progress` and no commandAllowlist, run in the background when they run at once or OK runs them without a kept preview → {background: true, status} (see plugin.cancelRuns)",
|
||||
"{id: an object filter plug-in (plugin.list), params?: {…}} Object › Plug-ins: run the filter at once when it takes no parameters or params are given (plugin.run), else open its dialog (dialog `plugin`: a field per parameter at the value the filter last ran with in this session, else its default, `__plugin` the id, live preview; OK runs plugin.run as one undo step). A heavy filter, and a filter that lists `progress` and no commandAllowlist, run in the background when they run at once or OK runs them without a kept preview → {background: true, status} (see plugin.cancelRuns)",
|
||||
),
|
||||
(
|
||||
"plugin.applyLastFilter",
|
||||
"Apply Last Filter",
|
||||
"",
|
||||
"{} Object › Plug-ins › Apply <filter name>: run the object filter that last ran in this session (a plugin.run that succeeded: its menu item, its dialog's OK, a request, a command.batch step or an action.batch step; not a plug-in's own commands) again on the selection with the same parameters, without its dialog, as one undo step; it runs in the background where its menu item would → plugin.run's result | {background: true, status}. An error with no document open, when no filter ran yet, when that filter was removed or installed again (the same module too) since, or when its manifest no longer takes those parameters as they are",
|
||||
),
|
||||
(
|
||||
"plugin.lastFilter",
|
||||
"Last Filter…",
|
||||
"",
|
||||
"{} Object › Plug-ins › <filter name>…: open the dialog of the object filter that last ran in this session (see plugin.applyLastFilter) with the parameters it ran with (dialog `plugin`); OK runs it as one undo step and Cancel changes nothing. A filter without parameters runs at once. The same errors as plugin.applyLastFilter",
|
||||
),
|
||||
(
|
||||
"ui.installPlugin",
|
||||
|
||||
@@ -603,7 +603,7 @@ pub fn sync(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
}
|
||||
|
||||
/// What the menus' rows depend on, cheaply (no allocation): commands run, the active document,
|
||||
/// its revision (edits, selection and view changes), history and clipboard, the language,
|
||||
/// its revision (edits, selection and view changes), history and clipboard, the filter plug-in that ran last, the language,
|
||||
/// shortcuts, plug-ins, the Scripts folder's listing, an open file dialog and the fonts (Type › Font lists the loaded fonts
|
||||
/// until the installed ones are scanned, then all of them, #5483). `input` forces a change on frames with a click or
|
||||
/// a key press, which covers what the hash doesn't list (panels shown, a tool picked). While an
|
||||
@@ -621,6 +621,8 @@ pub(crate) fn state_hash(app: &VectorcraftApp, input: Option<u64>) -> u64 {
|
||||
(d.uid, revision, d.history.undo.len(), d.history.redo.len(), d.transparency_grid, d.print_tiling).hash(&mut h);
|
||||
}
|
||||
(app.system_paste, app.last_effect.is_some(), app.ui.recent_files.len(), app.ui.recent_files.first(), app.recent_fonts().len()).hash(&mut h);
|
||||
// Apply Last Filter and Last Filter… are named after the filter that ran last.
|
||||
app.last_filters.last_id().hash(&mut h);
|
||||
app.file_dialog_open().hash(&mut h);
|
||||
(crate::i18n::current().code(), menus::plugin_revision(), crate::scripts_menu::revision(), crate::dialogs::proof_setup::saved_revision())
|
||||
.hash(&mut h);
|
||||
|
||||
@@ -14,6 +14,7 @@ mod fonts;
|
||||
mod guide_escape;
|
||||
mod home;
|
||||
pub(super) mod labels;
|
||||
mod last_filter;
|
||||
mod lifecycle;
|
||||
mod nativemenu;
|
||||
mod nativeoptions;
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
//! Object › Plug-ins › Apply Last Filter and Last Filter…: the object filter that last ran in the
|
||||
//! session runs again with the same parameters, or opens its dialog with them, and each filter's
|
||||
//! dialog opens with the parameters it last ran with. Both items are off before a filter ran and
|
||||
//! once that filter was removed or installed again.
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_engine::Session;
|
||||
use vectorcraft_plugins::wat as tpl;
|
||||
|
||||
use crate::dialogs::plugin::{APPLY_LAST, LAST, NO_LAST_FILTER};
|
||||
use crate::{VectorcraftApp, dialogs, menus, theme};
|
||||
|
||||
/// The whole-number parameter `n` of [`filter`]: 0 to 10, 3 by default.
|
||||
const N: &str = r#"{"n":{"type":"int","min":0,"max":10,"default":3}}"#;
|
||||
|
||||
/// An app with a new 200 × 200 pt document.
|
||||
fn app() -> VectorcraftApp {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.session.allow_plugin_grants_from_requests();
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
app
|
||||
}
|
||||
|
||||
/// A filter `id` named `name` with `params` that adds a 30 pt wide triangle when it is given `n` 7,
|
||||
/// and a 50 pt square otherwise.
|
||||
fn filter(id: &str, name: &str, params: &str) -> Vec<u8> {
|
||||
let manifest = format!(r#"{{"id":"{id}","name":"{name}","version":"1","kind":"filter","params":{params}}}"#);
|
||||
let triangle = r#"{"objects":[{"path":{"subpaths":[{"closed":true,"anchors":[{"p":[0,0]},{"p":[30,0]},{"p":[15,20]}]}]}}]}"#;
|
||||
let square = r#"{"objects":[{"path":{"subpaths":[{"closed":true,"anchors":[{"p":[0,0]},{"p":[50,0]},{"p":[50,50]},{"p":[0,50]}]}]}}]}"#;
|
||||
wat::parse_str(tpl::when_given_else(&manifest, tpl::Given::Params, r#""n":7"#, triangle, square)).unwrap()
|
||||
}
|
||||
|
||||
/// Installs `wasm`, in place of a plug-in with its id if there is one.
|
||||
fn install(app: &mut VectorcraftApp, wasm: &[u8]) {
|
||||
app.run("plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(wasm), "replace": true})).unwrap();
|
||||
}
|
||||
|
||||
/// The width of what a filter run returned as `ids`, in points.
|
||||
fn width(app: &VectorcraftApp, ran: &Value) -> f64 {
|
||||
let ids: Vec<vectorcraft_doc::NodeId> = ran["ids"].as_array().unwrap().iter().map(|i| vectorcraft_doc::NodeId(i.as_u64().unwrap())).collect();
|
||||
let r = app.session.doc().unwrap().doc.bounds_of(&ids, false).unwrap();
|
||||
r.x1 - r.x0
|
||||
}
|
||||
|
||||
fn undo_len(app: &VectorcraftApp) -> usize {
|
||||
app.session.doc().unwrap().history.undo.len()
|
||||
}
|
||||
|
||||
/// One headless frame of the dialog layer, which previews the dialog's fields.
|
||||
fn frame(app: &mut VectorcraftApp) {
|
||||
let ctx = egui::Context::default();
|
||||
theme::install_fonts(&ctx);
|
||||
let mut out = ctx.run_ui(Default::default(), |ui| dialogs::show(app, ui.ctx()));
|
||||
out.textures_delta.clear();
|
||||
}
|
||||
|
||||
/// Both items are off, and say so when run, until a filter ran; then they are named after it, and
|
||||
/// Apply runs it again with its parameters on what is selected now (nothing, here), without a
|
||||
/// dialog, as one undo step.
|
||||
#[test]
|
||||
fn apply_last_filter_runs_the_last_filter_again_with_its_parameters() {
|
||||
let mut app = app();
|
||||
let id = "test.ui.last.apply";
|
||||
install(&mut app, &filter(id, "Grow Shape", N));
|
||||
let entries = menus::menu_entries(&app);
|
||||
let under: Vec<&str> = entries.iter().filter(|e| e.path == ["Object", "Plug-ins"]).map(|e| e.label.as_str()).take(2).collect();
|
||||
assert_eq!(under, ["Apply Last Filter", "Last Filter…"], "the first items of Object › Plug-ins");
|
||||
for cmd in [APPLY_LAST, LAST] {
|
||||
assert!(!menus::enabled(&app, cmd), "{cmd} before any filter ran");
|
||||
assert_eq!(app.run(cmd, json!({})), Err(NO_LAST_FILTER.to_string()));
|
||||
}
|
||||
assert_eq!(menus::dynamic_label(&app, APPLY_LAST, "Apply Last Filter"), "Apply Last Filter");
|
||||
|
||||
let first = app.run("plugin.dialog", json!({"id": id, "params": {"n": 7}})).unwrap();
|
||||
assert_eq!(width(&app, &first), 30.0);
|
||||
assert_eq!(app.last_filters.last_id(), Some(id));
|
||||
assert!(menus::enabled(&app, APPLY_LAST) && menus::enabled(&app, LAST));
|
||||
assert_eq!(menus::dynamic_label(&app, APPLY_LAST, "Apply Last Filter"), "Apply Grow Shape");
|
||||
assert_eq!(menus::dynamic_label(&app, LAST, "Last Filter…"), "Grow Shape…");
|
||||
assert_eq!(menus::display_label(&app, APPLY_LAST, "Apply Last Filter"), "Apply Grow Shape");
|
||||
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
let undo = undo_len(&app);
|
||||
let again = app.run(APPLY_LAST, json!({})).unwrap();
|
||||
assert!(app.ui.dialog.is_none(), "no dialog");
|
||||
assert_eq!(width(&app, &again), 30.0, "the same parameters: n 7");
|
||||
assert_ne!(again["ids"], first["ids"], "a new run");
|
||||
let st = app.session.doc().unwrap();
|
||||
assert_eq!((st.history.undo.len(), st.history.undo.last().unwrap().label.as_str()), (undo + 1, "Grow Shape"));
|
||||
}
|
||||
|
||||
/// Last Filter… opens the dialog with the parameters the filter last ran with; Cancel changes
|
||||
/// nothing, and OK runs it, with a kept preview or without one, the values it ran with becoming
|
||||
/// the last ones.
|
||||
#[test]
|
||||
fn last_filter_opens_its_dialog_with_the_last_parameters() {
|
||||
let mut app = app();
|
||||
let id = "test.ui.last.dialog";
|
||||
install(&mut app, &filter(id, "Grow Dialog…", N));
|
||||
app.run("plugin.dialog", json!({"id": id, "params": {"n": 7}})).unwrap();
|
||||
assert_eq!(menus::dynamic_label(&app, LAST, "Last Filter…"), "Grow Dialog…", "one ellipsis");
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
let undo = undo_len(&app);
|
||||
|
||||
app.run(LAST, json!({})).unwrap();
|
||||
let d = app.ui.dialog.as_ref().expect("its dialog");
|
||||
assert_eq!((d.kind.as_str(), d.str("__plugin"), d.fields.get("n")), (dialogs::plugin::KIND, id.to_string(), Some(&json!(7))));
|
||||
frame(&mut app);
|
||||
dialogs::cancel(&mut app);
|
||||
assert_eq!(undo_len(&app), undo, "Cancel changes nothing");
|
||||
|
||||
// OK with the preview kept.
|
||||
app.run(LAST, json!({})).unwrap();
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("n".into(), json!(5));
|
||||
frame(&mut app);
|
||||
assert!(app.session.in_interaction(), "previewing");
|
||||
dialogs::confirm(&mut app).unwrap();
|
||||
assert_eq!(undo_len(&app), undo + 1);
|
||||
app.run(LAST, json!({})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!(5)), "OK made 5 the last value");
|
||||
|
||||
// OK without a preview.
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("n".into(), json!(7));
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("preview".into(), json!(false));
|
||||
dialogs::confirm(&mut app).unwrap();
|
||||
assert_eq!(undo_len(&app), undo + 2);
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
let again = app.run(APPLY_LAST, json!({})).unwrap();
|
||||
assert_eq!(width(&app, &again), 30.0);
|
||||
}
|
||||
|
||||
/// Each filter's own dialog opens with the parameters that filter last ran with, never another
|
||||
/// filter's; one that hasn't run opens with its defaults.
|
||||
#[test]
|
||||
fn each_filter_dialog_opens_with_its_own_last_parameters() {
|
||||
let mut app = app();
|
||||
let (a, b, c) = ("test.ui.last.own.a", "test.ui.last.own.b", "test.ui.last.own.c");
|
||||
for (id, name) in [(a, "Own A"), (b, "Own B"), (c, "Own C")] {
|
||||
install(&mut app, &filter(id, name, N));
|
||||
}
|
||||
app.run("plugin.dialog", json!({"id": a, "params": {"n": 7}})).unwrap();
|
||||
app.run("plugin.dialog", json!({"id": b, "params": {"n": 2}})).unwrap();
|
||||
app.run("plugin.dialog", json!({"id": a, "params": {"n": 8}})).unwrap();
|
||||
app.run("plugin.dialog", json!({"id": b, "params": {"n": 1}})).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(b));
|
||||
for (id, n) in [(a, 8), (b, 1), (c, 3)] {
|
||||
app.run("plugin.dialog", json!({"id": id})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!(n)), "{id}");
|
||||
dialogs::cancel(&mut app);
|
||||
}
|
||||
}
|
||||
|
||||
/// A batch step, a direct `plugin.run` and an Action Batch step count; a failed run, a plug-in's own
|
||||
/// command and a live effect don't.
|
||||
#[test]
|
||||
fn only_successful_filter_runs_become_the_last_filter() {
|
||||
let mut app = app();
|
||||
let id = "test.ui.last.kinds";
|
||||
install(&mut app, &filter(id, "Kinds", N));
|
||||
assert!(app.run("plugin.run", json!({"id": id, "params": {"n": "seven"}})).is_err());
|
||||
assert_eq!(app.last_filters.last_id(), None, "a run that failed");
|
||||
|
||||
let steps = json!({"commands": [{"command": "plugin.run", "params": {"id": id, "params": {"n": 7}}}]});
|
||||
app.run("command.batch", steps).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(id), "a batch step");
|
||||
app.run("plugin.dialog", json!({"id": id})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!(7)));
|
||||
dialogs::cancel(&mut app);
|
||||
|
||||
let other = "test.ui.last.kinds.other";
|
||||
install(&mut app, &filter(other, "Other", N));
|
||||
app.run("plugin.run", json!({"id": other, "n": 2})).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(other), "a direct run, its parameters as top-level keys");
|
||||
app.run("plugin.dialog", json!({"id": other})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!(2)));
|
||||
dialogs::cancel(&mut app);
|
||||
|
||||
let cmds = "test.ui.last.cmds";
|
||||
let manifest = format!(r#"{{"id":"{cmds}","name":"Cmds","version":"1","kind":"filter","commands":[{{"id":"grow","label":"Grow"}}]}}"#);
|
||||
let triangle = r#"{"objects":[{"path":{"subpaths":[{"closed":true,"anchors":[{"p":[0,0]},{"p":[5,0]},{"p":[5,5]}]}]}}]}"#;
|
||||
install(&mut app, &wat::parse_str(tpl::returning(&manifest, triangle)).unwrap());
|
||||
app.run("plugin.test.ui.last.cmds.grow", json!({})).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(other), "a plug-in's own command");
|
||||
|
||||
let fx = tpl::module(&tpl::manifest("test.ui.last.fx", "effect", "{}"), tpl::ECHO, "", 1);
|
||||
install(&mut app, &wat::parse_str(fx).unwrap());
|
||||
app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 40, "height": 40})).unwrap();
|
||||
app.run("effect.apply", json!({"effect": "plugin.test.ui.last.fx"})).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(other), "a live effect");
|
||||
|
||||
// Action Batch over the document's data sets counts once a data set ran the step.
|
||||
app.run("dataset.new", json!({"name": "a"})).unwrap();
|
||||
let steps = json!([{"command": "plugin.run", "params": {"id": id, "params": {"n": 5}}}]);
|
||||
let r = app.run("action.batch", json!({"source": "datasets", "commands": steps})).unwrap();
|
||||
assert_eq!((r["count"].clone(), r["failed"].clone()), (json!(1), json!(0)), "{r}");
|
||||
assert_eq!(app.last_filters.last_id(), Some(id), "an Action Batch step");
|
||||
app.run("plugin.dialog", json!({"id": id})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!(5)));
|
||||
dialogs::cancel(&mut app);
|
||||
}
|
||||
|
||||
/// Installing the plug-in again, even the same module, another module with its id, one whose
|
||||
/// manifest no longer takes the parameters, and removing it turn both items off, and the new
|
||||
/// module's dialog opens with its own defaults. Installing another plug-in keeps them.
|
||||
#[test]
|
||||
fn the_last_filter_is_off_once_its_plugin_is_removed_or_replaced() {
|
||||
let mut app = app();
|
||||
let id = "test.ui.last.stale";
|
||||
let wasm = filter(id, "Stale", N);
|
||||
install(&mut app, &wasm);
|
||||
app.run("plugin.dialog", json!({"id": id, "params": {"n": 7}})).unwrap();
|
||||
install(&mut app, &filter("test.ui.last.unrelated", "Unrelated", N));
|
||||
assert!(menus::enabled(&app, APPLY_LAST), "another plug-in installed");
|
||||
install(&mut app, &wasm);
|
||||
assert!(!menus::enabled(&app, APPLY_LAST), "the same module again");
|
||||
app.run("plugin.dialog", json!({"id": id, "params": {"n": 7}})).unwrap();
|
||||
|
||||
// Another module and then the first one again: the run with the first one doesn't come back.
|
||||
install(&mut app, &filter(id, "Stale", r#"{"n":{"type":"int","min":0,"max":20,"default":3}}"#));
|
||||
install(&mut app, &wasm);
|
||||
assert!(!menus::enabled(&app, APPLY_LAST), "replaced, then the module that ran installed again");
|
||||
|
||||
install(&mut app, &filter(id, "Stale", r#"{"n":{"type":"choice","options":["a","b"],"default":"b"}}"#));
|
||||
for cmd in [APPLY_LAST, LAST] {
|
||||
assert!(!menus::enabled(&app, cmd), "{cmd} once the parameters no longer fit");
|
||||
assert_eq!(app.run(cmd, json!({})), Err(NO_LAST_FILTER.to_string()));
|
||||
}
|
||||
assert_eq!(menus::dynamic_label(&app, APPLY_LAST, "Apply Last Filter"), "Apply Last Filter");
|
||||
app.run("plugin.dialog", json!({"id": id})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields.get("n"), Some(&json!("b")), "the new module's default");
|
||||
dialogs::cancel(&mut app);
|
||||
|
||||
install(&mut app, &filter(id, "Stale", r#"{"n":{"type":"int","min":0,"max":20,"default":3}}"#));
|
||||
assert!(!menus::enabled(&app, APPLY_LAST), "another module, though it takes n 7");
|
||||
app.run("plugin.dialog", json!({"id": id, "params": {"n": 7}})).unwrap();
|
||||
assert!(menus::enabled(&app, APPLY_LAST));
|
||||
app.run("plugin.remove", json!({"id": id})).unwrap();
|
||||
assert!(!menus::enabled(&app, APPLY_LAST) && !menus::enabled(&app, LAST), "removed");
|
||||
assert_eq!(app.run(APPLY_LAST, json!({})), Err(NO_LAST_FILTER.to_string()));
|
||||
|
||||
// A batch that runs the filter and then replaces its module.
|
||||
install(&mut app, &wasm);
|
||||
let other = filter(id, "Stale", r#"{"n":{"type":"int","min":0,"max":20,"default":3}}"#);
|
||||
let steps = json!([
|
||||
{"command": "plugin.run", "params": {"id": id, "params": {"n": 7}}},
|
||||
{"command": "plugin.install", "params": {"dataBase64": vectorcraft_format::base64_encode(&other), "replace": true}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert_eq!(app.last_filters.last_id(), Some(id));
|
||||
assert!(!menus::enabled(&app, APPLY_LAST) && !menus::enabled(&app, LAST), "replaced after it ran in the batch");
|
||||
|
||||
// A batch that runs the filter and then installs another plug-in keeps it.
|
||||
install(&mut app, &wasm);
|
||||
let unrelated = filter("test.ui.last.unrelated", "Unrelated", N);
|
||||
let steps = json!([
|
||||
{"command": "plugin.run", "params": {"id": id, "params": {"n": 7}}},
|
||||
{"command": "plugin.install", "params": {"dataBase64": vectorcraft_format::base64_encode(&unrelated), "replace": true}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert!(menus::enabled(&app, APPLY_LAST), "another plug-in installed after it ran in the batch");
|
||||
|
||||
// A batch that runs the filter, removes it and installs the same module again.
|
||||
let steps = json!([
|
||||
{"command": "plugin.run", "params": {"id": id, "params": {"n": 7}}},
|
||||
{"command": "plugin.remove", "params": {"id": id}},
|
||||
{"command": "plugin.install", "params": {"dataBase64": vectorcraft_format::base64_encode(&wasm), "replace": true}},
|
||||
]);
|
||||
app.run("command.batch", json!({"commands": steps})).unwrap();
|
||||
assert!(!menus::enabled(&app, APPLY_LAST), "installed again in the batch after it ran");
|
||||
}
|
||||
|
||||
/// A filter that runs in the background becomes the last filter only when its result is applied:
|
||||
/// starting it or canceling it doesn't. Apply Last Filter starts it in the background as its menu
|
||||
/// item does. With no document open both items are off.
|
||||
#[test]
|
||||
fn a_background_run_becomes_the_last_filter_only_when_applied() {
|
||||
let mut app = app();
|
||||
let id = "test.ui.last.heavy";
|
||||
let manifest = format!(r#"{{"id":"{id}","name":"Heavy Last","version":"1","kind":"filter","budget":"heavy"}}"#);
|
||||
let wasm = wat::parse_str(tpl::spinning(&manifest, 1_000_000_000, r#"{"objects":[]}"#)).unwrap();
|
||||
app.run("plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(&wasm), "allowHeavy": true})).unwrap();
|
||||
assert_eq!(app.run("plugin.dialog", json!({"id": id})).unwrap()["background"], true);
|
||||
assert_eq!(app.last_filters.last_id(), None, "started");
|
||||
crate::plugin_runs::cancel_all(&mut app);
|
||||
crate::plugin_runs::poll(&mut app);
|
||||
assert_eq!(app.last_filters.last_id(), None, "canceled");
|
||||
|
||||
// As its result would be applied: `plugin.run` with its parameters.
|
||||
dialogs::plugin::record(&mut app, &json!({"id": id, "params": {}}));
|
||||
assert_eq!(app.run(APPLY_LAST, json!({})).unwrap()["background"], true, "in the background, as its menu item runs it");
|
||||
crate::plugin_runs::cancel_all(&mut app);
|
||||
|
||||
// A filter with parameters, so Last Filter… would open its dialog.
|
||||
let with_params = "test.ui.last.nodoc";
|
||||
install(&mut app, &filter(with_params, "No Document", N));
|
||||
let mut empty = VectorcraftApp::new(Session::new(), Default::default());
|
||||
dialogs::plugin::record(&mut empty, &json!({"id": with_params, "params": {"n": 7}}));
|
||||
assert_eq!(empty.last_filters.last_id(), Some(with_params));
|
||||
assert!(!menus::enabled(&empty, APPLY_LAST) && !menus::enabled(&empty, LAST), "no document");
|
||||
assert_eq!(dialogs::plugin::apply_last(&mut empty), Err("no document open".into()));
|
||||
assert_eq!(dialogs::plugin::open_last(&mut empty), Err("no document open".into()));
|
||||
assert!(empty.ui.dialog.is_none(), "no dialog opens without a document");
|
||||
}
|
||||
|
||||
/// The native menu reads its rows again when the filter that ran last changes, also when nothing
|
||||
/// else changed.
|
||||
#[test]
|
||||
fn the_native_menu_follows_the_last_filter() {
|
||||
let mut app = app();
|
||||
let (a, b) = ("test.ui.last.native.a", "test.ui.last.native.b");
|
||||
install(&mut app, &filter(a, "Native A", N));
|
||||
install(&mut app, &filter(b, "Native B", N));
|
||||
dialogs::plugin::record(&mut app, &json!({"id": a, "params": {}}));
|
||||
let before = crate::native_menu::state_hash(&app, None);
|
||||
dialogs::plugin::record(&mut app, &json!({"id": b, "params": {}}));
|
||||
assert_ne!(crate::native_menu::state_hash(&app, None), before);
|
||||
}
|
||||
+8
-1
@@ -13341,7 +13341,14 @@ A plug-in of API level 2 (`api: 2` in its entry) that lists `progress` may repor
|
||||
log lines: `notifications/cancelled` makes its `vc_cancelled` return 1, and its log lines go to the server's log
|
||||
under its id. With a desktop app connected, `plugin.dialog` runs such a filter (one without a `commandAllowlist`) in the
|
||||
background when it runs at once or OK runs it with Preview off, and returns `{background: true, status}`;
|
||||
`plugin.cancelRuns` stops it. One that lists `settings` or `cache` keeps settings or a cache of its own in the `Plug-ins` folder
|
||||
`plugin.cancelRuns` stops it. With a desktop app connected, `plugin.applyLastFilter {}` (Object › Plug-ins › Apply
|
||||
Last Filter) runs the object filter whose `plugin.run` last succeeded in the app's session again on the selection, with
|
||||
the same parameters and without a dialog, and returns `plugin.run`'s result, or `{background: true, status}` for a
|
||||
filter that runs in the background; `plugin.lastFilter {}` (Last Filter…) opens its dialog with those parameters
|
||||
instead. Both return an error with no document open, before a filter ran and once that filter was removed, installed
|
||||
again (the same module too) or no longer takes the parameters as they are; `plugin.dialog {id}` opens a filter's dialog with the
|
||||
parameters it last ran with. A plug-in's own commands and live effects don't change what they run. A plug-in that
|
||||
lists `settings` or `cache` keeps settings or a cache of its own in the `Plug-ins` folder
|
||||
(VectorCraft's own caps: 256 settings and 1 MiB, 512 MiB of cache): `plugin.list` and `plugin.info` give the cache's
|
||||
size as `cacheBytes`, `plugin.clearCache {id?}` empties the cache of one plug-in or of all of them and returns
|
||||
`{cleared: [id], bytesFreed}`, replacing a plug-in keeps both, and `plugin.remove` deletes both (also for an id that
|
||||
|
||||
+18
-2
@@ -58,7 +58,22 @@ In the app, installed filters appear under **Object › Plug-ins**, next to **In
|
||||
Plug-ins**; live effects under **Effect › Plug-ins** and in the Appearance panel's effect menu. A plug-in with
|
||||
parameters gets a dialog generated from its schema (numbers, whole numbers, checkboxes, dropdowns, text, lists
|
||||
of numbers and colors, labelled, explained and sorted into sections as its manifest says) with a live preview; without
|
||||
parameters it runs at once. Edit › Keyboard Shortcuts lists each installed filter under Object › Plug-ins, where
|
||||
parameters it runs at once. A filter's dialog opens with the parameters that filter last ran with in the session,
|
||||
else with its defaults. Object › Plug-ins starts with **Apply Last Filter** (`plugin.applyLastFilter`), which runs
|
||||
the filter that last ran again with the same parameters on the selection, without its dialog, as one undo step, and
|
||||
**Last Filter…** (`plugin.lastFilter`), which opens that filter's dialog with those parameters, its OK running it as a
|
||||
new run. Once a filter has run they read **Apply** followed by the filter's name and the filter's name with an
|
||||
ellipsis. A run counts once it succeeds: from its menu item, its dialog's OK, a shortcut, `plugin.run` or a
|
||||
`command.batch` step (the last such step of the batch), an Action Batch (`action.batch`) step once a file or data set
|
||||
ran it, and a background run once its
|
||||
result is applied. A preview, Cancel, a failed or canceled run, a plug-in's own commands and live effects don't count,
|
||||
and neither does a batch step whose filter the batch installed when a later step of the batch installs, removes or
|
||||
reloads plug-ins. Both items are grayed out with no document open, before any filter ran, and once the filter that
|
||||
ran last was removed, installed again (the same module too) or no longer takes those parameters as they are;
|
||||
installing another plug-in keeps them. They don't need a selection: a filter given no objects can still add new ones. The parameters are
|
||||
kept for the session only, for at most 64 filters. Where the two items sit, when they are grayed out and how long the
|
||||
parameters are kept are VectorCraft's own rules. Edit › Keyboard Shortcuts lists each installed filter under Object ›
|
||||
Plug-ins, where
|
||||
it can be given a shortcut (`plugin:<id>`); the shortcut stays saved while the plug-in is removed and applies again
|
||||
when it is reinstalled. Parameters too many for the window's height scroll inside the dialog, which keeps its
|
||||
heading and buttons in view. Exporters are formats of **File › Export › Export As**, where Use Artboards is greyed out
|
||||
@@ -891,4 +906,5 @@ per change of their input, parameters or paints (results are cached), not per fr
|
||||
- Live effects that change opacity, blending or effects (at `api` 2 one may [paint](#painted-live-effects) the pieces
|
||||
it returns), and filters that change type, images or symbol instances (a filter at `api` 2 reads them, see
|
||||
[`inputs`](#reading-type-images-and-symbols)).
|
||||
- Apply Last Effect and Last Effect work for plug-in effects; there is no "last filter" for object filters yet.
|
||||
- Scripts can't run object filters (`plugin.*` commands are refused there), so a script doesn't change what Apply
|
||||
Last Filter runs.
|
||||
@@ -2654,6 +2654,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Changed plug-in gradients lose spot plates (G17):** a gradient that a filter or importer changes loses each stop's swatch link, tint and process `plates` together, in fills and strokes, and keeps the stop's color, offset, opacity and midpoint; a gradient returned unchanged keeps all three. Regressions: `crates/plugins/src/objects/tests.rs` (`changed_gradient_fill_and_stroke_drop_spot_plates`, `unchanged_gradient_paint_keeps_spot_plates`). Scores and hours unchanged.
|
||||
- **Plug-in data kept with the document (G17):** a filter writes JSON of at most 1 MiB with `documentData` (one undo step with its objects; `null` removes it) and reads it back in `_context.documentData`, which no other filter is given. It is the document's foreign data (`unknown.pluginData`, by plug-in id), as the perspective grid is, so the native file keeps it with no section of its own; an exporter is given the whole document, so it can read every plug-in's. Regressions: `crates/engine/src/tests/plugins.rs`, `crates/engine/tests/plugin_export.rs` (the exporter), `crates/doc/src/plugin_data.rs`, `crates/plugins/src/objects/tests.rs`. Scores and hours unchanged.
|
||||
- **Heavy filter plug-ins (G17):** a filter's manifest may ask for `"budget": "heavy"`: 1 G instructions (20 times a light run's) and 300 s a run, for routing, packing or simulation. Install Plug-in… and File › Open ask the user first, `plugin.install` needs `allowHeavy: true` (`plugin.inspect` tells beforehand), the Additional Plug-ins Folder skips such filters, and the plug-in store keeps the answer. Its dialog has no Preview; the app runs it on a thread of its own with a progress window (Cancel, Continue in Background) and applies the result as `plugin.run` with the same parameters, one undo step, unless the document or the plug-in changed meanwhile. Regressions: `crates/plugins/tests/abi.rs`, `crates/plugins/src/manifest.rs`, `crates/engine/src/tests/plugins.rs`, `crates/ui-egui/src/tests/plugin_runs.rs`. Scores and hours unchanged.
|
||||
- **Apply Last Filter and Last Filter… for filter plug-ins (G17):** Object › Plug-ins starts with Apply Last Filter (`plugin.applyLastFilter`), which runs the filter plug-in that last ran in the session again with the same parameters on the selection, without its dialog, as one undo step, and Last Filter… (`plugin.lastFilter`), which opens that filter's dialog with those parameters; once a filter has run, both items are named after it. [The help page](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=357) describes the same pair for filters: one item repeats the last filter with its last settings, the other opens its options. Each filter's own dialog opens with the parameters that filter last ran with. A heavy filter repeats in the background as its menu item runs it. Both items are grayed out with no document open, before a filter ran, and once that filter was removed, installed again or no longer takes the parameters as they are; they don't need a selection (VectorCraft's own rules). Regressions: `crates/ui-egui/src/tests/last_filter.rs`, `crates/ui-egui/src/i18n/tests.rs`. Scores and hours unchanged.
|
||||
- **Plug-in instruction budget preference (G17, VectorCraft's own setting):** Preferences › Plug-ins & Scratch Disks › Plug-in Instruction Budget (`pluginInstructionBudget`) is Normal by default, which keeps the 50 M instructions a light filter run gets, or Large, which gives each object filter run 250 M plus the 4,000 per input byte, with the 60 s time budget, Cancel and the other limits unchanged. A heavy filter keeps its 1 G and 300 s with either choice; live effects, exporters and importers keep their own budgets. A change applies to the next run of an installed filter; `prefs.set` refuses any other value, and a saved file with another value reads as Normal. Regressions: `crates/plugins/tests/abi.rs`, `crates/engine/src/tests/plugins.rs`, `crates/engine/src/tests/prefs.rs`, `crates/ui-egui/src/prefs_dialog/tests.rs`. Scores and hours unchanged.
|
||||
- **Safe Mode for plug-ins (G17):** `vectorcraft --safe-mode` and `vectorcraft-cli --safe-mode <subcommand>` start without plug-ins. When a launch stopped while a plug-in was loading or drawing its first live effect, the next launch names that plug-in, without saying it caused the stop, and offers Disable and Continue, Start Normally or Start in Safe Mode. Help › Safe Mode lists the disabled plug-ins with Enable on Re-launch, which takes effect at the next launch, and the app bar and the window title show Safe Mode. The help page (https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf, pages 65 to 69) describes the same choice between diagnosing and starting normally, a Safe Mode with the problem item off and the rest of the app working, and turning the item back on at the next launch. In Safe Mode no plug-in loads or runs, and a live-effect plug-in draws its object's geometry unchanged while the object keeps the effect, which the Appearance panel marks "(Safe Mode)" with the plug-in's id in its tooltip and `effect.list` marks `skipped`; Expand Appearance refuses such an object. The web build keeps no plug-ins between page loads and has no marker. Each desktop launch with preferences keeps a marker in the `Launch` folder next to them; `vectorcraft-cli` and a desktop launch without preferences keep none, so a stop there leads to no choice at the next launch. Disabled plug-ins are listed in `Plug-ins/disabled.json`. `plugin.safeMode` reports Safe Mode and the disabled plug-ins, and `plugin.setEnabled` changes the list. Regressions: `crates/plugins/src/safe_mode.rs`, `crates/plugins/tests/safe_mode.rs`, `crates/engine/tests/plugin_safe_mode.rs`, `crates/ui-egui/tests/safe_mode.rs`. Scores and hours unchanged.
|
||||
- **Hang report and Copy Troubleshooting Info:** when the desktop app's interface thread stays in one part of a frame for 3 s (VectorCraft's own value), a watching thread writes a hang report to the log and to `logs/hang-report-<process id>.txt`, and removes the file when the interface answers again. A later launch that finds a report no process holds writes it to the log, keeps it as `logs/hang-report.1.txt` and, unless another start-up message is showing, says so in the status bar. Help › Copy Troubleshooting Info (`help.copyTroubleshootingInfo`) copies the platform facts, the recent commands and frame times, and the reports of this session and the last one. Regressions: `apps/vectorcraft/src/hang_watch/tests.rs`, `crates/ui-egui/src/hang_beacon.rs`, `crates/ui-egui/src/troubleshooting.rs`. Scores and hours unchanged.
|
||||
|
||||
Reference in new issue
Block a user