mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 01:26:09 +00:00
Control bar: Select Similar Objects selects by the attribute its menu keeps
With something selected, the Control bar shows a Select Similar Objects
button and, beside it, the Select Similar Options menu. The button
selects the objects like the first selected one by the attribute kept
for the session; a menu item selects by its attribute and keeps it,
and the kept item is checked. The items are All, Fill Color, Fill &
Stroke, Stroke Color, Stroke Weight, Opacity, Blending Mode,
Appearance, Graphic Style, Shape and Symbol Instance.
- select.similar {by?} runs the select.same command of that name, or
for "all" matches fill and stroke colors, stroke weight, opacity and
blending mode together. An unknown by is an error that keeps the
selection and the kept attribute. The journal records the attribute
used, so a recorded action repeats it, and a failed script or plug-in
call puts the kept attribute back.
- The button and menu belong to the Object Options group and sit at
the right end of the bar, after the X, Y, W and H fields. They take
only the room the other controls leave, so the bar leaves them out
before any other control.
- The Paragraph tests' control_bar_node looks for a label before a
value, so a link's text run listed first no longer stands in for
the link.
Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
+18
-1
@@ -2776,6 +2776,22 @@ template layer, on a locked artboard while nothing is isolated, or outside the i
|
||||
such as a symbol instance just placed, is not passed over for being on a locked artboard while it stays selected. When
|
||||
the selection holds no other object, they return the error "nothing selected".
|
||||
|
||||
`select.similar {by?}` is the Control bar's Select Similar Objects button and the Select Similar Options menu beside it
|
||||
([help](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=165)). It selects the
|
||||
objects like the first selected object by `by` and returns `{count, by}`. `by` is `fillColor`, `fillAndStroke`,
|
||||
`strokeColor`, `strokeWeight`, `opacity`, `blendingMode`, `appearance`, `graphicStyle`, `shapeType` or
|
||||
`symbolInstance`, which runs the `select.same.*` command of that name, or `all`, which selects the objects whose fill
|
||||
and stroke colors, stroke weight, opacity and blending mode all match (tints, compound paths and Live Paint faces as
|
||||
`select.same.fillColor`); Select › Reselect repeats `all` as `all`. The menu's items, their order and what `all`
|
||||
compares are VectorCraft's own. A `by` given is kept for the session once the selection is made, and the menu checks
|
||||
it; without `by` the command uses the kept one, `all` until one is given. Any other `by` is an error that keeps the
|
||||
selection and the kept attribute, and an error of the `select.same.*` command it runs (for example "the selection has
|
||||
no graphic style") keeps the kept attribute too. It needs a selection and records no undo step; the journal records the
|
||||
attribute used, so a recorded action repeats it, and a script run that fails puts the kept attribute back. The button
|
||||
and the menu show while something is selected and the
|
||||
Object Options group is on, at the right end of the bar after the X, Y, W and H fields. They take only the room the
|
||||
other controls leave, so the bar leaves them out, together, before any other control.
|
||||
|
||||
`select.object.allOnSameLayers` selects the objects on the layers and sublayers of the selected objects that can be
|
||||
selected. A selected object that is hidden or locked, inside a hidden or locked group or layer, on a template layer, on
|
||||
a locked artboard while nothing is isolated, or outside the isolated group adds no layer. When the selection holds no
|
||||
@@ -6698,7 +6714,8 @@ where it is.
|
||||
`window.control.options {group, visible?}` (desktop app) turns a group of the Control bar's options on (`visible:
|
||||
true`), off (`false`) or toggles it (omitted), and returns `{group, visible}`. The groups are `snapping` (the Snapping
|
||||
menu), `anchors` (Convert and Anchors), `toolOptions` (the active tool's options), `objectOptions` (Isolate Selected
|
||||
Object or Exit Isolation Mode, the envelope controls and the symbol instance controls), `imageOptions` (a selected
|
||||
Object or Exit Isolation Mode, the envelope controls, the symbol instance controls and Select Similar Objects),
|
||||
`imageOptions` (a selected
|
||||
image's or Image Trace object's controls), `fillStroke` (the fill and stroke chips, Stroke and its weight and width
|
||||
profile), `opacity`, `graphicStyle` (Style, Recolor Artwork and Global Edit Options), `character`, `paragraph`,
|
||||
`verticalAlignment` (area type's vertical alignment), `alignDistribute`, `transform` (the Transform link and the X/Y/W/H
|
||||
|
||||
@@ -648,6 +648,7 @@ since 2026-10-01.
|
||||
- **Global Edit: Shift-click leaves a match out:** while Global Edit is on, a Shift-click with the Selection tool on a highlighted match, or on an object inside a matched group, leaves that match out (`select.globalEditExclude`): it is no longer highlighted and later edits leave it as it is; the object the edit started from stays, and Global Edit ends when fewer than two matches are left ([Update assets quickly with Global Edit](https://helpx.adobe.com/ph_fil/illustrator/how-to/global-editing-sensei.html)). Regression tests: `a_shift_click_*`, `an_object_left_out_*`, `a_group_left_out_*` and `leaving_out_all_but_one_*` in `crates/engine/src/tests/globaledit.rs`.
|
||||
- **Global Edit leaves out groups holding type or images:** Select › Start Global Edit on a group that holds type or an image, at any depth, refuses to start, and such a group is not taken as a match, as Global Edit does not take images or text ([Edit similar objects globally](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)). Regression test for a group holding type: `global_edit_needs_one_supported_object` in `crates/engine/src/tests/globaledit.rs`.
|
||||
- **Global Edit Options in the Control bar:** while Select › Start Global Edit can run, the Control bar shows a Global Edit Options dropdown that opens the same options as the Properties panel's (Match: Appearance, Size; On Artboards; Include Objects On Canvas; Result(s)); both set the same options. The dropdown is off while Global Edit is on; it sits after Recolor Artwork, ahead of the X/Y/W/H fields ([Edit similar objects globally](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)). Regression test: `the_control_bar_shows_the_global_edit_options` in `crates/ui-egui/src/chrome/tests.rs`.
|
||||
- **Select Similar Objects in the Control bar:** with something selected, the Control bar's Select Similar Objects button selects the objects like the first selected one, and the Select Similar Options menu beside it chooses what that is based on: All, Fill Color, Fill & Stroke, Stroke Color, Stroke Weight, Opacity, Blending Mode, Appearance, Graphic Style, Shape or Symbol Instance (`select.similar {by}`). The choice is kept for the session and checked in the menu ([archived help guide, select objects with the same attributes](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=165)). The list and what All compares are VectorCraft's own. Regression tests: `the_control_bar_selects_similar_objects` in `crates/ui-egui/src/chrome/tests.rs`, `select_similar_selects_by_the_kept_attribute` in `crates/engine/src/tests/menucmds.rs`.
|
||||
- **Global Edit's enabled check on large paths:** the check that decides whether Select › Start Global Edit can run on the selected path, compound path or symbol instance (which the Control bar makes every frame) measures the box of its anchors and handles instead of building and normalizing a copy of every anchor, with the same answer. On a 200,000-anchor path the check takes 0.7 ms instead of 2.2 to 3.0 ms. Regression tests: `support_*` in `crates/engine/src/cmd/globaledit.rs`.
|
||||
- **Start Global Edit is offered only for a group it can start on:** with a group selected, Select › Start Global Edit is disabled, and the Properties panel's Quick Actions and the Control bar do not offer it or its options, when the group holds type, an image or nothing, at any depth; the check walks the group's objects the same way, stopping at the first one Global Edit does not take. This is VectorCraft's own rule. Regression test: `start_global_edit_is_offered_only_for_a_group_of_supported_objects` in `crates/engine/src/tests/globaledit.rs`.
|
||||
- **Global Edit takes rotated copies:** Select › Start Global Edit on an object or group also takes its rotated copies, with the highlights before the start and the options' Results count, and an edit reaches each copy turned by its angle, as copies of a group rotated around a point are edited at once ([Design a modern geometric logo](https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html)). Under VectorCraft's own rules, a copy's angle is the one that lays the selected object's anchors and handles on the copy's in order, each within a millionth of the larger side of the copy's box; a reflected copy is not taken; and with Size, a rotated copy has the same size when it is the object rotated without scaling. Regression tests: `start_global_edit_takes_rotated_copies_*`, `a_rotated_copy_leads_*`, `size_takes_a_rotated_copy_*`, `a_square_whose_anchors_were_turned_*`, `rotated_groups_are_like_the_group_*` and `a_rotated_symbol_instance_*` in `crates/engine/src/tests/globaledit.rs`.
|
||||
|
||||
Reference in New Issue
Block a user