mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 02:42:47 +00:00
Merge main into fix/svg-filter-messages-tr-labels
This commit is contained in:
@@ -122,7 +122,7 @@ the two can still win that race.
|
||||
| Native file dialogs | any command with no `path` that needs one (`file.open`, `file.saveAs`, `file.place`, exports…) | on macOS (a sheet on the window) and Linux the dialog doesn't hold the window: the call returns `"cancelled"` at once, `ui.inspect` reports `fileDialog`, and when the person at the computer picks a file the command runs again on the document it was asked for. While it is open another dialog is refused: that call returns `"cancelled"` too, and the status bar (`ui.inspect` → `ui.status`) says `"A file dialog is open: choose there first"`; on macOS `app.quit`, `file.close` and `file.closeAll` return that message and the menu bar does nothing (#592, #867). On Windows the dialog is shown in line: the call returns once it closes. Pass `path` to skip the dialog |
|
||||
| Background Save / Export | `app.save`, `app.export {path}`, `file.save`, `file.saveAs`, `file.saveCopy`, `file.exportForScreens {folder, …}` | with the `backgroundSave` / `backgroundExport` preferences on (the default) the desktop app writes the file from a snapshot on a worker thread: the call returns `{path, background: true, status}` at once (`file.exportForScreens`: `{background: true, status}`, and the files are written into the folder from a snapshot taken at the call; an `app.export` given an option the format doesn't read: also `warnings`, naming the option), `ui.inspect` lists the jobs still running in `background` (labels such as `"Saving a.vectorcraft"`), and the document counts as saved (as of the snapshot) once its file is written. Quit and Close wait for them. A job that fails reports the error in the status bar only (`ui.inspect` → `ui.status`), a path outside `--automation-write-root` included. With the preferences off (`prefs.set`), saves return once written. `app.save {path?, wait: true}` and `app.export {path, wait: true}` wait for the jobs already running, write the file before they reply whatever the preferences are set to, and return its result or the error. When the save asks first (the question before replacing a file that opened with losses, or on macOS and Linux the file dialog for an untitled document without `path`), the reply is `{pending}` or `"cancelled"` as before, and the save that runs after the answer uses the preferences. A `wait` that is not `true`, `false` or `null` is refused with "`wait` must be true or false", and nothing is written |
|
||||
| `engine.execute` `file.exportForScreens` | `{}` / `{…document.exportForScreens params}` | without params opens `exportForScreens` on the settings the document last exported with (`document.exportSettings`). While the Artboard tool is in use, the artboards it has selected (its `selected` option, the rows the Artboards panel highlights) are checked instead, and `select` is `range`, or `all` when every artboard is selected. Fields: `tab` (`artboards` \| `assets` \| `layers` \| `selection`; OK reads Export Layer or Export Selection on those), `layers` ([layer id…] checked), `selectionMode` (`one` \| `each`), `name` (the file name pattern of `document.exportForScreens`), `counterStart`, `folders` (`none` \| `rows` \| `format` \| `item` \| `itemFormat`), `exportPreset` (the preset applied last), `__savePreset` (the name typed to save one), `select` (`all` \| `range` \| `full`), `range` ("1-3, 5"), `boards` (a bool per artboard; checking them sets `select` and `range`), `includeBleed`, `folder` (desktop; default the Desktop, else home), `openLocation`, `subfolders`, `prefix`, `preset` (`""` \| `mobile` \| `density`), `formats` (rows `{format, scale: "2x" \| "100w" \| "100h" \| "72ppi", suffix, quality?, folder?}`), `settings` (`{png \| png8 \| jpg \| webp \| gif \| svg \| pdf: {…options}}`, the gear's Format Settings; `__settings` names the format shown). `ui.dialog.confirm` exports (a bad range or no folder keeps it open); on the web OK reads "Download" and the files download (several as one `.zip`). With params it runs `document.exportForScreens`: no `folder` returns the files (or with `zip: true` one zip) as `dataBase64`; with `openLocation` the first file is shown in the file manager. When `warnings` is not empty, an export into a folder or a download shows the first in the status bar as Save As shows a save's notes |
|
||||
| Export for Screens' Assets tab, Asset Export panel | `ui.dialog.set` `tab: "assets"`, `assets: [asset id…]`; `window.panel {panel: "assetExport"}` | on the Assets tab of `exportForScreens` the `assets` field lists the checked asset ids (all of them when it opens); `ui.dialog.confirm` runs `document.exportForScreens {assets}` (nothing checked keeps it open) and OK reads "Export Asset". The Asset Export panel acts through `assets.*` and shares the format rows with the dialog (`assets.settings.set`). The dialog has the format presets menu (☰). In the dialog, `exportPreset` names the preset applied last (`ui.dialog.set` of it applies the preset it names, as picking it does; a name that is not a preset's is an error and leaves the dialog as it was), `__exportPresets` lists the presets, and `__savePreset` holds the name being typed after Save Preset…. The panel menu applies presets through `assets.settings.set {exportPreset}` and holds Save As Preset…, Save Changes, Delete Preset, Import Preset… and Export Preset…. Import and Export use picked files. |
|
||||
| Export for Screens' Assets tab, Asset Export panel | `ui.dialog.set` `tab: "assets"`, `assets: [asset id…]`; `window.panel {panel: "assetExport"}` | on the Assets tab of `exportForScreens` the `assets` field lists the checked asset ids (all of them when it opens); `ui.dialog.confirm` runs `document.exportForScreens {assets}` (nothing checked keeps it open) and OK reads "Export Asset". The Asset Export panel acts through `assets.*` and shares the format rows with the dialog (`assets.settings.set`). The dialog has the format presets menu (☰). In the dialog, `exportPreset` names the preset applied last (`ui.dialog.set` of it applies the preset it names, as picking it does; a name that is not a preset's is an error and leaves the dialog as it was), `__exportPresets` lists the presets, and `__savePreset` holds the name being typed after Save Preset…. The panel menu applies presets through `assets.settings.set {exportPreset}` and holds Save As Preset…, Save Changes, Delete Preset, Import Preset… and Export Preset…. Import and Export use picked files. Its Create Sub-folders and Open Location after Export run `assets.settings.set {subfolders}` and `{openLocation}`; its Format Settings… opens the dialog on the Assets tab with `__settings` set to the first row's format. |
|
||||
| `engine.execute` `file.exportSelection` | `{multiple?}` | File › Export Selection…: collects the selected objects as one asset (`assets.add`; one per object with `multiple: true`) and opens `exportForScreens` on its Assets tab with just them checked → `{assets}`. `document.exportSelection` with params still exports the selection in one go, without the dialog; with no params or `{}` the save panel picks the file and its format's options dialog follows, as after Export As, and the call returns `null` while the dialog is open (OK returns what `file.exportAs` returns, without `format` or `bounds`). `file.exportAs {path, exportSelection: true, …options}` writes the selection without a dialog |
|
||||
| CSS Properties panel | `window.panel {panel: "cssProperties"}`; `engine.execute` `css.copy` / `css.exportFile` | the panel shows `css.selection` of the selection (after Generate CSS, while nothing is selected, `css.generate`); its menu holds the options the commands take (`units`, `position`, `dimensions`, `unnamed`, `rasterize`). `css.copy {scope?, …options}` copies the CSS to the clipboard → `{css, rules}`; `css.exportFile {path?, scope?, …options}` writes `css.export` to `path` (else a picked file; the web downloads it) with the pictures of rasterized art next to it → `{path, rules, images, warnings}`, and the status bar shows `warnings` as Export As shows an export's notes |
|
||||
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE
|
||||
placeholders are translated in turn (the reason after `: {e}` is often a message too). A literal brace in a
|
||||
row is written `{{` or `}}`, in the English and in the translation: a message made with `format!` keeps the
|
||||
doubled braces of its format string, and a plain string literal has each of its braces doubled, so the row for
|
||||
`"expected {\"objects\": [...]}"` is `expected {{"objects": [...]}}`. Czech, German, Greek, Spanish, French, Georgian, Hindi, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Russian, Simplified Chinese, Traditional Chinese, Swedish, Ukrainian, Vietnamese, Finnish, Turkish, Catalan and Dutch
|
||||
`"expected {\"objects\": [...]}"` is `expected {{"objects": [...]}}`. Czech, German, Greek, Spanish, French, Georgian, Hindi, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Russian, Simplified Chinese, Traditional Chinese, Swedish, Ukrainian, Vietnamese, Finnish, Turkish, Catalan, Dutch and Danish
|
||||
translate status and error messages (`COMPLETE_MESSAGES` in `i18n::tests`); the untranslated report lists the
|
||||
message literals the scan finds, and the phrases a parameter schema's error builds at run time
|
||||
(`SCHEMA_PHRASES`), that one of them has no row for. The scan covers the crates in `MESSAGE_CRATES`, the
|
||||
|
||||
@@ -15,7 +15,7 @@ translation never fails a test or a build: the interface shows the English text
|
||||
`cargo xtask ci` prints the untranslated report (`cargo xtask i18n-report` alone), which lists per language the
|
||||
strings missing from each catalog with the `complete_menus` flag and the messages missing from each language in
|
||||
the `COMPLETE_MESSAGES` list. Every non-English language marked "full" has the flag, and all of them except
|
||||
Bosnian, Bulgarian, Danish and Indonesian are in the list. No language has help content: there is no translated (or
|
||||
Bosnian, Bulgarian and Indonesian are in the list. No language has help content: there is no translated (or
|
||||
English) in-app help, and the docs are English.
|
||||
|
||||
**Native review:** every catalog was written clean-room from the English meaning, most of it by agents
|
||||
@@ -55,7 +55,7 @@ plus review. Native-speaker review is human work and isn't in the hours.
|
||||
| Traditional Chinese (Taiwan) | `zh-hant` | 8,820 rows, 3,438 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 40 missing messages for it; menus, `tl!` literals and messages were complete when counted on 2026-10-21 (80% overall) | partial |
|
||||
| Italian | `it` | 8,924 rows, 3,560 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 54 missing messages for it, which open #7116, #7211, #7378 and #7405 translate | full |
|
||||
| Dutch | `nl` | 3,447 `@msg` and 48 `@msgplural` rows (counted 2026-11-13): in `COMPLETE_MESSAGES`, and the untranslated report lists 41 missing messages for it; one/other plurals | full |
|
||||
| Danish | `da` | 5,279 rows, 750 of them `@msg` (counted 2026-10-21): menus and `tl!` literals complete when counted; its messages are partial; one/other plurals | full |
|
||||
| Danish | `da` | 7,422 rows, 1,636 of them `@msg` and 48 `@msgplural` (counted 2026-11-14 on `main` at `edb228ac3`): in `COMPLETE_MESSAGES`, and the untranslated report lists the same missing messages for it as for Greek, Spanish and Finnish; one/other plurals | full |
|
||||
| Russian | `ru` | 4,009 / 4,020 | full |
|
||||
| Ukrainian | `uk` | 8,802 rows, 3,439 of them `@msg` and 48 `@msgplural` (counted 2026-11-13); one/few/many plurals | full |
|
||||
| Hungarian | `hu` | 9,166 rows, 3,444 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 40 missing messages for it, and lists 47 menu strings, 25 `tl!` strings, 11 undo labels and 45 swatch names without a row; one plural form | full |
|
||||
|
||||
+48
-3
@@ -868,6 +868,13 @@ kind takes them when the graph is drawn again. The graph saves the paragraph att
|
||||
`categoriesPara` and `legendPara` in its label styles, and still sets each label's alignment for its place. The legend
|
||||
leaves room for a legend label's stored indents, spacing and leading.
|
||||
|
||||
When a graph is drawn again, its plot moves and scales with any move or scale of the graph made since it was last
|
||||
drawn. The graph saves the bounds of its art other than type as `placedArt` (and the bounds of all of its art as
|
||||
`placed`), and measures the move or scale on those. Changing the size, indents or spacing of the labels, moving a label
|
||||
on its own and `type.createOutlines` on labels do not move or scale the plot. A graph opened from a `.ai` file saves
|
||||
`placedArt` too. A graph saved without `placedArt`, or with a `placedArt` that has no width or height, is measured on
|
||||
`placed`.
|
||||
|
||||
The `appearance.*` commands, `graphicStyle.apply` and `graphicStyle.redefine`, and the paint, stroke, gradient and
|
||||
transparency commands given an `item` (or the Appearance panel's active row) store a graph label's object rows for its
|
||||
kind of label: the paint, weight, opacity and blend mode of its topmost visible fill and stroke row, their order and
|
||||
@@ -8075,7 +8082,12 @@ moving the art moves the crop, and deleting it removes it from its asset (an ass
|
||||
format row of the document's export settings, the ones Export for Screens remembers (`document.exportSettings`); any
|
||||
`formats`, `preset`, `settings`, `prefix` or `subfolders` given win for that export. `assets.settings.set` changes
|
||||
those shared settings (not an undo step); its `subfolders: true` sets Export for Screens' Folders to a folder per row,
|
||||
and `subfolders: false` sets a folder per row back to All in One Folder. `document.exportForScreens {assets: [id…]}` does the same with its own params
|
||||
and `subfolders: false` sets a folder per row (without `exportPreset`, also a folder per format or item) back to All
|
||||
in One Folder. Its `openLocation: true|false`
|
||||
is Open Location after Export, kept in `document.exportSettings` (not in presets). The panel menu's Create Sub-folders and
|
||||
Open Location after Export run these two (sub-folders sort the pictures; `assets.export3D` writes mesh files in the
|
||||
folder itself), and its Format Settings… opens Export for Screens on the first row's format
|
||||
settings. `document.exportForScreens {assets: [id…]}` does the same with its own params
|
||||
(the dialog's Assets tab). An asset's crop, and the crop of `export` with `selection: true`, is the bounds the
|
||||
renderer measures for what the art draws, its effects included.
|
||||
|
||||
@@ -11354,8 +11366,8 @@ A `configure` call that changes no shape records no undo step and returns `{upda
|
||||
## Cutting Tools add-on
|
||||
|
||||
Cutting Tools is a built-in add-on that prepares art for cutting. Its commands are `addon.cutting.bridges`,
|
||||
`addon.cutting.weed` and `addon.cutting.banner`; in the desktop app they are Object › Plug-ins › Cutting Tools › Stencil
|
||||
Bridges…, Weed Box and Lines… and Banner Hems and Grommets….
|
||||
`addon.cutting.weed`, `addon.cutting.banner` and `addon.cutting.nest`; in the desktop app they are Object › Plug-ins ›
|
||||
Cutting Tools › Stencil Bridges…, Weed Box and Lines…, Banner Hems and Grommets… and Nest Shapes….
|
||||
|
||||
### Stencil Bridges
|
||||
|
||||
@@ -11476,6 +11488,39 @@ Banner Hems and Grommets… opens the command dialog with Preview.
|
||||
{"name":"run_command","arguments":{"command":"addon.cutting.banner","params":{"hem":"1 in","grommetInset":"0.5 in","spacing":"2 ft"}}}
|
||||
```
|
||||
|
||||
### Nest Shapes
|
||||
|
||||
`addon.cutting.nest {roll?, width?, height?, margin?, spacing?, rotate?, usePreviewBounds?, artboard?, patterns?}` moves
|
||||
the selected objects close together onto a sheet or a roll of material
|
||||
([packing problems](https://en.wikipedia.org/wiki/Packing_problems)). The ranges, defaults and rules below are
|
||||
VectorCraft's own. The sheet starts at the top-left corner of artboard `artboard` (0-based; by default the artboard
|
||||
under the center of the selection, else the first). It is `width` × `height` points (0 to 1000000 each; 0, the default,
|
||||
takes the artboard's width or height). With `roll` true it is a roll `width` wide with no end, and `height` is not used.
|
||||
`margin` (0 to 100000, default 18) is kept clear inside each edge of the sheet; on a roll, inside the sides and the
|
||||
start. `spacing` (0 to 100000, default 9) is kept between two objects.
|
||||
|
||||
Each selected object is packed by its bounding box: with its strokes and effects, including the reach of shadows, glows
|
||||
and blurs, when `usePreviewBounds` is true (the default), else by its geometry. A group is one object. The tallest
|
||||
objects go first, each where its bottom edge is highest and then furthest left. With `rotate` true (false by default),
|
||||
an object may turn 90° clockwise where that puts its bottom edge higher, or where only the turned object fits; the
|
||||
longest side then decides the order, and a turned object is measured as it is after the turn. A path of a
|
||||
pixel-aligned compound path is not turned. Objects are moved, and turned with `rotate`, never resized. An object on the
|
||||
pixel grid moves by whole points and takes 1 pt more room across and down. Objects that do not fit go in a column to
|
||||
the right of the sheet, from its top, `spacing` from its edge and from each other, in stacking order (back to front).
|
||||
Objects without bounds, such as an empty group, are not moved. `patterns` moves pattern fills and strokes with the art
|
||||
(default: General › Transform Pattern Tiles).
|
||||
|
||||
All of it is one undo step, and nothing changes when no object moves. The command fails when nothing selected can be
|
||||
measured, when the margin leaves no room on the sheet, when no selected object fits, with more than 10000 objects
|
||||
selected, and with bad params. Result: `{placed, unplaced, rotated, skipped, length}`: the number of objects placed,
|
||||
the ids of the objects put beside the sheet, the ids of the objects turned, the ids of the objects without bounds, and
|
||||
the length of material used in points, from the sheet's top edge to the margin below the lowest object placed. Nest
|
||||
Shapes… opens the command dialog with Preview.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"addon.cutting.nest","params":{"roll":true,"width":"24 in","margin":"0.25 in","spacing":"0.125 in","rotate":true}}}
|
||||
```
|
||||
|
||||
## Color Effects add-on
|
||||
|
||||
Color Effects is a built-in add-on: its effects are colour adjustments in Effect › Color Effects, its command is
|
||||
|
||||
File diff suppressed because one or more lines are too long
+7
-3
@@ -163,7 +163,8 @@ The rest is our reading:
|
||||
depths where they overlap, with caps on or off. A fill wall in a gap stays in its own depth order. Inflate's
|
||||
curved surfaces follow this only as closely as their flat facets do. A solid painted with a gradient that has
|
||||
transparent stops under a light that is not white is drawn with an opacity mask: its faces keep their places in
|
||||
this order, in runs that each carry the mask, and so do its graphics. A member of a 3D group with its own opacity
|
||||
this order, in runs that each carry the mask, and a graphic drawn after one of its faces carries the mask too
|
||||
([Graphics](#graphics)). A member of a 3D group with its own opacity
|
||||
mask or blending mode draws its fill's and strokes' faces in this order inside that mask or blending mode when
|
||||
they are opaque with Normal blending. Otherwise each solid is drawn on its own with its opacity and blending, the
|
||||
lower item's first. With a light that is not white, a puffed, shaded Inflate surface in a solid color takes its
|
||||
@@ -389,8 +390,11 @@ These rules are VectorCraft's own:
|
||||
turned, foreshortened by the perspective and twisted and tapered with the face, and clipped to it. It is shaded
|
||||
with the face's light: each color is multiplied by the light that falls on the face, except in pattern tiles,
|
||||
which keep their own colors. It is drawn with the
|
||||
opacity and blending mode of the fill or stroke the face is painted with. A graphic on a face turned away from
|
||||
the viewer is not drawn.
|
||||
opacity and blending mode of the fill or stroke the face is painted with. Solids whose fills and strokes have the
|
||||
same opacity and blending mode share one graphic on each face, clipped to their faces there and drawn after the
|
||||
last of them. An object's fill and stroke share it when the fill is drawn with an opacity mask too, and the
|
||||
graphic takes the mask of the solid it is drawn after; members of a 3D group drawn with a mask keep graphics of
|
||||
their own. A graphic on a face turned away from the viewer is not drawn.
|
||||
- On the back cap, X runs to the right as the back is seen from behind, so the graphic reads the right way round
|
||||
there.
|
||||
- On Revolve a graphic lies on the swept side, which has one face (Front), unrolled flat. X runs around the axis:
|
||||
|
||||
Reference in New Issue
Block a user