Commit Graph
6644 Commits
Author SHA1 Message Date
.CooCoo 82108c11bd Merge pull request #9277 from dotCooCoo/feat/scripts-app-select-tool
Scripts: app.selectTool picks a tool
2026-11-30 09:44:47 -08:00
.CooCoo 8c1dc6bb5d Merge pull request #10069 from dotCooCoo/fix/brush-options-unchanged-undo
Brushes: Brush Options and Apply Brush that change nothing add no undo step
2026-11-30 08:45:52 -08:00
.CooCoo 99bc7a0702 Merge pull request #8743 from Silvertree2010/hand/print-cut-step-repeat
Add Object > Step and Repeat for print-and-cut sheets
2026-11-30 08:44:55 -08:00
.CooCoo fee0ecfbdd Merge pull request #10134 from dotCooCoo/fix/properties-selection-summary
Performance: Properties rows read a large selection once per edit
2026-11-30 07:53:44 -08:00
.CooCoo 44e57e37d7 Merge pull request #10169 from dotCooCoo/fix/shape-builder-fill
Shape Builder: Pick Color From defaults to Color Swatches, so a picked fill fills the merge
2026-11-30 07:53:27 -08:00
.CooCoo fdb2f64121 Merge pull request #10159 from dotCooCoo/fix/move-many-selected
Performance: a move finds the selected objects' places in fewer walks of the tree
2026-11-30 07:52:53 -08:00
.CooCoo 35980d8aba Merge pull request #10127 from dotCooCoo/fix/panel-menu-states-one-walk
Menus: panel menu states skip three selection walks on each rebuild
2026-11-30 06:56:41 -08:00
Codex 80ceb782aa Measure copied art from the active source artboard for Paste in Place 2026-11-30 13:27:12 +01:00
dotCooCoo 04ced9bee7 Performance: the check of a moved selection reads the objects at their places
After a move, the check that a view can move the selection's marks
instead of building them again looked each moved object up by id three
times: the object, its parent's id and the parent. With 10,000 objects
selected that was 30,000 lookups after the edit. The check now keeps
each object's place from the transform and reads the object and its
parent there, so the move looks each object up once, as before.
2026-11-30 03:33:26 -08:00
dotCooCoo 18271017b7 Merge main into fix/move-many-selected 2026-11-30 02:41:35 -08:00
dotCooCoo 8a6e6ccb26 Merge main into fix/properties-selection-summary
# Conflicts:
#	crates/engine/src/doc_state.rs
2026-11-30 02:25:24 -08:00
.CooCoo 2e330bef17 Merge pull request #10143 from dotCooCoo/fix/speed-global-edit-preview-member-list
Global Edit: moving the selected object keeps the preview without walking the document
2026-11-30 01:06:42 -08:00
.CooCoo 006106a3cc Merge pull request #10141 from dotCooCoo/fix/selection-marks-move-translate
Canvas: a move of the selection moves its marks instead of building them again
2026-11-30 01:06:26 -08:00
NetterSilver 07b4332dfc fix: Step and Repeat fill picks the artboard from the whole selection; rustfmt 2026-11-30 08:42:16 +00:00
dotCooCoo 2be42e7986 Shape Builder: saved Artwork from earlier versions switches to Color Swatches once
Leaving the Shape Builder saved every one of its options, so preferences
from earlier versions hold pickColorFrom "artwork" whether or not it was
picked, and kept the old default after Color Swatches became the default.

The preferences now carry toolSettingsVersion, written as 1 once a tool
setting is stored. Applying preferences without it changes a saved
Shape Builder pickColorFrom "artwork" to "swatches" and writes the
version, so Artwork picked after that is kept at the next launch. A
saved "swatches" and preferences without a saved pickColorFrom are
unchanged.

Docs: docs/mcp.md and the tool options params text.
2026-11-29 19:52:59 -08:00
.CooCoo 4f95a30c98 Images: a selected image's color mode is read from its file header (#10167) 2026-11-30 09:22:52 +07:00
.CooCoo ff60b8078d Merge pull request #10132 from dotCooCoo/fix/speed-object-move-large-doc
Performance: an edit skips unchanged objects without reading them
2026-11-29 18:21:16 -08:00
.CooCoo 8fe7aff22e Merge pull request #10120 from dotCooCoo/fix/missing-fonts-check-once
Missing Fonts: the frame after an open lists a document's missing fonts once
2026-11-29 18:20:43 -08:00
FredApps da851068bf Merge current main into Step and Repeat 2026-11-30 02:45:45 +01:00
dotCooCoo 9a58807841 Performance: a move finds the selected objects' places in fewer walks of the tree
With 10,000 objects selected, object.move walked the document's tree five
times and looked each object up by id three times. It now walks the tree
three times and looks each object up once.

