Commit Graph
702 Commits
Author SHA1 Message Date
BFlat 79d2536e8e Merge pull request #8089 from dotCooCoo/fix/issue-8063
Part of #8063: Dimension tool points snap to drawn dimensions and show anchor and path labels
2026-11-17 08:19:12 +07:00
BFlat fb6845b07a Merge pull request #8161 from dotCooCoo/perf/cut-selection-one-pass
Cut: take the cut objects out of the selection in one pass
2026-11-17 02:50:44 +07:00
BFlat 5190f99c6c Merge pull request #8173 from dotCooCoo/fix/editing-data-fallback-says-why
.ai import: a refused PDF part's error says why the editing data couldn't be read
2026-11-17 02:50:01 +07:00
dotCooCoo 57904698e3 Merge main into fix/issue-8063 2026-11-16 10:50:24 -08:00
BFlat 36c1f37ac6 Merge pull request #8096 from dotCooCoo/feat/packaging-check-fold-lines
Packaging Tools: Check Fold Lines finds the panels and hinges of a blank and lists what is wrong
2026-11-16 23:08:07 +07:00
BFlat e157e9c737 Merge pull request #8111 from dotCooCoo/perf/eps-readhex-readline-one-pass
EPS import: readhexstring and readline read the data in one pass
2026-11-16 23:06:11 +07:00
dotCooCoo 139f881f81 .ai import: a refused PDF part's error says why the editing data couldn't be read
When the import refuses a file's PDF part and its editing data can't be
read either, the error named only the PDF part. It now adds "its editing
data couldn't be read either (<why>)", as layers already do
(crates/eps/src/import.rs). The reasons come from the editing data
reader (a size limit, damaged compression) and from the private data
streams (larger than 256 MB, another filter or decode parameters,
damaged zlib data). A file without editing data, and an open with pages
picked, layers off or the editing data off, keep the PDF part's error.

Part of #4366.
2026-11-16 07:56:57 -08:00
dotCooCoo 33e7a8893b Cut: take the cut objects out of the selection in one pass
Clear with `ids`, which Cut uses for the objects it copied, removed each
id from the selection with its own scan of the selected objects. It now
calls Selection::remove_all once, which gives the same selection.

With 50,000 objects selected and all of them cut, the selection step
takes 5.5 ms instead of 572 ms (release build, median of 7 wall-clock
runs, measured while other builds were running). The new tests compare
the result with removing each id in turn, including Undo and Redo, and
an ignored benchmark times both.
2026-11-16 07:25:45 -08:00
dotCooCoo 160207e9f2 EPS import: readhexstring and readline read the data in one pass
readhexstring and readline called the one-byte file read for every input
character, copying each byte into a new vector. They now scan the bytes
left in the file in one slice and advance the file by the bytes they used.

The results are unchanged: the same bytes, the same boolean, the same next
unread byte, from the program's own file (after the whitespace that ends
the last token), a decoded buffer and a filter decoded when first read.
readhexstring stops on the digit that completes the last byte and drops a
lone digit at the end of the data; readline takes CR LF as one line ending,
leaves the byte after a lone CR unread, and leaves the line ending unread
when the line fills the string.

Tests run the new readers next to copies of the byte-at-a-time loops over
13 stream forms and several hundred inputs, comparing the result and
everything left to read; an image read through a readhexstring procedure
is compared with the same samples given as a hexadecimal string. The
import fuzz tests gain readline and a case for both operators.

data_op allows clippy::cognitive_complexity. Without the allow, clippy
rates it 54 against the limit of 30; with the old loops in place it
passes.
2026-11-16 03:39:00 -08:00
dotCooCoo 532d2ea6d7 Packaging Tools: Check Fold Lines finds the panels and hinges of a blank and lists what is wrong
Object › Plug-ins › Packaging Tools › Check Fold Lines, and the Fold Lines
panel's Check button, check the fold lines of the selection, or of the
document while nothing is selected (`addon.packaging.check`).

- Cut lines bound the material: each connected piece that encloses an
  area is one blank, its largest closed cut line is the outline, and a
  closed cut line inside it is a hole. A slot drawn as a rectangle across
  the outline leaves the same material as a notch drawn in it, and an
  outline drawn as several open cut lines works too.
- Creases, partial cuts and perforations divide a blank into panels; the
  pieces between the same two panels form one hinge.
