Commit Graph
6241 Commits
Author SHA1 Message Date
dotCooCoo a4a96ea4ee Merge main into fix/packaging-fold-geometry 2026-11-28 00:41:46 -08:00
.CooCoo 39f317a0c6 Merge pull request #9840 from dotCooCoo/fix/engine-tests-count-work
Tests: bounded-work checks count the work instead of timing it
2026-11-28 00:16:46 -08:00
.CooCoo bacd4d0ec2 Merge pull request #8853 from dotCooCoo/feat/swatches-pattern-drag-to-canvas
Swatches: a pattern swatch dropped on empty canvas places a copy of its tile art
2026-11-27 23:52:10 -08:00
.CooCoo 9ce2299580 Merge pull request #9811 from dotCooCoo/fix/ai-envelope-stroked-line
.ai import: envelopes of a stroked straight line map from their stroked box
2026-11-27 23:35:45 -08:00
dotCooCoo 86500e3e9f Merge main into fix/packaging-fold-geometry 2026-11-27 23:34:08 -08:00
.CooCoo a859b6947d Merge pull request #9027 from dotCooCoo/feat/scripts-api-d7a-variables
Scripts: documents give scripts their variables, data sets and variable libraries
2026-11-27 23:30:13 -08:00
.CooCoo 5b958a3d4f Merge pull request #9844 from dotCooCoo/feat/switch-document-preset
New Document profiles: Use Profile Defaults switches the default fill, stroke and font
2026-11-27 22:30:33 -08:00
.CooCoo c45a9a2781 Merge pull request #9870 from dotCooCoo/feat/plugins-failed-load-retry
Plug-ins: a plug-in that fails to load is listed and can be retried
2026-11-27 22:17:31 -08:00
.CooCoo eb7c6353c9 Merge pull request #9809 from dotCooCoo/fix/select-removal-one-at-a-time
Select: removing objects one at a time checks and reads only the removed ones
2026-11-27 22:17:14 -08:00
dotCooCoo 641d581adb Merge main into feat/swatches-pattern-drag-to-canvas 2026-11-27 22:14:05 -08:00
.CooCoo ea02f0f7b6 Merge pull request #9720 from dotCooCoo/fix/transparency-symbol-part-display
Show selected symbol part transparency
2026-11-27 22:07:26 -08:00
dotCooCoo ee976e1b78 Docs: envelope margins name the 1e-6 pt side threshold
A side of an envelope's content shorter than 1e-6 pt, not only one of
zero length, has its margins measured as shares of the other side
(envelope_margin_lengths). docs/mcp.md, the object.envelope.info params
text and the bounds_margin doc comment now state that threshold.
2026-11-27 22:03:04 -08:00
dotCooCoo c97b5eac1e Merge main into feat/scripts-api-d7a-variables 2026-11-27 21:57:44 -08:00
.CooCoo 3e6b0dd094 Merge pull request #9849 from dotCooCoo/feat/cmx-export-vc
File formats: export .cmx files
2026-11-27 21:45:28 -08:00
.CooCoo f81ee83f20 Merge pull request #9832 from dotCooCoo/fix/isolation-removed-object
Isolation mode: an edit that removes the isolated object ends isolation mode
2026-11-27 21:43:45 -08:00
.CooCoo bab1ae5fe1 Merge pull request #9810 from dotCooCoo/fix/appearance-per-target-lazy
Appearance: proxies with an active row match only the targets they read
2026-11-27 21:43:21 -08:00
.CooCoo 3ddca214d5 Merge pull request #9794 from dotCooCoo/fix/color-wheel-opacity-followups
Color: a targeted layer shows the paint of its editable art
2026-11-27 21:43:09 -08:00
.CooCoo 00e2e29391 Merge pull request #9800 from dotCooCoo/fix/series-opacity-params-text
Graphs: paint opacity params text matches what a series stores
2026-11-27 21:42:56 -08:00
.CooCoo 02ed17b4a3 Merge pull request #9804 from dotCooCoo/fix/pathtools-shape-set-mask
Parametric Shape: a new center, size or rotation takes a linked mask and placed gradients along
2026-11-27 21:42:44 -08:00
.CooCoo 37484b643d Merge pull request #9793 from dotCooCoo/fix/cleanup-keeps-clipping-paths
Clean Up: keep the clipping paths of groups and layers
2026-11-27 21:41:41 -08:00
.CooCoo a628629f7d Merge pull request #9857 from dotCooCoo/fix/file-locks-unlock-on-drop
Locks: dropping a lock holder unlocks its file
2026-11-27 21:37:36 -08:00
.CooCoo 3737ccdc9a Merge pull request #9838 from dotCooCoo/fix/script-folder-scan-clock
Scripts: folder listings take their time limit from the session's clock
2026-11-27 21:14:30 -08:00
dotCooCoo f8550c578b New Document profiles: keep overrides and kept graph designs when loading defaults
- Redefining a text style keeps text with its own value of an attribute the
  old definition did not set. Only text that still had the value it had
  under the old definition (Normal's, or the default when Normal itself is
  redefined) takes the new one. Leadings that Block gave the text still
  follow the style.
