A recorded save in the template format writes a copy and leaves the
document's file as it was, so it no longer clears the warning or the
refusals. A recorded Save or Save As with its own path gives a never-saved,
converted or restored document its file before Save and Close, so the
batch runs and warns that every data set saves over that one file.
With a destination folder and Override Save on, a recorded Save or Save As
step writes each data set to its own file in that folder and makes that
file the document's own, so Save and Close then saves each data set to its
own file. The batch no longer warns that every data set saves over one
file in that case, and no longer refuses a document that was never saved,
converted or restored, since the recorded step gives it a file first.
A recorded PDF, EPS, DXF, Save for Web or Save for Office Documents step
that gives a `path` writes the same file for every data set, because the
batch does not point these steps into the destination folder. The one-file
rule now counts them, so the dialog and `action.batch` warn.
Save and Close over the data sets of a document converted from an older
version or restored by Data Recovery is refused with "save the document
with Save As before Save and Close" before a data set is selected. Saving
such a document does not write its file, so the batch reported success
without saving anything. The message has a row in each of the 26 catalogs.
Batch… with a Data Sets source offers None, Save and Close and Folder again.
Save and Close saves the open document over its own file after each data
set. When every data set saves over the same file, the dialog shows a
warning and `action.batch` returns `warning`: with Save and Close, or with
a recorded step that writes a file and that the batch does not point into
the destination folder. A Save step without a path counts when it writes
the document's own file; Save As, Save a Copy, Save as Template and Export
steps count when they give a path; Export for Screens counts when its
folder, given or from its preset, names a folder. Save and Close over the
data sets of a document that was never saved is refused with "the
document has never been saved" before a data set is selected.
Data sets share one open document, so Save and Close saved every data set
over the same file and only the last one survived. action.batch now
returns an error for source datasets with destination saveAndClose before
it selects a data set or runs a step, and the Batch dialog offers None and
Folder for a Data Sets source, moving a Save and Close choice to Folder.
The Generic CMYK solver clamps each ink to 0..1 after a step. When an
ink sits at 0 or 1 and the step pushes it further out, the clamp
removes most of the step, and the solve can stop after a step under
1e-6. Where it stopped depended on the input's last float bits. For hex
ed1e79, magenta ranged from 93.2% to 93.9% and yellow from 15.3% to
16.3% over 4,001 f32 values of its red, with 230 jumps over 0.001
between neighboring values.
An ink at 0 or 1 whose descent direction points out of the range now
stays where it is, and the step moves the other inks. The solve stops
when every ink is held. Two new tests step a channel one f32 at a time
and check that every ink stays within 0.001: the red of ed1e79 (cyan
held at 0) and the blue of sRGB (0, 0, 0.25) (cyan and magenta held at
1).
The solver still minimizes plain Lab distance to the gamut-mapped
target. The CMYK values of many RGB colors change; hex 00ff00 now
separates to C=61 M=0 Y=100 K=0 (cyan 0.6235 before, 0.6064 now), and
the swatch test that pins its name is updated.
A grants.json entry this version can't use (a permission it doesn't know,
an invalid id) is now skipped on its own instead of dropping every grant in
the file, and recording or removing a grant writes it back unchanged,
except an entry for that plug-in. A grants.json that is too large, can't be
read or is not a JSON list is left as it is, and a rewrite that would pass
the 1 MiB read limit is written compactly, or not at all.
A plug-in whose manifest gives "api": 2 and lists the new `progress`
permission may import three host functions from module `env`:
vc_progress(done, total), vc_cancelled() -> i32 and
vc_log(level, ptr, len) -> i32. Installing checks every import and
refuses, by name, one the host doesn't offer, one with another type and
one the manifest doesn't allow.
- Progress is clamped and passed on once per tenth of a percent (past
2,000 reports, once per 1,000 changes). A heavy filter's progress
window and the export's progress window show it as a percentage bar,
and their Cancel makes vc_cancelled return 1. A live effect's progress
is not shown.
- A run cancelled before it returns ends as cancelled, and one that
returns after its time budget ran out ends at that budget, so what a
plug-in returns after it sees vc_cancelled changes nothing. This also
applies to a plug-in of API level 1 that finishes after a Cancel or
past its time budget.
- Log text must lie in the module's memory and be UTF-8. Lines go to the
app's log as "<id>: <text>" with hidden characters escaped, at most
1,024 characters a line, 200 lines and 32 KiB a run, and the host reads
at most 1 MiB of log text a run.
- plugin.list and plugin.info give the manifest's `api`; the install
prompt names the new permission in plain words.
Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
The Links panel's Relink... button and menu item open a Relink dialog
(ui.relinkDialog) with a Replace menu. Selected Instances relinks the
selected images and placed documents, as Relink did before. All
Instances also relinks every other object in the layers linked to the
same file. Missing Links from This Folder relinks the selection to the
chosen file, then every other missing link to the file of its name in
that file's folder, and the status bar names the files not there. Each
Link Separately asks for a file for each selected link in turn, one OK
each, and relinks them all at the last one: the dialog has one row per
linked file, and each selected embedded image gets a row of its own.
Every choice is one undo step.
links.relink takes scope: selected (default), all, missingInFolder
(with path) or each (with paths: [{ids, path}] in place of ids, path
and folder). A scope or paths that doesn't fit is an error and relinks
nothing. With copy, every file is read and checked before any is
copied, copies made before a failed copy are removed, and
missingInFolder looks for missing images only.
Docs: params text, docs/mcp.md, docs/control-protocol.md,
docs/target-app-parity.md. Catalog rows for the new labels and messages
in every catalog.
A paint linked to the built-in Registration swatch is no longer relinked
to a new global swatch of the same color, so it keeps printing on every
plate. The same rule applies to New Color Group from artwork with
global swatches.
Add Used Colors, New Color Group from artwork and Select All Unused
looked up each linked paint's swatch by searching every swatch. They now
build one map of swatch names first, with the built-in Registration
swatch, and the first swatch of each name as before.
New tests and test cases: New Color Group from artwork with repeated,
near-equal and -0.0 colors, a Registration link and names that need
numbering, and New Swatch and Edit Color Group with near-equal and
-0.0 colors; each checks the names, their order and one undo step.
New Swatch with several colors, New Color Group and Edit Color Group's
extra colors searched every swatch and group for each candidate name
of each new swatch. They now build the set of taken names once
(FreeSwatchNames, with take_new for New Swatch's default names and
insert for the group name and the group's own swatches) and keep it up
to date as they add swatches. The names they give are unchanged.
swatch.unused grouped the gradients in use by their stop colors and
compared each gradient swatch with every gradient in its group, so
gradients that share stop colors but differ in offsets, midpoints,
opacity, kind, method, dither or links still took quadratic time. Each
gradient now has a key that is equal exactly when the gradients are
equal: kind, method, dither, and each stop's offset, color, opacity,
midpoint, link, tint and process plates. The gradients in use go into
one hash set, and each gradient swatch is looked up in it.
swatch.addUsedColors and swatch.unused searched lists inside loops over
colors and swatches, checking each color against every color or swatch
before it. They now keep the same ordered lists and use hash sets and
maps for membership and lookup. A color's key is its model and the bits
of its components with -0.0 read as 0.0, so the key agrees with `==`; a
color with a NaN component matches nothing, as before.
Add Used Colors names its new swatches through
Document::free_swatch_names, which collects the taken swatch and color
group names once and gives the same names free_swatch_name gives when the
swatches are added one at a time. The added swatches, their names, order
and links, the undo step, and the swatches Select All Unused lists are
unchanged.
A manifest may list `permissions` (doc.read, doc.write, state,
effect.render, export.write) and an `api` level. doc.read, doc.write
and state follow the capability model proposed in
storytold/photocraft#662; the other names are VectorCraft's own. An
unknown, reserved, duplicate or wrong-kind name is refused by name. A
manifest without the key gets the permissions its kind implies and
installs as before.
- Install Plug-in... and File > Open show the name, id, version, file
SHA-256 and each permission in plain words, with control and
bidirectional characters escaped and each string cut to 64
characters. OK installs the module only if it still has the SHA-256
shown; Cancel installs nothing. The heavy-budget prompt and the
status line show the escaped name too, and OK keeps the `replace` it
was given.
- `plugin.install` needs `grant` listing every permission, and
`plugin.inspect` reports `needsApproval`. `hash` pins the module:
one with another SHA-256 is refused. The grant is kept with the
module's hash in the store's `grants.json`, and only that store's
grants count while it is attached; the same set does not ask again,
more permissions do, and `plugin.remove` forgets it.
- The Additional Plug-ins Folder and `plugin.reload` install only
plug-ins the attached store has granted and report the others as
needing approval. At startup the store skips an ungranted plug-in.
- A filter run without doc.read is given no objects; without state it
neither reads nor writes `documentData`; without doc.write an output
that changes the document is refused and the document is unchanged.
Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
An envelope mapped type from its laid-out box: ascent to descent for
point type, the frame for area type. The distorted glyphs then filled
less of the envelope than other art does, with room above the capitals
and below the baseline.
The envelope now maps type from the bounds of its glyph outlines,
underlines and strikethroughs when the type is on its own, in groups
and layers, or used as a clipping path. Inline graphics count by their
boxes. Rotated type and type in perspective map from their outlines as
they are drawn. Make with Mesh,
Make with Top Object and Reset with Mesh without Maintain Shape use
those bounds. Type that draws nothing keeps its laid-out box, and so
does type inside any other object, such as a blend, a repeat or a
symbol instance. Shrink Text to Fit type is measured as it is laid out
on the page.
vectorcraft-text's envelope_ink measures the type, and
register_envelope_ink registers it with the document crate. The engine
session, Renderer::new, live evaluation in vectorcraft-effects and the
.ai reader register it. The document crate keeps the measured boxes per
thread, by object and by a hash of the content, and measures again when
the type, the fonts, the hyphenation exceptions or the transform's
scale or rotation change.
This is VectorCraft's own rule. Envelopes of type made in VectorCraft
and in saved files map from the glyph outline bounds instead of the
type's laid-out box, so they redraw differently.
Holding a single-key tool shortcut becomes temporary: releasing it
returns to the previous tool (a quick tap still switches for good).
With the Pen chosen, holding S chooses Scale; letting go of S after
0.25 s or more, or after Scale was used while S was down, chooses the
Pen again. A press shorter than 0.25 s, with nothing done in between,
keeps Scale chosen as before. The 0.25 s threshold is VectorCraft's own
value. A Cmd/Ctrl click, which the selection tool takes, does not count
as using Scale. A drag of the Hand, Zoom or Rotate View tool chosen
this way counts as using it.
A key let go during a drag, with the pointer button held or with a
dialog open, goes back once that ends. A key let go while the tool
waits for its next click (the Dimension tool after its first point)
goes back once the tool finishes or is canceled. With S held from the
Pen and then V held, letting go of V returns to Scale, and letting go
of S then returns to the Pen. Choosing a tool on the toolbar or from a
menu while the key is down, the held tool included, ends the hold and
keeps that tool, and so does the window losing the keyboard.
While the preference is on, the key's repeats do not choose the tool
again.
The new General preference Hold a Tool Shortcut to Use the Tool
Temporarily (`holdToolKeys`, on by default) turns the behavior off.
With it off, every press and every repeat chooses the tool, as before.
Its label has a row in every catalog.
Docs: docs/mcp.md, docs/target-app-parity.md.
Commands that read `id` and otherwise act on the selection, the highlighted
layer row or a new object read it with a lenient helper, so `{"id": "abc"}`,
`true` or `{}` acted on the selection instead. They now read it with
`object_param`, which refuses any value that is not a non-negative integer
with "`id` must be a whole number" under the command's name and changes
nothing; an omitted or null `id` keeps the default.
Commands: object.isolate, layer.locate, layer.releaseToLayers,
graphicStyle.new and redefine, charStyle and paraStyle new, apply and
redefine, image.info, links.info, links.goTo, links.unembed, shaper.release,
shaper.expand (whose errors now carry their own name),
transparency.editOpacityMask, transparency.viewOpacityMask, symbol.edit, the
object.blend.spine commands, path.curvature and the type commands that read
type ranges.
targets() read `id` as an object only when it was a number. Any other
value ("abc", "5", true, {}, [1]) fell through to the selection, so a
command such as css.export, whose `id` the shared check does not read,
acted on the selected objects instead of failing. targets() now reads
`ids` and `id` through named_ids(): a value that is not a non-negative
integer is an error, and an omitted or null `id` still means the
selection. A numeric string is refused, as it already is in `ids`.
effect.apply and appearance.addEffect accept the effect as `id` when
`effect` is left out; they now read their targets with that `id` set to
null, so the effect still applies to the selection as before.
The panel opens from Window › 3D and Materials (window.panel {panel:
"threeD"}). Its object types Plane, Extrude, Revolve and Inflate apply
Rotate, Extrude & Bevel, Revolve or Inflate to each selected object
without a 3D effect, and change the 3D effect of each other selected
object in place, all as one undo step. Below them are the effect
dialog's Object, Rotation and Lighting tabs with the same controls.
A changed setting goes to every selected 3D effect that takes it, as
one undo step; a drag previews and records one step on release, and a
change of selection during a drag commits it first, and so does closing
or hiding the panel. A setting the
selected effects hold with different values shows its default with its
reset dot filled. A light list edit reaches only the objects whose list
matches the first object's.
effect.setParams takes threeDType (plane, extrude, revolve, inflate):
the settings both effects take keep their values, rotation angles wrap
into -180..180 outside Revolve, and the rest start at the new effect's
defaults. Another value, or a non-3D effect at index, is refused; the
type an effect already has, with nothing else to change, records no
undo step.
Materials, shadows and ray-traced rendering are not part of this.
Docs: docs/three-d.md, docs/mcp.md, docs/effects-parity.md,
docs/target-app-parity.md.
Fixes#3672
document.open, file.place and document.pdfInfo read cropTo (and its
older name crop), password, colorMode and textAs as strings and used
the default when a value was not a string, so "textAs": true or
"colorMode": 5 opened the file with the defaults. They now return an
error naming the param, and nothing opens or is placed. A wrong crop is
refused even when cropTo is given. document.pdfInfo also rejects a
thumbnailSize that is not a number, with or without a thumbnail.
Leaving a param out or giving null keeps its default, and an empty
password still means no password.
charStyle.load, paraStyle.load and textStyle.loadAll imported the styles
into a copy of the document to see whether anything changed, then ran the
same import again inside the edit. The edit now takes the copy the first
import made. While a typing session is open the import still runs inside
the edit, because the edit ends the session first and that can change the
document.
Matching a loop of definitions parsed the document's brush library again
for every comparison, and placing brushes in use order parsed it again for
every brush. Each now reads it once.
The params text and docs/mcp.md now say that the symbols and brushes the
patterns use come along, that `skipped` lists names in the file, and that
charStyle.load and paraStyle.load list only the styles of their own kind.
When the document has a loop of styles and patterns under one set of names, its styles
were still matched one by one, so a style could be matched to another copy with the same
attributes and the pattern then compared with the wrong style name. Each definition of
such a loop is now the document's under the name found for it.
A brush whose art sets type in a style renamed on the way in was compared before the
rename was known, so loading the file again added the brush and what uses it again.
Loading now places brushes with the styles, symbols and patterns, each after what it uses.
Paste keeps its order.
A style that paints with a pattern whose type is set in that style could be matched to the
document's style of the same name and attributes while the pattern came in under a free
name, so the loaded style painted with the document's other pattern. When the document does
not have such a loop under one set of names, each of its styles, symbols and patterns is now
added.
The names a loop of styles and patterns has in the document were searched by trying every
combination, up to 256, so a loop of nine with a numbered copy each was not matched and a
repeat load added it again. The names are now picked one definition at a time, comparing each
definition as soon as the names of those it uses are picked.
A loaded character style kept a size, scale, leading, shift or stroke width that
charStyle.new refuses. Such a style is now skipped and listed in the reply's skipped names.
Load Character Styles and Load Paragraph Styles left out every style of the other kind,
so a pattern that a loaded style paints with kept a reference to a paragraph or character
style the document did not get. The styles of the kind not loaded now come along when such a
pattern or symbol sets type in them, renamed like any other.
The order in which styles, symbols and patterns are placed is worked out from one graph of
their uses instead of scanning every definition left in each round.
Loading styles placed every definition in a loop of uses, and everything that used one, in one group and tried the product of all their candidate names under one cap of 256. Separate loops multiplied: nine self-referencing patterns, each in the document under its name and as a numbered copy from an earlier load, gave 512 combinations, none were tried, and a repeat load added more numbered copies. One loop with no candidate stopped every other loop from matching.
The loops are now the strongly connected components of the uses among those definitions. Each loop is matched with its own search and cap, and a definition that only uses a loop is placed after it, with the loop's names known.
The Character Styles and Paragraph Styles panel menus get Load Character
Styles... or Load Paragraph Styles..., and Load All Styles..., which add the
styles of a document picked in an open dialog in one undo step
(charStyle.load, paraStyle.load, textStyle.loadAll). The swatches,
patterns and symbols the styles use come along as Paste brings them, in
use order, so a style or pattern renamed on the way in keeps its links.
A style the document already has, under its name or a numbered copy of
it, is not added again; another style whose name is taken is added under
a free name. The file's Normal styles, and styles with a blank name or
attributes that do not read, are not loaded.
Smooth Color now counts the steps between each pair of keys from the
keys' colors and visible bounds, which changes the step count of most
Smooth Color blends. The counts are VectorCraft's own values:
- When the keys' solid fills or strokes differ (in groups, member by
member; in text, run by run), the count is 255 times the largest
change of one channel as a fraction of its range, a half step
rounding down, from 1 to 254. An RGB channel's range is 256 values,
CMYK and gray count in percent, and two tints of one swatch by their
tints. It is at most eight per point of the largest of the keys'
widths and heights and the distance between their centers. Black to
white was 128 steps and is now 254.
- When the colors match, a solid paint meets no paint, or a key holds
a gradient or a pattern, the count is the largest distance between
corresponding visible bounding-box edges divided by the keys' mean
width or height, rounded, less one, from 1 to 1000. Two 20 pt
squares 200 pt apart were 100 steps and are now 9.
Keys without bounds make the color count when their colors differ,
and 1 step otherwise.
A blend nested in another blend's keys counts toward the step limit
by its color steps when its colors differ, and as up to 1000 steps
when they match (256 before). An outer blend of 200 steps between two
such same-color Smooth Color blends now draws 99 steps.
A Smooth Color blend in an .ai file whose drawn steps follow this rule
now opens as a live blend.
Blend Options: https://web.archive.org/web/20241217212108/https://helpx.adobe.com/illustrator/using/blending-objects.html
Docs: docs/mcp.md, docs/target-app-parity.md.
A non-null `colors` that is not an array now gives "`colors` must be an array of colors, not ..." instead of the generic "bad color ...", with a row in every catalog. The loadProfile and removeProfile refusal tests also check that no profile is loaded or removed and the settings are unchanged.
A colors value that is not an array, such as "#fff" or 5, was ignored and the command checked the selection or the whole document instead. It is now an error. A null colors still checks the selection or document, as an omitted one does.
The color management commands read their params with helpers that fell
back to the default for a value of the wrong type, so "bpc": "no" kept
the old setting, "on": "true" toggled the view and "convert": "no"
converted the colors. They now go through switch_or and text_param:
such a value is an error and nothing changes. Omitting a param or
giving null keeps its default.
- edit.colorSettings: rgb, cmyk, intent, bpc
- file.documentColorMode (and its alias): convert, intent, grays,
checked before the early return for the current mode; PDF import's
grays reads the same way
- color.convert: to, intent
- color.loadProfile: path; color.removeProfile: name
- view.proofSetup: target, intent, simulatePaper, proof
- view.proofColors and view.overprintPreview: on
- view.separationsPreview: on, only, toggle, and plates, which must be
an array of plate names
- swatch.setSpot: name, spot
With an unclipped raster/vector balance between 0 and 100, a group that
splits into more than 10^(balance/20) regions is rasterized whole and
none of its regions are used. The region build now stops at the first
region past that limit (pathops `regions_within`) instead of building
every region and then discarding them. Groups at or under the limit,
and every group with Clip Complex Regions on, still build every region.
Flatten Transparency, the flattened document and EPS export come out
the same as with every region built, for groups under the limit, at it,
just over it and far over it.
A corner tile was turned so that its x axis followed the mean of the
directions the path arrives and leaves in. A tile drawn as a right-angle
corner then came out turned 45° at every corner, so a rectangle drew its
corners as diagonal chevrons.
Outer and inner corner art are now both read as the corner that joins a
side tile on its right to one below it, as in the help's steps for
making corner tiles. Each corner tile is turned so that those two arms
meet the sides: on a rectangle the tile is square to the side tiles and
turns 90° from one corner to the next, and at other angles it is turned
halfway between the two sides. The arms follow Flip Along and Flip
Across, and a corner that takes the other kind's art turns it the same
way. Which art each corner takes is unchanged.
The PatternBrush field docs, the brush.options params text, docs/mcp.md
and the progress doc describe how corner art is drawn.
object.envelope.makeWithWarp, resetWithWarp and options read `style`
and `orientation`, and options read `preserveShape`, as text and
ignored any other value, so `{"style": 5}` kept the default style and
`{"orientation": "diagonal"}` kept the current orientation. They now
return "`style` must be a string" or "`preserveShape` must be a
string" for a value other than text or null, and "`orientation` must
be one of horizontal, vertical" for any other orientation, through
the shared `choice` helper. object.envelope.options checks the warp
keys whatever is selected, so a call with no envelope or only mesh
envelopes selected gets the same errors, an unknown style name
included. Omitted and null values keep today's defaults.
Docs: docs/mcp.md, docs/target-app-parity.md.
On open, a link found away from its path was passed to the same file's links in symbols, graph designs, patterns and opacity masks only when the nested link equaled the layers' link field for field. A nested link without a relative path, as documents saved before kept them, then kept the old path. The new path now goes to every nested object that shows the same file and content.
Update Links, and opening a document with Update Links: Automatically,
now read a modified file again for the images and placed documents in
symbols, graph designs, patterns and opacity masks that show the same
content as the objects read in the layers. By default Update Links also
reads the files that only that art shows. Each nested object takes the
file's place as its own Placement Options say, including the clip, and
its link takes the new path, size, modification time and hash.
Saving a document also refreshes the placed copies of it inside symbols,
graph designs, patterns and opacity masks of the other open documents,
not only those in the layers.
Relink, Embed and Unembed still change only the objects they are given.
A save wrote the path relative to the document only for linked images and
placed documents in the layers. Links inside symbols, graph designs,
patterns and opacity masks kept only their absolute path, so after the
document and its files moved to another folder together, those files were
not found.
- The save sets the relative path of every link the document holds.
- On open, a link inside that art whose file was found away from its path
takes the new path, as a link in the layers does, so the next save
writes the right relative path.
- Document::update_links_where changes only the links it picks and copies
only the nodes on the way to them.
Docs: docs/mcp.md (Linked images), docs/target-app-parity.md.
With Fade Region Outside Artboard on, the canvas now draws the fade over the
art as well as the pasteboard: one mesh of black at 40% opacity covers the
canvas outside the artboards, so the pasteboard and any art on it show each
channel at 60% of its value, and art inside an artboard is unchanged. It
replaces the darker pasteboard fill.
Artboard Options sets the Global checkboxes' preferences only after
artboard.setProps or artboard.new succeeds. When the artboard command
refuses a value, the preferences stay as they were and the dialog stays
open. A Global value that is not true or false is refused before anything
changes.
Docs: docs/mcp.md, docs/target-app-parity.md.
Artboard Options gets a Global group with Fade Region Outside Artboard and
Update While Dragging. Both are application preferences
(fadeRegionOutsideArtboard, artboardUpdateWhileDragging), on by default and
also listed under Preferences > General > Artboard Options.
While the Artboard tool is active, the canvas draws the pasteboard with each
color channel at 60% of its value. With Update While Dragging off, the
pasteboard draws as usual while the tool moves or resizes an artboard and
darker again when the drag ends. Exports and print do not change.
Docs: docs/mcp.md, docs/target-app-parity.md.