- 15 issue codes, errors and warnings, each naming its lines; cut line
  ends within a tolerance (0.1 pt, 0.01 to 10) are joined and reported as
  a gap. With `select`, the lines the issues name are selected.
- The panel lists the issues in the interface language, with a summary
  line; clicking an issue or its Select button selects its lines. The
  list is kept until the document changes.

`vectorcraft_pathops::adjacency` maps paths as live_paint does and keeps,
for each edge, every input it lies on and the faces on both sides; the
blank model is `vectorcraft_three_d::fold::blanks`. The engine now depends
on vectorcraft-three-d directly.

Docs: docs/mcp.md (Check Fold Lines), crates/pathops/README.md, ROADMAP.
2026-11-16 01:47:15 -08:00
dotCooCoo 5f996eea32 Part of #8063: Dimension tool points snap to drawn dimensions and show anchor and path labels
A Linear point picked near the end of another dimension's line landed
beside it when zoomed in: the tool's own pick skipped dimension artwork,
so that end pulled the point only within the Smart Guides tolerance,
while an anchor of the art pulls it from 8 pixels.

- With Smart Guides or Snap to Point on, a point that no anchor of the
  art within 8 pixels takes lands on the end of a visible, unlocked
  dimension's dimension line, or on the far end of its extension line,
  within 8 pixels, with no link to that dimension. The end of an
  extension line next to the point it measures is not an end, so an
  anchor that a dimension already measures still takes the point.
- A point that nothing else places lands on the closest point of such
  a line within 8 pixels, as it does on a segment of the art.
- With Smart Guides and Anchor/Path Labels on, a point on an anchor or
  a line end shows the "anchor" label, and a point on a segment or line
  shows the "path" label. A point on a line end is marked as an anchor.
- A press on a line end that moves a few pixels picks it, as a press on
  an anchor does.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-16 00:59:10 -08:00
FredApps bfe5c253f4 Merge remote-tracking branch 'origin/main' into feat/cutover-remaining-codecs
# Conflicts:
#	crates/engine/src/cmd/menucmds.rs
2026-11-16 06:35:17 +01:00
dotCooCoo 7ff63a6cd7 Merge main into feat/line-segment-common-tangent 2026-11-15 18:40:40 -08:00
BFlat 765334b9a6 Merge pull request #8010 from dotCooCoo/feat/tangent-circle
Path Precision Tools: Tangent Circle draws the circles that touch two or three shapes
2026-11-16 09:33:03 +07:00
BFlat 3c9249279d Merge pull request #8003 from dotCooCoo/fix/inflate-colored-light-seam-fill
3D: colored Inflate fills each facet and its seam as one path, covering each edge pixel once
2026-11-16 09:31:14 +07:00
BFlat 98a1d0839d Merge pull request #7997 from dotCooCoo/fix/revolve-colored-light-faces-sealed
3D: Revolve's colored-light faces lie over an underlay, so no alpha holes show at 1:1
2026-11-16 08:13:02 +07:00
FredApps d2b8ebfd95 Merge origin/main into feat/cutover-remaining-codecs 2026-11-16 01:57:11 +01:00
FredApps 273dd79442 refactor(doc): read Group 3 TIFF rows through craft-stream-codecs
group3_tiff_rgba decodes each strip or tile with
craft_stream_codecs::decode_ccitt_raw instead of hayro-ccitt; the error
messages stay as they were. vectorcraft-engine's group3_reference test
keeps the hayro-ccitt reader as the reference: over 190 Group 3 TIFFs and
5,500 cut or edited copies the pixels and refusals match, except that a
strip or tile wider than MAX_CCITT_COLUMNS (2^20) is refused as an
overflow where hayro-ccitt ran out of data. Needs craft-libs#1772.
2026-11-16 01:56:14 +01:00
dotCooCoo 4ad75291cb Path Precision Tools: Tangent Circle draws the circles that touch two or three shapes
Object › Plug-ins › Path Precision Tools › Tangent Circle…
(`addon.pathtools.tangentCircle`) draws the circles that touch two
selected paths or compound paths at a set radius, or that touch three of
them. A circle touches a shape when it meets the outline without
crossing it, with the whole outline outside the circle or inside it: at
a smooth point it is tangent there, and at a corner or an open end it
passes through that point. Circles, ellipses at any angle and other
closed or open paths all work; the members of a compound path count as
one outline.

