A Cmd press with the Selection tool now selects behind on a group that
holds a selected member, as it does on a selected object, so repeated
Cmd-clicks on grouped art reach the object behind the group. A path's
segments no longer keep the press for Direct Selection, so a Cmd-click
on a selected stroke-only path selects behind it. Select Behind needs
another object under the pointer: on a lone object the press is lent.
The bounding box's handles and rotate zones also lend the press.
- A double-click that follows a Cmd-click selecting behind keeps what
that click selected, without isolating or editing, also when the
press and the double-click come in one frame. After an edit or a
selection change, or after a press that drags or is released away
from where it began, it is an ordinary double-click.
- Whether a press selects behind is kept for the pointer's position
while the document, the selection, the live inputs and the hit-test
settings stay as they are, so the cursor, the canvas marks and the
press do not walk the document again. A layer or group effect that
draws art widens the area checked; raster effects and color
adjustments do not.
- The selected blends' spines are built once per check.
- The status bar and the help bar name the tool a press at the pointer
takes, which is the Selection tool where the press selects behind,
and they are drawn again when it changes. The canvas drops a hover's
decision once the tool, the selection or a preference it depends on
changes.
Docs: docs/mcp.md (pointer_gesture, and Cmd+Alt with Direct
Selection), docs/control-protocol.md, docs/ui-parity.md,
docs/target-app-parity.md.
Every mesh the 3D effects build now carries texture coordinates for
each corner and a part for each triangle (front, back, side, front
bevel, back bevel, end cap, cut side). Corners shared by two bands of
one bevel take the mean of the bands' normals unless the bevel turns
there by 60 degrees or more or a band lies flat toward the front or
back, and Inflate's puffed front and back keep the surface's own
normals. The vector facets do not change.
- Caps, Rotate's plane and Inflate's front and back map the art's
bounds; walls and bevels run u along each contour and v from the
front cap's edge to the back cap's; Revolve's side runs u around the
sweep and v along the profile.
- OBJ, glTF and USD write every corner's texture coordinates, not only
those of faces with mapped graphics.
- Mesh::join checks its index offsets, and joining or exporting a mesh
whose lists do not match or that holds a value that is not a number
is an error.
Docs: docs/three-d.md (3D meshes), docs/mcp.md, docs/effects-parity.md,
docs/target-app-parity.md.
PageItem.remove() and PageItems.removeAll() checked only whether the
object and its layers and groups were shown and unlocked, then passed the
ids to edit.clear, which deletes named objects without checking artboard
locks. Both now throw "cannot delete objects on a locked artboard" with
the object ids and delete nothing, as art on a locked artboard is not
editable elsewhere in the document.
The dialog read artboardLayout's rows and columns as whole numbers only,
so a value stored as a float (4.0 from ui.dialog.set) fell back to the
stored columns while file.new made the grid from it. The dialog now reads
both as file.new does: a number of 1 or more, rounded and kept to the
artboard limit.
A color a library pattern's art brings now skips the library's numbered
names while the pattern is imported, instead of being renamed after the
import. The rename also rewrote every other paint in the document linked
to the name the import first gave, such as art still linked to a deleted
"Ink 2", so adding the pattern changed that art. Now the names are held
with placeholder swatches during the import and removed afterwards, and
links that were already in the document stay as they were.
A pattern whose art brings both "Ink" and the library's "Ink 2" keeps the
library's "Ink 2" under its own name when the document gives "Ink"
another color, and the library's "Ink" takes the next free name. A library
pattern with a numbered name, such as "Tiles 2", keeps that name when the
document does not use it.
A global or spot color that a library pattern's art brings under a
numbered name no longer takes a name the library gives another swatch.
Before, adding a pattern whose art uses "Ink" to a document with another
"Ink" brought the color as "Ink 2" even when the library has its own
"Ink 2"; adding that library swatch next then came in as "Ink 2 2". The
brought color now takes the next free name the library does not use
("Ink 3"), and every paint linked to it follows the new name, so adding
the library's "Ink 2" next adds it under its own name and adding both
again adds nothing.
A color the pattern's art brings or takes is the color a library tint
or gradient links to only when it has the library color's paint and its
process, global or spot kind, as for the other lookups in the same add.
The test a_numbered_copy_named_like_another_library_color_is_found now
makes the blue "Ink 2" itself, as an earlier version's pattern add left
it, since a pattern add no longer gives that name.
Setting selected to true or false runs select.add or select.toggle for that one object, so the
other objects keep their direct-selected anchors and segments and the key object. Before, it
replaced the selection with whole objects.
A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt
changes the action during the press, the end goes through the protractor's tick again for the
new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the
pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the
next drag. This also covers a press that has not dragged.
A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt
changes the action during the press, the end goes through the protractor's tick again for the
new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the
pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the
next drag. This also covers a press that has not dragged.
- new DocumentPreset() now makes an object of the DocumentPreset class whose settings the run
keeps, so addDocument refuses a plain object, one with a typename of DocumentPreset included,
with a TypeError naming presetSettings.
- When file.new reports a profileError, addDocument throws an error that names the profile and
the reason, and the document made with the defaults is put back.
- A script's file.new reads the New Document profile file in the app's own profiles folder;
the automation roots in force still apply. Before, the script's file gate refused the folder,
so a scripted addDocument never used an edited profile.
Docs: docs/mcp.md.
A continuous arc that starts a path has no direction to follow and
sweeps the arc size, as a sharp-corner arc does. Moving its end onto a
protractor tick put the end on a circle the drawn arc does not follow,
so `tick_end` now gives no tick for it.
The hover keeps the snap settings it was made with (`SnapSettings` in
guides/snap.rs: the window, zoom, snapping options, tolerances,
Alignment Guides and construction angles). After one of them changes
under a still pointer, the hover's rubber band, protractor, distance
label and Smart Guides are hidden until the pointer moves, also through
a press, so the preview shows no point that a click would not place.
A press also drops the hover, so after a click puts an arc's end on a
tick no preview runs from that end back to the pointer. While the
pointer hovers, the tool asks the canvas to hover it again when the
view, the document or the selection changes (`wants_rehover`).
A continuous arc that starts a path has no direction to follow and
sweeps the arc size, as a sharp-corner arc does. Moving its end onto a
protractor tick put the end on a circle the drawn arc does not follow,
so `tick_end` now gives no tick for it.
The hover keeps the snap settings it was made with (`SnapSettings` in
guides/snap.rs: the window, zoom, snapping options, tolerances,
Alignment Guides and construction angles). After one of them changes
under a still pointer, the hover's rubber band, protractor, distance
label and Smart Guides are hidden until the pointer moves, also through
a press, so the preview shows no point that a click would not place.
A press also drops the hover, so after a click puts an arc's end on a
tick no preview runs from that end back to the pointer. While the
pointer hovers, the tool asks the canvas to hover it again when the
view, the document or the selection changes (`wants_rehover`).
* svg: cut over CSS transform, CSS string quoting, and symbol unit basis to craft-svg (#789)
* build: repin craft-svg to merged craft-libs main (d20a8248)
remove() on an object that is hidden or locked, sits in a hidden or locked layer or group, or is a group holding such an object now throws and deletes nothing, the same rule pageItems.removeAll() applies. docs/mcp.md states both rules and that width and height scale along the page's axes.
Checking whether a layer's pixels are all fully transparent no longer counts
its transparency against the memory allowed for the whole import. The layer
is counted where it is drawn, so an import that fits no longer fails because
the check counted the same pixels first.
A rotated rectangle given a width and then a height through the scripting object model reads back the values set, its geometric bounds have that size, and other objects stay as they were. The resize doc comment names the page's axes.
With the Selection tool chosen, holding Cmd (Ctrl on Windows and Linux)
now lends Direct Selection, or Group Selection when that was chosen
last, for each press; the Selection tool is back on the release. With
Group Selection chosen, Cmd lends the Selection tool, as it already did
with Direct Selection. Selection & Anchor Display > Command Click to
Select Objects Behind keeps a Cmd press on a selected object, away from
its anchors, handles, mesh points and spine, for selecting the object
behind it. A wide stroke's painted area counts as on the object there.
- The double-click or triple-click after Cmd-clicks goes to the tool
the clicks went to.
- Cmd pressed once a drag is under way lends nothing, and the pointer
stays the active tool's.
- While Cmd is held, the status bar's Current Tool and the help bar
name the lent tool, and the canvas shows the lent tool's marks and
widgets (blend, Shaper, mirror, trace divider and repeat handles) for
the pointer's position in the same frame.
- The help bar has hints for Group Selection.
The helper that finds a selected object's editable parts under the
pointer follows the one in pull request 6597 by SofiaAFigueredo.
Docs: docs/ui-parity.md, docs/control-protocol.md (ui.pointer).
Co-authored-by: SofiaAFigueredo <223278896+SofiaAFigueredo@users.noreply.github.com>
A layer mask white outside its rectangle now hides a layer when the mask is
0 over every pixel the layer draws, even where the rectangle leaves fully
transparent pixels out. A group's mask is checked the same way against the
pixels of the group's layers, unless the group holds an adjustment layer or
a fill that stores no pixels. A base merged with the layers clipped to it
counts as drawing nothing when its mask hides the base. A check that was
skipped for lack of memory is made again later instead of being kept.
artboardSpacing is refused above 100,000 points, the limit file.new
applies, so a value file.new would refuse throws a RangeError that names
artboardSpacing.
Wherever the Quick Pen tool shows an arc's protractor (while the arc is
dragged, or as the piece the next click adds), it also draws a small cross at
the arc's center, as the circle and three-point arc tools draw theirs. The
cross is VectorCraft's own behavior.
Adds a test for the cross while hovering and dragging.
While an arc is drawn, by a drag or as the piece the next click adds, the
Quick Pen tool shows a protractor around the arc's center: a tick every 15°
from where the arc starts, a longer one every 90°, and one where it ends. The
piece the next click adds shows its protractor only while Enable Rubber Band
for the Pen tool shows that piece.
With Smart Guides on, the end of a continuous arc snaps onto the nearest tick
of its protractor, on the same circle, when the tick lies within the snapping
tolerance of the pointer, no other Smart Guide snaps the point, and neither
Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps
its arc size, so its end does not snap. Shift does not constrain Quick Pen
points, so it does not change the snapping. The protractor, its 15° step and
the snapping are VectorCraft's own behavior.
The Smart Guides targets now also report whether a point landed on one of
them (`Targets::snap_hit`), so a target whose label or line is hidden still
takes precedence over a tick.
Adds tests for the arc's circle, the tick snapping by drag and by click and
its precedence, and the protractor during a drag and while hovering. Also adds
tests of existing Quick Pen behavior: a point snapping to a Smart Guide, and
the distance label shown while hovering.
When an edit puts the selection back, the Layers panel target, symbol part,
Objects on Path member, ruler guide and key object commands fall back or
skip only when the command refuses with an ordinary error. An internal
failure or a request to stop now ends the run instead of being treated as
a refusal.
A pass-through group's adjustment layers count as kept to change what is
below the outer pass-through group only when nothing below that group in
the outer one draws, as for adjustment layers directly in the outer group.
Before, a layer merged above them for its blend mode merged them applied
but the import counted them as not applied.
docs/mcp.md now says when a layer's mask hides all of it.
The host name test now has rows for app, the document model classes and the enumerations the script host adds. zOrder on a path inside a compound path throws an error and leaves the document unchanged, as duplicate does.
A layer's mask now hides all of it when it is 0 over every pixel that isn't
fully transparent, so a shallow knockout whose mask and transparency leave
nothing drawn no longer drops the adjustment layers kept below it.
A pass-through group whose mask hides all of it no longer counts its layers
as drawing, or its adjustment layers as kept, when deciding which adjustment
layers above it change what is below the group.
A numbered copy of a library tint found in the document now brings
back the deleted global or spot color it links to, as a tint of the
library tint's own name does. A deleted color that the call also picks
is added before the other new swatches, so a pattern added earlier in
the call cannot give its name to another color and leave the found
tint linked to the wrong one.
A picked pattern the document already has is probed once: the probe
gives both its name in the document and the colors its art takes,
instead of a presence check, a second import into a copy and a third
presence check.
- An edit a script makes puts back a Layers panel target, an object
chosen inside a dynamic symbol instance and an object chosen in an
Objects on Path group, each with its own selection command.
- Assigning a document's selection selects a symbol instance or an
Objects on Path group as a whole when one of its objects was chosen.
- file.newPresets lists a grid by column's rows as set, also when there
are fewer artboards than rows, and New Document's Columns shows the
columns those rows give the current number of artboards.
- docs/roadmap.md's M13 row names the script object model that is
available.
A library tint or gradient counts as already in the document only when
each color it links to is there. When the document's tint of that name
links to a color the document no longer has (deleted without unlinking),
the color comes back under its own name and is listed in `added`.
A picked pattern the document already holds keeps the copy of a color
its art takes (a numbered copy the library also names), and the picked
tints and gradients of that color link to it, so adding the pattern and
the tint again adds nothing. Without such a pattern, a numbered copy the
library also names stands for that library swatch alone.
docs/mcp.md also states that a pattern pasted with Merge for some colors
and Add for others is added again as a copy.
A layer or group whose layer mask, switched on, hides all of it now counts
as drawing nothing when the import decides what an adjustment layer
changes. A layer with stored pixels is hidden when its mask is 0 over all
of them. A group, an adjustment layer and a layer that stores no pixels
are hidden only when the mask is 0 everywhere, the value outside it
included.
- An adjustment layer above such a layer or group in a pass-through group
is kept to change what is below the group, instead of merging with
pixels that never show.
- A shallow knockout hidden by its mask merges nothing, so the adjustment
layers kept below it in a pass-through group stay in the group's kept
set: an adjustment layer above that group in an outer pass-through group
is kept after them, and both change what is below.
- A clipping base hidden by its mask draws nothing, its clipped layers
included.
Each mask is read once for this, only when it can hide all of the layer,
and the read is not counted against the import's memory allowance, since
the mask is read and counted again where it is drawn.
Docs: docs/mcp.md, docs/target-app-parity.md.
The nine graph tools showed the same column chart, the eight symbolism tools
the same spray can, and Perspective Selection, Slice Selection, Enclosing
Lasso, Polygonal Lasso, the Corner Tool, Slide Anchor Along Path and Shared
Edge Merge each reused the icon of another tool. The 3D Box Tool asked for an
icon that does not exist and showed the dashed placeholder.
Each of these tools now has an original icon drawn in the dc-* style (24x24,
1.5 stroke, round caps) that shows what the tool does:
- Each graph tool draws its own chart type.
- The symbolism tools show symbols being moved, pulled together, resized,
turned, tinted, faded or styled.
- The Lasso and Slice tools get dc-* icons too, so the three lasso tools and
the two slice tools each read as one family. The Enclosing Lasso adds a filled square inside the Lasso's loop,
and the Polygonal Lasso draws the loop with straight sides and keeps the
same knot and tail. The Slice and Slice Selection tools both show a dashed
slice outline with a corner tag, the Slice Tool with a knife beside it and
Slice Selection with a pointer.
- Perspective Selection shows a smaller perspective grid with a pointer.
- The 3D Box Tool uses the cube icon that the 3D and Materials panel uses.
Each new file has an ASSETS.md row.
every_tool_has_an_icon_no_other_tool_uses checks that every cataloged tool,
the add-ons' included, maps to an existing icon that is not the placeholder
and that no other tool uses.
- duplicate() runs Edit > Duplicate, the place and the selection
restore under one savepoint, so a refused place leaves the documents,
the selection and the undo history as they were. It reads the copy's
id from the command's own result, so ids above 2^53 return the copy.
A path inside a compound path throws an error instead of copying the
whole compound path.
- An edit restores a mixed selection (direct-selected anchors and whole
objects) in its original order with one select.anchorsMany.
- Assigning the selection clears a Layers panel target.
- A call on an inactive document switches back even when the selection
restore fails.
- documents.add with a grid by column passes the row count to file.new,
which takes a new artboardLayout.rows key: 5 artboards in 4 rows give
columns of 4 and 1. A preset keeps the rows until columns without
rows, or another layout, is given, and New Document drops them when
Columns or the layout changes.
- A held page item stays the same object when its class changes in the
same family (a placed image that is embedded becomes a RasterItem).
- A waiting class member's answer is read as a class instance, and a
class constructor called with new cannot wait.
Docs: docs/mcp.md (DocumentPreset, duplicate, file.new rows), docs/gaps.md
(G6).
swatch.library.add linked a library tint to the wrong color in two cases.
When the document had a process color with the same name and paint as the
tint's global color, the global color counted as already present and the
tint linked to the process color. When a tint was added without its global
color and the document had another swatch of that color's name, the tint
linked to that swatch.
- A library color counts as already in the document only when the
document's color of that name is the same kind: process, global or spot.
A global color whose name the document gives a process color now comes
in under a numbered name, and its tints link to that copy.
- A global or spot color that an added tint or gradient links to, and that
the document does not have, now comes in with the tint or gradient. It
keeps its own name when that name is free and gets a number otherwise.
added lists it after the picked swatches.
- A library tint is not the document's tint of the same name and paint
when the document's swatch of the base's name is another color or kind.
- A tint that a pattern brought is used for a picked library tint only
when the color it links to is the library color's kind.
- An adjustment layer's mask is checked against the memory allowed beside
the canvases held while it is read (the merged canvas, the base's shape
and the copies kept for pass-through groups).
- A clipped adjustment layer whose mask is too large to read is left out
without unclipping the layers clipped above it to the same base.
- An adjustment layer in a pass-through group whose mask is too large to
read is left out without stopping the merge of the layer above the
group; its own merge with the layers below it still isn't made.
- A layer whose stored pixels are all transparent draws nothing, so an
adjustment layer above it in a pass-through group stays kept to change
what is below the group.
- A layer merged in a pass-through group for its blend mode or its
knockout takes the adjustment layers kept below it with it, so an
adjustment layer above that group in an outer pass-through group merges
with it instead of being dropped.