- The selected roots (for the menus, for Move, Rotate, Scale and the
  other transforms, for Copy and Cut, and inside an isolated group) are
  put in paint order and reduced to their top-level objects from one walk
  instead of two.
- A transform finds the objects' places once for Transform Patterns and
  for the edit, instead of once for each.
- After a transform, the check for a pixel-aligned compound path reads
  the parent at the object's place instead of looking the object and its
  parent up by id.
2026-11-29 16:44:27 -08:00
dotCooCoo d82a022446 Merge main into feat/match-objects-to-key 2026-11-29 15:41:29 -08:00
dotCooCoo 2960e55b6c Match Objects: a stacking match keeps clipping paths and settles Intertwine groups
Merging main made DIALOGS one entry short: Offset Objects and Match Objects
both joined it, so vectorcraft-ui-egui did not compile. The table now
declares seven entries.

A stacking match moved a clipping path out of its clip position and could
move a member out of an Intertwine group with its old overlap tiers. It now
refuses to move a clipping path, refuses a destination that would nest
Intertwine art, and clears the tiers of members that leave their group.

A stacking or rotate-only match no longer needs bounds on the source. A
size match measures each target after it is sized and turned, in its final
frame, and is refused when a target can't take the requested size, instead
of reporting success with the size unchanged. A target with no bounds that
needs to turn is refused.
2026-11-29 15:40:43 -08:00
dotCooCoo 3aa41526e2 Performance: the color check stops walking objects after a second color
several_colors kept looking up the remaining ids, walking the remaining
children of a group and the rest of a pattern tile after it had found two
colors. It now stops as soon as the second color turns up.
2026-11-29 15:18:35 -08:00
dotCooCoo f11aac5aaa Merge main into feat/match-objects-to-key 2026-11-29 15:00:53 -08:00
dotCooCoo 1a7e524d90 Merge main into fix/speed-global-edit-preview-member-list 2026-11-29 14:48:54 -08:00
dotCooCoo d7a71b7a58 Global Edit: moving the selected object keeps the preview without walking the document
With one object selected, the preview of the objects Start Global Edit
would take walked every selectable object again after each edit. After
an edit that replaced only the selected object, and left it the same
shape, size and appearance (a move), the same objects match, so the
outlines found before are kept.

The check compares the two documents: the layers may differ only in
the selected object and in the layers and groups that hold it, which
must be the same apart from their contents; the symbols and the rest
of the document must be the same. The selected object's form, box,
geometric size and fill and stroke are compared within a millionth of
the matching tolerance, since a move rounds the form differently in its
unit box. Any other change walks the document as before.

The preview is now also empty while a part of a dynamic symbol
instance is selected, as Start Global Edit is refused then.
2026-11-29 14:47:33 -08:00
dotCooCoo e0670403e2 Merge main into fix/selection-marks-move-translate 2026-11-29 14:09:19 -08:00
dotCooCoo 389fc65631 Canvas: a move of the selection moves its marks instead of building them again
The canvas kept the selection's outlines, anchors and dots only while the
document revision stayed the same, so every move command, nudge and drag
step built them again from every selected object. With 10,000 selected
rectangles one build took about 26 ms in a release build.

A move of whole objects now records the documents before and after it
and the distance (DocState::moved). The record is made only when each
moved object is still the node the transform left (no later pass, such
as the pixel grid snap, changed it), none is a member of a blend, and
every object the selection shows, the key object and the key anchor's
object included, is a moved object or inside one. Copies, scales, moves
of patterns alone and moves that resize type areas make no record.

The canvas moves its kept marks by that distance when the record names
the document they show, or the document a drag began with. It also keeps
them through a new revision of the same document and selection, as at
the end of a drag. Every other change builds them as before.
2026-11-29 14:09:19 -08:00
dotCooCoo 97566860ec Merge main into feat/match-objects-to-key
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/plugin_call/reviewed.rs
#	crates/ui-egui/src/addons/arrange.rs
#	docs/mcp.md
2026-11-29 13:57:34 -08:00
dotCooCoo d3e02f41a1 Performance: Properties rows read a large selection once per edit
After an edit the selection keeps no record of its paints, so the Fill
and Stroke chips and the Stroke and Width Profile rows looked up the
groups around every selected object for Live Paint faces and edges each
time they were drawn. DocState::live_paint_covered_kept keeps an empty
answer for that version of the document and those objects.