When every shape is a circle, the circles are found in closed form (up
to eight for three circles, the problem of Apollonius) and then moved
onto the drawn Bézier circles, which differ from true circles by up to
0.0273% of the radius. Other shapes are searched on a grid, and the
centers left are refined with Newton's method on the curves. With three
shapes, circles up to 64 times the diagonal of the box around the
shapes' anchors and handles are found.

The circles are listed by radius, then top to bottom, then left to
right. The dialog takes the radius (with two shapes; 36 pt to start)
and previews every circle found or one picked by number; OK draws them
with the current paint as one undo step, selected. No circle, more than
64 circles (shapes touched along a whole curve, such as two concentric
circles), shapes at one point or too small for the radius, more than
2000 segments and a search past its limits are errors that leave the
document unchanged.

The Tangent Circle and Circle: rows are in every catalog, and the
command's messages in the catalogs that translate messages.

Docs: docs/mcp.md (Path Precision Tools add-on),
docs/target-app-parity.md, docs/ui-parity.md and ROADMAP.
2026-11-15 16:37:17 -08:00
dotCooCoo d22668e094 3D: colored Inflate fills each facet and its seam as one path, so face edges match supersampling
Under colored lights, a solid-color Inflate surface drew each facet over
its underlay as a fill and then a same-color round seam stroke. At a
partly covered edge pixel the two coverages add up past the facet's real
coverage, so a turned Inflate's near facets bled into the facets behind
them by up to 5 levels against the same art drawn at 3x and averaged down.

- lighting::seamed_fill turns a facet that is one closed polygon with an
  area and no crossing edges into one path: the facet and the outer
  outline of its round seam (lighting::footprint). solid_surface fills
  that path once per channel. Other facets keep a fill and a seam stroke.
  The 2 pt underlay, the surface clip and the channel groups are as
  before.
- three_d_light_color::turned_colored_inflate_facets_and_seams_cover_their_edges_once
  checks Inflate at X 50, Y 35 in an opaque fill: at most one channel
  sample more than 3 levels off, by at most 4, and no alpha off.
- docs/three-d.md (Seams) and docs/target-app-parity.md describe it.
2026-11-15 15:47:13 -08:00
dotCooCoo b5c7b60cb8 3D: Revolve's colored-light faces lie over an underlay, so no alpha holes show at 1:1
Under a colored lightColor or a lights list, Revolve drew each face of a
solid-color or gradient surface on its own, so where two faces'
antialiased edges met, pixels inside the surface let the background
through at 1:1.

- The faces now lie over an underlay of themselves under one clip to
  their outline, as colored Inflate's facets do (lighting::sealed, split
  into lighting::underlay and sealed). The surface's opacity and blending
  mode apply once, to the sealed surface.
- In a group, each run of one member's faces in the shared depth order
  takes its own underlay; a translucent member's run keeps its opacity,
  blending mode and mask on the sealed run.
- A face with a part of a mapped graphic gives its face to the underlay
  and keeps the part right after it.
- Faces in a gradient with transparent stops carry its opacity mask and
  are drawn as before. Revolve (Classic) is unchanged.
- The paint-copy budget counts the underlay in validation and drawing.

Docs: docs/three-d.md (Seams), docs/target-app-parity.md.
2026-11-15 15:13:03 -08:00
dotCooCoo 740b1e3f7e Tests: fuzz PSD slices in versions 6, 7 and 8
import_fuzz builds PSD files from scratch whose image resource 1050
holds slices in version 6 (a version 16 descriptor after the first
record) and in the version 16 descriptors of versions 7 and 8. Each
sample has one user slice, one slice that follows a layer and one
generated automatically; the first two come in as user slices.

- the_sliced_psd_samples_bring_in_their_user_slices: each sample opens
  with its two user slices and no warning, document.psdInfo counts 2,
  and an embedded place brings 2.
- sliced_psd_samples_with_huge_counts_or_cut_short_come_in_without_their_slices:
  slice counts of 10,001, 0x7fffffff and u32::MAX, data one byte
  short, and data cut inside the count bring the art in without its
  slices and with a warning.
- mutated_psd_slices_never_panic: mutated slice data, kept whole, cut
  short with the resource length rebuilt, or with the file cut in the
  resource block, never makes document.open, document.psdInfo or an
  embedded file.place report an internal error.