- Use Profile Defaults and Load Character Styles draw the graphs in the
  symbols they add with the document's own graph design of that name, as
  Paste does.
- file.newProfiles commands say their name is a built-in category of
  file.newPresets, and Use Profile Defaults records no undo step when the
  document does not change.
2026-11-27 21:09:13 -08:00
dotCooCoo 41706a3867 Plug-ins: a plug-in that fails to load is listed and can be retried
A stored plug-in that didn't install, for example because its load
panicked or its module is broken, was only written to the log. The
person could not see it or load it again without restarting.

- plugin.list gains failed: [{file, error, from}], the plug-in files
  that didn't load in this process: those of the Plug-ins folder, and
  those the folder report of the Additional Plug-ins Folder (or the
  folder plugin.reload loaded last) lists as failed. Disabled plug-ins,
  files turned off since they failed, and modules skipped because
  another install or removal of their id came first are left out. A
  file that both loads list is listed once, as a stored file. A
  plugin.reload replaces only the folder's rows. Installing or removing
  a plug-in whose module is in a stored file that failed, or a later
  load that installs it, takes the file off the list.
- plugin.retry {file?} loads one of those files again, or all of them,
  with the same checks as the load it failed in, and reports for each
  whether this retry installed it. A folder file's row in the folder
  report moves to loaded or keeps its new error. Under automation read
  roots, a file outside them is not read again, its row stays listed,
  and the reply names it and its folder by their names. Safe Mode
  returns an error.
- plugin.setEnabled {file} also takes the name failed gives a file
  outside the read roots.
- Object › Plug-ins › Plug-ins That Didn't Load… lists the files with
  why; Retry All loads them again under the read roots the list opened
  under, and the status bar says how many loaded. The item is disabled
  while nothing failed.
- A command.batch that runs a filter and then retries a module with
  its id turns Apply Last Filter off, as a reinstall does.