The Recolor quick action listed and sorted every color of the selection
to see whether it held more than one. Session::several_colors_used reads
the same objects and pattern tiles and stops at the second color.
2026-11-29 13:52:49 -08:00
dotCooCoo 42bd1ffdfc Merge main into fix/speed-object-move-large-doc 2026-11-29 13:03:13 -08:00
dotCooCoo aaa54f1307 Performance: an edit skips unchanged objects without reading them
After every edit, the pixel grid, color mask, Objects on Path, Shaper and
symbol instance passes, and the inline graphics refresh, pair each object
with its counterpart from before the edit. Each pass read both objects to
compare their ids before it found that they were the same node, so moving
one object in a layer of 20,000 objects read all of them in four passes.
The color mask pass is new since v0.24.1, and object.move became slower
than in that release.

The new vectorcraft_doc::changed_nodes does the pairing for all six. An
object that is the same node at the same position is skipped by a pointer
comparison; only changed and new objects are looked up by id.

object.move of one rectangle in a document of 20,000 objects, release
build, median CPU time of 2,000 moves: main 1.25 ms, this change 1.08 ms,
v0.24.1 1.06 ms. The passes' share of the move went from about 30% to 5%
in a profile.
2026-11-29 13:03:07 -08:00
dotCooCoo 7a09189a88 Menus: panel menu states skip three selection walks on each rebuild
The menus rebuild every panel menu's states on each edit and selection
change. With 10,000 objects selected, three of those menus walked the
whole selection for values they did not use or had already read:

- Make Opacity Mask's check sorted the selection into paint order for
  its outermost objects before testing whether the selection has one
  subject root, and it is enabled without that sort for any other
  count. The check now sorts only for one root and no target.
- The Transparency menu built the panel's full values (opacity, blend
  mode, isolation and knockout compared across the selection) to read
  its first target. It now reads that target alone
  (`Session::transparency_target`), and checks Make Opacity Mask only
  when that object has no mask, the only case whose rows show it.
- The Color and Color Wheel menus asked the session whether the fill
  and stroke differ, once in the Color menu and twice in the Color
  Wheel menu. They now read the proxies' per-revision cache, which the
  Tools panel's proxies fill on the same revision.

On a test document of 10,000 rectangles, all selected, one pass over
the panel menus' states took 24 to 31 ms before and 16.5 to 17 ms after
(release build, four passes each).
2026-11-29 12:32:19 -08:00
dotCooCoo c7487a4657 Missing Fonts: the frame after an open lists a document's missing fonts once
The frame after a document opens checked whether its Missing Fonts dialog
waits by building the whole dialog (opening::may_switch), and the dialog
pump then built it again to open it. Each build walked the document's type
and resolved every font it names: 6.5 ms over the two calls at 20,000
objects.

The rows are now kept in CanvasCache::missing_fonts for the document's
content version and the font database's generation, the same key Type ›
Find Font's cache uses, and both calls read them. An edit or a font that
loads while the dialog waits makes the next call list the fonts again. The
Fonts folder next to the document is still looked up when the dialog opens.
Rows are dropped once their document no longer waits.

text.missingFonts's answer is unchanged; its rows and its folder are now
two engine functions, missing_font_rows and fonts_next_to_document.

Tests count the row lists (one for the check and the open together) and
check that a document edited while its dialog waits lists its new font.
2026-11-29 11:42:07 -08:00
dotCooCoo 7e5d8d368c Merge main into fix/global-edit-preview-cache 2026-11-29 11:36:55 -08:00
dotCooCoo 3617039ef5 Global Edit: the canvas shares the kept outlines instead of copying them each frame
With one object selected and the Selection tool active, or while Global
Edit is on, every frame copied each highlighted outline out of the kept
list and made one overlay per object, which the canvas flattened and
stroked again. With 10,000 matching objects that was most of a 27 ms
frame.