tests_psdslices::damaged_slices_never_panic now fails when a command
reports an internal error instead of discarding the results.
2026-11-15 13:57:26 -08:00
dotCooCoo 0189417e24 Path Precision Tools: Common Tangents draws the lines touching two closed paths
Object › Plug-ins › Path Precision Tools › Common Tangents…
(`addon.pathtools.commonTangents`) adds the common tangent lines of two
selected convex closed paths as separate open paths: external (both
paths on the same side of the line), internal (the lines between them)
or all, and with Centerline the line joining the two centers. An
ellipse drawn with the Ellipse tool is measured as an exact ellipse at
any rotation and scale; any other path must be closed, have one outline
and bend the same way all around, with at most 10000 segments.

Each line runs between the points where it touches the two paths, or
covers a straight side that lies along it. Separate paths have four
tangents, overlapping paths only external ones (two for ellipses), and
a path inside the other none. Paths that touch, from outside or from inside, share
one tangent instead: a line centered on the point where they touch and
as long as the narrower path is wide along it. When there is no tangent
of the kind asked for, nothing changes and the result carries a warning
that says why. The lines take the current stroke and no fill, go
directly above the upper path and are selected, as one undo step. The
dialog has Preview.

The geometry is in vectorcraft-pathops: the tangents are the zeros of
the difference of the two outlines' support values over the normal's
angle, sampled at 720 even steps and at every angle where either
path's touching point passes to another segment, then refined, so the
work per pair is bounded.

Catalog rows for the menu item, the dialog and the messages are in
every catalog.

Docs: docs/mcp.md (Path Precision Tools add-on), docs/target-app-parity.md
and ROADMAP.
2026-11-15 13:48:21 -08:00
BFlat 910b79119b Merge pull request #7368 from dotCooCoo/fix/graph-design-art-paint
Graphs: paint, stroke and transparency commands leave a design's art in a series out
2026-11-16 04:30:58 +07:00
FredApps caa62aa79f Merge remote-tracking branch 'origin/main' into work7669 2026-11-15 21:06:46 +01:00
dotCooCoo 1a78011eae Merge main into fix/graph-design-art-paint 2026-11-15 10:13:04 -08:00
FredApps 31658546a8 fix(codecs): build the cutover against craft-libs d6cd7836d
- Test files whose image→craft-image-codecs rewrites didn't compile against
  main's newer tests go back to main's versions (engine fileio/tests.rs,
  tests_tiffbmp.rs, tests/menucmds.rs, eps tests.rs); they still use the image
  crate, which keeps its format features.
- craft_jxl::encode, craft_image_codecs::encode and Image::icc at d6cd7836d.
- jp2read and pdf export pass DecodeOptions, not Limits.
- EPS DCTDecode: grey JPEGs no longer use the image after moving it, and keep
  main's one-channel output.
- svg keeps its direct usvg dependency for main's image href code; pdf keeps
  jpeg-encoder for CMYK JPEGs.
- clippy -D warnings and rustfmt clean.
2026-11-15 18:05:45 +01:00
FredApps 5d492ebad2 Merge #7664 (fix/restore-codec-cutover-ci) into feat/cutover-remaining-codecs
Conflicts resolved in favour of main/#7664 in the 13 source files both touched
(doc/cmyk.rs, metafile/dib.rs, pdf images, svg import/files.rs, render paint and
encode tests, trace, engine load.rs), keeping main's newer TIFF/CMYK, DIB and PDF
image fixes. vectorcraft-doc stays on main's version until its CMYK reader moves
to craft-tiff. The image crate keeps its format features, and usvg, tiff,
zune-jpeg, hayro-ccitt and jpeg-encoder stay for the readers not yet moved.
Codec crates pinned to craft-libs d6cd7836d364177661b0ae17f48a0805e83a5f32.