Docs: docs/plugins.md (Plug-ins that didn't load), docs/mcp.md.
2026-11-27 21:06:29 -08:00
BFlat cd4dfe2d63 Merge pull request #9657 from dotCooCoo/fix/blend-options-opening-drawing
Keep Blend Options previews and approval on their opening drawing
2026-11-28 11:18:44 +07:00
BFlat fca7b7811d Merge pull request #9489 from dotCooCoo/fix/ui-slice-dialog-selection
Keep Slice Options and Divide Slices on the original selection
2026-11-28 11:17:12 +07:00
BFlat efdb0fbfe5 Merge pull request #9757 from Hassan1305/fix-9227-offset-pasted-clip
Paste: a pasted copy of a clipping path is an ordinary path, so Offset Path works on it (#9227)
2026-11-28 11:10:32 +07:00
BFlat c693786275 Merge pull request #9759 from Hassan1305/fix-9320-random-uniform-scale
Transform Each: Random with the same horizontal and vertical scale keeps proportions (#9320)
2026-11-28 11:10:18 +07:00
dotCooCoo 81d4dcc6ea File formats: export .cmx files
document.export and Export As write .cmx exchange files with 32-bit
coordinates through craft-cdr's write_cmx, in the layouts the .cmx
reader reads. The chosen artboard is the file's page, or with Use
Artboards each chosen artboard is a page of one file, and each layer with
art on a page is a layer of that page.

- vectorcraft-metafile gets painted_layers: the WMF writer's walk of the
  visible art, layer by layer, with each fill's and stroke's solid paint,
  its miter limit and the swatches of the document and of the documents
  it places.
- The export keeps CMYK, RGB, gray, spot colors at their tints and
  Registration; type is written as outlines, and gradients and patterns
  as one color. The warnings name images, clipping masks, transparency,
  art past a page's edge, dash offsets, dashes aligned to corners, miter
  limits, and each loss the writer reports: nonzero fills written
  even-odd, long paths, rounded dashes, shortened names, low spot tints,
  and spot colors without a name or a known color.
2026-11-27 19:12:32 -08:00
dotCooCoo b3917f89e8 Locks: dropping a lock holder unlocks its file
The plug-in store turn, the Data Recovery area hold, the script grants
lock and the hang report file each released their file lock only by
closing the file. The lock stays held while any copy of the handle is
open, and a child process that any thread starts holds a copy until it
runs its program. While one was starting, the next turn on the plug-in
store waited, an app found its own recovery area busy, a grants change
timed out, and the next launch left a hang report alone.

Each holder now unlocks the file when it is dropped, as #9837 does for
the nightly session and the GPU start file. The engine's three locks
share one type, `store::LockedFile`. A left hang report that a launch
locks to read is held the same way.

Each new test keeps a copy of the handle open, drops the holder and
takes the lock again.
2026-11-27 18:58:40 -08:00
dotCooCoo 10a1be94f1 New Document profiles: Use Profile Defaults switches the default fill, stroke and font
file.newProfiles.applyDefaults {name} gives the active document the
Default Graphic Style and [Normal Character Style] of another category's
New Document profile, as one undo step and none when nothing changes. The
swatches, patterns, symbols and brushes the profile's style paints with
come along, its colors are converted to the document's color mode, and a
composite font the profile's default font names replaces the document's
of that name. Objects still linked to the Default Graphic Style and type
in [Normal Character Style] take the new definitions and keep their
overrides, as the Redefine commands do. New art and new type then start
with the profile's look. This is VectorCraft's own command.

- Document Color Mode now converts the fill and stroke of character and
  paragraph styles as well, so a document or profile switched between
  RGB and CMYK no longer keeps style colors in the old mode.
- Art pasted again with an SVG filter that was renamed on the first paste
  takes the same name, instead of a new name on each paste.

Refs #8350
2026-11-27 16:45:08 -08:00
dotCooCoo 8c2ab73b81 Tests: bounded-work checks count the work instead of timing it
Six engine tests guarded against quadratic or unbounded work by timing
it (under 2, 10, 30 or 60 seconds) or by printing how long it took. A
slow or loaded machine could fail them, and a regression that stayed
under the bound passed. Each now counts the work the guarded code does
and compares it with a smaller input or with the code's own limit:

- An unknown command id or parameter key of 200,000 characters compares
  no more characters than one of 20 (edit-distance cells).
- A Word .doc with 20,000 hidden paragraphs reads at most one more Prl
  per paragraph than one with a single paragraph, and each style's
  properties are read once.
- One function-based shading filling 5,000 paths takes no more function
  evaluations than filling one, and twenty stay within the import's
  evaluation budget.
- A form decoding to 64 MiB drawn 1,000 times is walked no further than
  the page's form-content limit and one more form.
- A blend of 998 steps measures no more laid steps per object than a
  blend of 3, and one of 1,500 steps is not laid out.
- Retype of a tracked line of 450 glyphs lays out at most 20 times the
  glyphs a line of 45 does.

The counters are test-only: thread-local cells in the engine under
cfg(test), and in vectorcraft-pdf (read-count feature) and
vectorcraft-eps (new work-count feature), which the engine enables in
its dev-dependencies only. Retype's layout calls go through one helper
that counts them.
2026-11-27 16:20:23 -08:00
dotCooCoo a354d09af4 Scripts: folder listings take their time limit from the session's clock
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.

- folder::Clock is either Wall (the real time since the listing started,
  the default) or Fixed (the same time at every check). Both list
  functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
  the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
  Mode tests list with a fixed zero time, so a slow disk cannot cut a
  listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
  menu stop at the session's clock once it is past the limit and list
  everything at the limit.
2026-11-27 16:10:28 -08:00
dotCooCoo 6d134ad522 Isolation mode: an edit that removes the isolated object ends isolation mode
Clear, Ungroup, a script or any other edit that removed the isolated
object left isolation mode on an id that was no longer in the document.
Session::edit now ends isolation mode after every edit that removes the
isolated object, as Undo and Redo already did. While a symbol is edited,
removing a group isolated inside the symbol's art isolates the editing
layer again, as Exit Isolation Mode from that group does.

The paths that put an earlier document back now put isolation mode back
with it: a canceled undo group, a canceled undo scope that joined an open
group, an interaction's next preview or cancel, and the measured deferred
preview. When the edits they take back had removed the isolated object,
that object is isolated again.
2026-11-27 15:28:11 -08:00
FredApps 24e5b56373 Merge pull request #5439 from Taha-Mahmoodi/fix/outline-stroke-context-menu
Fix #5267: Outline Stroke is in the canvas context menu
2026-11-27 23:28:10 +01:00
dotCooCoo 823619c46e .ai import: envelopes of a stroked straight line map from their stroked box
An envelope whose file saves the size of its contents with their
strokes maps from that box, with margins stored as shares of the
contents' height and width. A straight line along an axis has no
height (or no width), so it got no margins and mapped from its
zero-height geometric box instead.

Margins along a side with no length are now shares of the other
side's length (envelope_margin_lengths). The reader, the envelope's
map, leaving Edit Contents and the .ai writer all measure through it,
so a stroked line opens mapping from its stroked box and saves that
box's size again.

Docs: object.envelope.info params text, docs/mcp.md,
docs/target-app-parity.md.
2026-11-27 13:45:00 -08:00
dotCooCoo 698ec93090 Select: removing objects one at a time checks and reads only the removed ones
Taking objects out of a selection (select.toggle, which Shift-click, the
Layers panel and a script's selected = false run) checked the whole
selection again, walking the tree once it held more than an eighth of the
document, and read every selected object's paints for the fill and stroke
proxies. Deselecting N objects one at a time took O(N^2) lookups.

Session::select now checks only the objects that follow the objects it
already checked, kept in their order, so a removal needs no checks. The
selection's paints keep counts (the first fill, stroke and weight met,
how many match it, and how many there are), so the objects that leave are
taken out of them and the objects that join are read. The paints are read
again when every value matching the first one is gone and others are left,
or when that takes fewer lookups.
2026-11-27 13:37:08 -08:00
dotCooCoo c5298100ee Appearance: proxies with an active row match only the targets they read
With an Appearance row active and many objects selected, the opacity
proxy (read on every repaint of the Color Wheel panel) and first_edited
stopped at the first target that answered, but ItemTarget::per_target
and per_target_of had already built a shared stack for every target.
With 30 objects selected, each call built 29.

ItemTarget::each_target and each_target_of now yield one target at a
time, and per_target and per_target_of collect them. The opacity proxy,
first_edited and the stroke proxy (which stops at a target it cannot
read) use the iterators, so a call that answers from the first object
builds no shared stack. The new test counts the stacks
built and fails with the eager form at either call site.
2026-11-27 13:32:23 -08:00
dotCooCoo 3c807e30d0 Parametric Shape: a new center, size or rotation takes a linked mask and placed gradients along
addon.pathtools.shape.set rewrote only the path and the shape's numbers, so
a linked opacity mask, placed gradients and pattern tiles stayed at their
old place when the shape moved, turned or changed size (a center-handle
drag, an explicit center, W or H with a reference point). The edit now
applies the transform between the old and new numbers to the object, as
object.scale and object.rotate do, and then sets the new outline. Scale
Strokes & Effects and Transform Patterns come from the new `strokes` and
`patterns` params or the preferences.
2026-11-27 13:22:59 -08:00
dotCooCoo bf4bb07ec7 Graphs: paint opacity params text matches what a series stores
The params text of paint.setFill and paint.setStroke said a graph series
stores a path's opacity when `opacity` changed it. The commands store it
whenever `opacity` writes the topmost visible row of the kind, also when
the row already had that opacity (capture_series_opacity_writes). The
text now says so, and docs/mcp.md states the rule with the other series
paint rules.
2026-11-27 13:10:53 -08:00
dotCooCoo 325ec7305c Color: a targeted layer shows the paint of its editable art
With a layer targeted and no Appearance row active, the Fill and Stroke
proxies walked the layer itself and could show the paint of a locked
or hidden object in it, while paint.setFill, paint.setStroke and
paint.editGradient edit the layer's selected editable art. A gradient
stop edit from the Gradient, Color or Color Wheel panel then wrote the
locked object's stops onto the editable art. The proxies now read the
selected objects, as the commands do.
2026-11-27 12:45:17 -08:00
dotCooCoo 44401d8739 Clean Up: keep the clipping paths of groups and layers
Object > Path > Clean Up passed no clipping state into a layer's
objects, so Unpainted Objects removed a clipping layer's compound
clipping path. It also looked inside a group or compound path used as a
clipping path, so Stray Points, Unpainted Objects and Empty Text Paths
removed its members and could leave an empty compound path clipping.
Blank type used as a clipping path was removed too.

The walk now finds a clipping path with Node::clips for layers as well as
groups, and leaves the clipping path and everything it holds as they are,
whatever kind of object it is.
2026-11-27 12:39:53 -08:00
BFlat 98b56f3d97 Merge pull request #7068 from ruchirguitar/feat/docinfo-path-area
feat(docinfo): add path area to Document Info (#6965)
2026-11-28 00:35:01 +07:00
HassanKhan 76181f49b3 Merge remote-tracking branch 'upstream/main' into fix-9227-offset-pasted-clip 2026-11-27 21:37:57 +05:00
dotCooCoo 4810395de9 Merge main into fix/transparency-symbol-part-display 2026-11-27 05:30:04 -08:00
dotCooCoo b5311fc40e Merge main into fix/blend-options-opening-drawing 2026-11-27 03:39:36 -08:00
HassanKhan cfc8c4613e Transform Each: Random with equal scales keeps proportions (#9320)
Random drew a separate share for the horizontal and the vertical scale,
so the same scale on both sides still came out uneven. Equal scales now
take one share; the five draws stay, so a seed keeps its moves and angle.
2026-11-27 15:50:41 +05:00
ruchirguitarandClaude Opus 5.5 1e5bac5fa3 fix(docinfo): work out the path area only while Objects is shown
The area pass normalizes every closed path's geometry, and the Document
Info panel fetches `document.info` again after each edit. A request now
skips the pass (`pathArea` null) when its category is not `objects` or
it passes `pathArea: false`, and the panel asks for the area only while
it shows Objects or All Categories (the cache key records which).

Tests: the engine gives no area for another category or with
`pathArea: false`, and the panel's result has no area while another
category is shown, edits included. Docs: gaps, parity and mcp rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 16:09:45 +05:30
FredApps 0378062246 Resolve Snapping documentation conflicts with main
Preserve the feature code and both sets of roadmap and parity notes.
2026-11-27 09:49:01 +01:00
ruchirguitarandClaude Opus 5.5 2d497db368 Merge main into the Document Info path area branch
Docs conflicts: main's "Last updated" banner; both sides' evidence and
history rows, newest first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:59:24 +05:30