highlights and similar now return the kept outlines as a shared
Highlights, grouped by layer color with a revision that changes only when
the outlines are found again. The session sends one Overlay::Outlines per
color, and the canvas shows it as a SelectionOutline keyed by that
revision, so the lines are stroked again only when the outlines or the
view change.
2026-11-29 11:36:48 -08:00
dotCooCoo cddc75cf5c Brushes: only Brush Options skips an unchanged library save
The equality check that skips the undo step now sits in brush.options,
which compares the edited brush with the stored one. New, Delete, Move,
Duplicate and Replace Brush Art save the library as they do on main,
without decoding it a second time. docs/target-app-parity.md lists the
no-op rules for Brush Options and Apply Brush with their tests.
2026-11-29 10:27:30 -08:00
dotCooCoo fda48b02d0 Merge main into feat/scripts-app-select-tool 2026-11-29 10:25:17 -08:00
.CooCoo 283902214f Merge pull request #10075 from dotCooCoo/feat/offset-objects-row
Arrange Tools: Offset Objects chains the selection in a row or a column with a set gap
2026-11-29 10:23:17 -08:00
.CooCoo 8aa8120586 Merge pull request #9777 from ruchirguitar/feat/spell-check
Spell-check other languages from the Craft apps' Language packs
2026-11-29 10:23:00 -08:00
dotCooCoo bd0d0149ac Brushes: Apply Brush text says it clears a stroke's own settings
brush.apply clears the brush settings of each path's top stroke, and
clearing them is one undo step. The command text and docs/mcp.md now
limit the no-op to a current brush whose top strokes already have it,
paint, a width above 0 and no settings of their own. A new test applies
the current brush to a stroke with its own settings and checks that they
are cleared as one undo step.
2026-11-29 10:00:26 -08:00
.CooCoo 9bbc3950e1 Merge pull request #10094 from dotCooCoo/ci/warnings-G1
Engine: end_folder no longer warns about unused s and turn on wasm32
2026-11-29 09:51:35 -08:00
dotCooCoo a5f877e0d1 Merge main into feat/match-objects-to-key 2026-11-29 09:39:05 -08:00
dotCooCoo 13f3227220 Match Objects: rotate says which way it turns; scaleStrokes is journaled
The gate's turn_direction test failed because the `rotate` param of
addon.arrange.match did not say which way it turns. Its description now
says each target turns clockwise or counter-clockwise to the source's
angle.

Match, Set Size of Each, Swap, Replace and Sort now record the resolved
`scaleStrokes` value in their journal entry, so a replay scales strokes
the same way after the preference changes.
2026-11-29 09:39:04 -08:00
ruchirguitar a4659724f6 Merge main into feat/spell-check
Cargo.toml: #10049 moved craft-libs to 186a229c; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 22:41:45 +05:30
dotCooCoo 91e4c6fbce Engine: end_folder no longer warns about unused s and turn on wasm32
end_folder uses its Session and StoreTurn only in the native arm that
finishes loaded modules and saves the disabled list. The wasm32 build has
no such arm, so rustc reported both parameters as unused there. The
function now marks them used under cfg(target_arch = "wasm32"), as
install_folder above it already does.

cargo check -p vectorcraft-engine --target wasm32-unknown-unknown:
2 warnings in vectorcraft-engine before, 0 after. The manifest and patch
warnings it also prints are unchanged.
2026-11-29 09:10:51 -08:00
.CooCoo 619a6e5ed1 Merge pull request #10071 from dotCooCoo/fix/symbol-options-unchanged-undo
Symbols: Symbol Options and Replace Symbol that change nothing add no undo step
2026-11-29 09:10:19 -08:00
.CooCoo e21b9202e9 Merge pull request #10048 from dotCooCoo/fix/transparency-info-values
Transparency: transparency.info reports the selected symbol part that transparency.set edits
2026-11-29 09:07:52 -08:00
dotCooCoo 6ef6df3407 Scripts: round artboard rows as main's New Document test expects, and drop pathItems= from the host table
Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
  sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
  rows value that was not a whole number. rows now rounds like columns and is
  still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
  setter of main's placeholder. This branch makes pathItems a read-only
  collection, like pageItems, so the row goes.
2026-11-29 06:45:32 -08:00
dotCooCoo 7a71837dea Scripts: keep new-art defaults and direct selections through path edits
- PathPoint.remove() renumbers the direct-selected anchors and segments
  after the removed point, and drops the removed anchor and the selected
  segments it ended, through selection commands after the points are
  written. A removed anchor no longer stays selected, and the same index
  no longer selects a different point.
- pathItems.add() reads new art's paint after the target document is
  active, so a path added to a document in the back keeps the stroke
  that document's selection gives new art.
- Paths a script draws put new art's paint back afterwards, so a
  defaultStrokeWidth the script set applies to every path it draws, not
  only the first.
- appearance.setNewArt refuses a fill or stroke paint with a setting a
  paint does not take, such as opacity, instead of applying the rest.
2026-11-29 05:51:46 -08:00