Also fixes the compile errors CodeRabbit flagged (jp2read DecodeOptions,
filters.rs use-after-move) and the encode() arity at d6cd7836d.
2026-11-15 17:35:43 +01:00
dotCooCoo 531ce2a10e Effects: Safe Mode checks graph design art that a blurred fill of its series group draws
effect.expandAppearance in Safe Mode left the art of a graph design in a
series out of the plug-in check unless an effect of the series group
itself would draw it. A raster effect on one of the group's fills or
strokes, such as a Gaussian Blur, also turns the whole group into an
image when it expands, art included, so a plug-in effect in that art was
expanded without drawing. Such a raster effect now keeps the art in the
check, and the command returns the Safe Mode error.
2026-11-15 08:07:49 -08:00
dotCooCoo df49d7a5d0 Merge main into feat/packaging-fold-roles 2026-11-15 06:14:42 -08:00
BFlat 3239725c40 Merge pull request #7817 from dotCooCoo/feat/psd-import-options-import-slices-after-7649
PSD: Import Slices brings a file's slices in as user slices on Open and Place
2026-11-15 20:45:50 +07:00
BFlat f62932eb93 Merge pull request #7776 from dotCooCoo/feat/aia-files-carry-select-object-steps
Actions: Load Actions… reads .aia Set Selection steps as Select Object
2026-11-15 17:31:10 +07:00
dotCooCoo d842aa816c Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-15 00:50:14 -08:00
dotCooCoo c0b1c2e144 Merge main into feat/color-management-policies 2026-11-14 22:51:34 -08:00
dotCooCoo d999d861de Color Settings: Convert to Working Space compensates CMYK black points
- CMYK colors converted between two loaded CMYK profiles now use the
  Color Settings black point compensation, as RGB colors already did:
  the conversion goes through linear ProPhoto RGB and maps the source
  profile's black onto the destination's.
- The edit.colorSettings, document.open and file.newFromTemplate params
  text and docs/mcp.md name file.newFromTemplate with the commands that
  apply the policies, and say that colorMode on open converts after the
  policies, through the profiles the document keeps.
- A test covers New from Template under the policies, and another the
  CMYK black point compensation.
2026-11-14 22:43:08 -08:00
dotCooCoo b7ff4b167a Merge main into feat/aia-files-carry-select-object-steps 2026-11-14 22:12:23 -08:00
dotCooCoo d0b69af348 Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-14 22:06:58 -08:00
dotCooCoo 93789dd3e3 Merge main into fix/graph-design-art-paint 2026-11-14 21:45:07 -08:00
dotCooCoo fb616f2c76 Merge main into feat/psd-import-options-import-slices-after-7649 2026-11-14 19:42:05 -08:00
dotCooCoo c2a6655ae1 Merge main into feat/aia-files-carry-select-object-steps 2026-11-14 19:08:37 -08:00
dotCooCoo 6aab3e3280 Merge main into fix/graph-design-art-paint 2026-11-14 19:05:44 -08:00
dotCooCoo 6efa53f562 Merge main into fix/ai-off-artboard-art 2026-11-14 18:55:35 -08:00
BFlat 237fe27e50 Merge pull request #7713 from dotCooCoo/feat/psd-clipping-path
PSD: a file's clipping path clips its merged image on Open and Place
2026-11-15 09:46:45 +07:00
dotCooCoo b60b6e8a21 Merge main into feat/packaging-fold-roles 2026-11-14 18:44:19 -08:00
dotCooCoo 621a793abe Actions: Load Actions… reads .aia Set Selection steps as Select Object
actionSet.read now lists each step's recorded values with their key, type
and value (a whole number, or UTF-8 text with its length in bytes), at
most 100,000 per set; a hexadecimal value with the wrong byte count still
marks the set truncated.

Load Actions… finds a Set Selection step by its internal name, whatever
its label, and adds it as a Select Object step (select.byNote) with its
note, Case Sensitive and Whole Word. The step comes in only with exactly
three recorded values: the note (key text, ustring, UTF-8, 1 to 1,024
bytes once trimmed) and the two options (keys word and case, boolean,
0 or 1). Any other Set Selection step is left out and counted, with no
option filled in. A step that is off in the file stays excluded, and the
set saves to and reloads from a .vcactions file unchanged.

Docs: docs/mcp.md, docs/target-app-parity.md, docs/ui-parity.md.
2026-11-14 18:21:40 -08:00
dotCooCoo a3ac628576 .ai import: symbol instances in older files are read, so art outside the artboard opens
Files saved for versions 10 to 13 place each symbol instance with a
TransformMatrix. On the page it takes the symbol's art to the canvas
(y down); in a symbol's art, it takes the art to that symbol's space. The
reader only knew the RTransformMatrix of newer files, so any such
instance made the editing data unreadable, and the file opened from its
PDF part alone, which holds only the art on the artboards.

The reader now converts a TransformMatrix with the canvas point of art
space's origin that the template box gives. A file whose symbol
instances were the only part it could not read now opens from its
layers, with the art outside its artboards.

The symbols fuzz test also damages the same data in the older form.

