Actions: Batch… stays in the Actions panel menu, as the reference app has it (#1938)

This commit is contained in:
bflatastic
2026-10-16 04:55:01 +07:00
parent 0fe70314b8
commit 08dde8783e
5 changed files with 8 additions and 8 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
//! `action.batch`: play an action's commands on every file in a folder, or on every data set
//! of the open document (File › Automate › Batch / the Actions panel).
//! of the open document (the Actions panel menu's Batch…).
//!
//! Public options follow the Batch dialog: source Folder or Data Sets; destination None,
//! Save and Close, or Folder; Override Open / Save / Export. Cited:
@@ -324,7 +324,8 @@ fn is_openable(path: &str) -> bool {
OPEN_EXTS.iter().any(|e| *e == ext) || FORMATS.iter().any(|f| f.read && f.extensions.iter().any(|e| *e == ext))
}
#[cfg(all(test, not(target_arch = "wasm32")))]
#[cfg(test)]
#[cfg(not(target_arch = "wasm32"))]
mod tests {
use super::*;
use serde_json::json;
+2 -2
View File
@@ -1,6 +1,6 @@
//! Document file I/O for every frontend (desktop, web, CLI, control channel, headless MCP): open,
//! save, export and serialize by path or bytes (base64), the format table, `command.batch` and
//! `action.batch` (File › Automate › Batch / the Actions panel).
//! `action.batch` (the Actions panel menu's Batch…).
//!
//! - `load`: `document.open` (native, legacy, SVG/SVGZ, PDF/.ai/.ait, DXF, raster images).
//! - `action_batch`: play an action on every file in a folder or every data set.
@@ -152,7 +152,7 @@ pub fn specs() -> Vec<CommandSpec> {
cmd!(
"action.batch",
"Batch…",
["File", "Automate"],
[],
None,
"{commands: [{command, params}] (the action's steps), source?: folder (default) | datasets, folder? (required for folder: the source folder), includeSubdirs?: false, destination?: none (default: leave each file open) | saveAndClose (save over the source and close) | folder (save or export into destinationFolder and close), destinationFolder? (required when destination is folder; also the folder Override Save/Export write into), overrideOpen?: true (skip document.open / file.open steps: the batch opens each source file), overrideSave?: true (point document.save / file.save / file.saveAs at destinationFolder/{stem}.{ext}), overrideExport?: true (point document.export / document.exportForScreens / document.exportSelection the same way), stopOnError?: true, label?} play the commands on every readable file in folder (and its subfolders when includeSubdirs), or on every data set of the open document (source: datasets; File + Data Set Name for Override Save/Export). Caps: 500 files or data sets, 8 folder levels, 256 steps. Batches cannot nest. → {processed: [{path|dataset, result|error}…], count, failed, stopped}",
always,
+1 -1
View File
@@ -1,4 +1,4 @@
//! Actions panel › Batch… / File › Automate › Batch: play the selected action on every file in a
//! Actions panel menu › Batch…: play the selected action on every file in a
//! folder, or on every data set of the open document (`action.batch`).
use serde_json::{Value, json};
-1
View File
@@ -2207,7 +2207,6 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec<Item>)> {
c("Export Selection…", "file.exportSelection"),
Sep,
c("Package…", "ui.packageDialog"),
sub("Automate", vec![c("Batch…", "ui.batchDialog"), todos("Scripts…", "")]),
sub("Scripts", vec![c("Check Script…", "ui.checkScript"), todos("Other Script…", "Cmd+F12")]),
Sep,
c("Document Setup…", "file.documentSetup"),
+2 -2
View File
@@ -991,7 +991,7 @@ already walks Image Trace. Short agent entry points:
`dataset.select`.
- Batch: `action.batch {commands, source?: folder|datasets, folder?, destination?: none|saveAndClose|folder,
destinationFolder?, overrideOpen?, overrideSave?, overrideExport?, includeSubdirs?, stopOnError?}` plays an
action on every file in a folder or every data set (File › Automate › Batch…).
action on every file in a folder or every data set (the Actions panel menu's Batch…).
- Variables: `variable.list`, `variable.define {name, kind: text|visibility|graph}`, `variable.bind {variable, ids?}`,
`variable.makeTextDynamic`, `variable.makeVisibilityDynamic`, `variable.makeGraphDynamic`, `variable.unbind`,
`dataset.new` / `dataset.set` / `dataset.select` (graph values are CSV as `graph.setData`).
@@ -1801,7 +1801,7 @@ for `edit.pasteInPlace`, `edit.pasteInFront` and `edit.pasteInBack`, and to each
none, when the step runs. When the document a step runs in has no artboard at that index (for example, after an
earlier step deleted the active artboard when it was the last one), the step gets that document's last artboard. In
remote mode, MCP's `run_command` calls and each step of the `command_batch` tool get the active artboard too. The
Actions panel plays an action as a `command.batch`. File › Automate › Batch… and the Actions panel's Batch… run
Actions panel plays an action as a `command.batch`. The Actions panel menu's Batch… runs
`action.batch`: the same steps on every readable file in a folder (or every data set of the open document), with
destination `none` | `saveAndClose` | `folder` and Override Open / Save / Export. Caps: 500 files or data sets, 8
folder levels, 256 steps. An action recorded in the Actions panel leaves the artboard out,