Docs: docs/target-app-parity.md, docs/file-format-parity.md.
2026-11-14 17:03:22 -08:00
dotCooCoo 06fbf967a9 Merge feat/psd-import-options into feat/psd-import-options-import-slices-after-7649 2026-11-14 16:23:42 -08:00
dotCooCoo 89f20c45c4 SVG import: bound selector matching and share the limits with linked and embedded SVGs
The measurement that runs before the style cascade and usvg now covers
the inputs that still got past it:

- usvg matches a selector without keeping what it found, so one whose
  leftmost part matches nothing tests every set of ancestors in turn.
  The measurement counts those tests for each copy and stops at
  50,000,000; past that the SVG is refused with "the SVG's style sheets
  take too long to match". An SVG image's matching stops at what the
  SVG showing it left.
- A test counts one more for every 16 attributes a lookup scans and
  every 16 bytes of the value it compares, so many classes against a
  long class list count the work they do, in usvg's matching and in
  the import's own cascade.
- The declarations the import's own cascade keeps, once per element,
  count toward the 64 MB, including those of `:not()` rules, which usvg
  drops. Each `:not()` alternative counts as a test.
- A linked SVG file is measured before its cascade runs. The linked SVG
  files share one measurement: once they pass the limits together, the
  files after that are shown without their links. The tests a file past
  the limits made still count.
- SVG images share the element limit and the selector tests with the
  SVG showing them, as they already shared the 64 MB.

The svg_filters reader measures its SVG before the cascade too.
2026-11-14 16:10:10 -08:00
dotCooCoo af010b6dec PSD: a file's clipping path clips its merged image on Open and Place
A PSD or PSB file can name one of its saved paths (image resources 2000
to 2997) as its clipping path in resource 2999. psdread::clipping_path
reads that path in the image's pixel space, under the even-odd rule the
file format specification gives, with a subpath around the whole image
first when the initial fill record says the fill starts with all
pixels.

File > Place of such a file, and File > Open of its merged image, put
the image in a clip group of that path with no paint. file.place answers
the image's id as `image`, as for a DCS file. Replacing an image alone
in a clip group with such a file keeps the image's scale and rotation.
links.update and links.relink leave the clip group as it is. Files that
name no clipping path come in as before.
2026-11-14 15:55:34 -08:00
dotCooCoo d156bd4da6 Packaging Tools: Make … Line gives paths a fold line role that their swatch carries
Object › Plug-ins › Packaging Tools is a new built-in add-on for the
dielines of boxes and other folded packaging. A path, compound path or
live shape is a fold line when its top stroke is painted with the swatch
of a line role: Cut, Crease, Partial Cut or Perforation. Each document
has a role table (`packagingRoles`) that names the swatch of each role.
By default the swatches are named after the roles. Native files keep the
table and the strokes. PDF prints a role line on its swatch's separation
when the swatch is a spot color, as the default role swatches are. SVG,
DXF and HP-GL keep the stroke's color, so the default role swatches come
out as four colors.

- `addon.packaging.setRole` (Make Cut Line, Make Crease Line, Make
  Partial Cut Line, Make Perforation Line) paints the top stroke of each
  path among the objects with the role's swatch at 100%, through groups
  and clip groups. Locked and hidden objects are left out, also when
  named by id. A path without a stroke gets a 1 pt stroke, a hidden
  stroke is shown, and the stroke overprints unless `overprint` is false.
  A missing role swatch is made as a global spot swatch in the document's
  color mode (Cut 100% magenta, Crease 100% cyan, Partial Cut 100%
  yellow, Perforation 50% magenta and 50% cyan). When a color group or a
  swatch that can't carry a role has that name, the swatch is made as
  "Cut 2" and so on. `none` takes the role away and keeps the color. One
  undo step, none when nothing changes.
- `addon.packaging.roles` counts each role in the selection, or in the
  document while nothing is selected, locked and hidden lines included.
  The Fold Lines panel shows these counts, gives the selected paths a
  role when a row is clicked, and says when nothing is selected.
- `addon.packaging.setRoleSwatch` (the panel menu's Role Swatches…) makes
  another global or spot color swatch carry a role. It refuses missing,
  gradient, pattern, process, tint, [None] and [Registration] swatches
  and a swatch another role has.

When `swatch.edit` renames a role swatch, the role stays with it under
the new name. When it turns Global off, the role moves to a new swatch
name that the next Make … Line makes. When `swatch.merge` merges a role
swatch into a global swatch that carries no role, the kept swatch takes
the role.

Docs: docs/mcp.md (Packaging Tools add-on) and ROADMAP.
2026-11-14 15:25:30 -08:00