mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 19:40:21 +00:00
Select: Next Object Above and Below check only the selected object's siblings
Each press collected every object Select All can reach into a set and then tested only the siblings of the selected object. The siblings are now tested one at a time against the layers and groups that hold them, with the same rules as the walk: sublayers and the ruler guides of a layer are passed over, and an isolated object on its own is the one there is to select. The selected object is the same. A random-document test compares every node and every step, isolation mode included, with a copy of the earlier search. On 100,000 rectangles a step took a median of 11.5 ms of thread CPU time before and 0.08 us after (next_object_perf, release build).
This commit is contained in:
@@ -1225,6 +1225,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
`css.export` refuses a `scope` or `path` that is not a string (`5`, `true`, `["all"]`, `null`) before writing anything, instead of exporting the selection or returning the CSS as data; a left-out `scope` still exports the selection, and a left-out `path` still returns the CSS. `css.generate` and `css.export {scope: "all"}` refuse a malformed `ids` or `id`, which they do not use, as the selection's export does.
|
||||
Agents read the key object: `select.key` returns it, and `document.inspect` and the `ui.pointer` and `pointer_gesture` replies report it as `key`. `select.key` with an id that isn't a selected top-level object returns an error and leaves the key unchanged.
|
||||
The Select menu's Same commands, its Object commands that select art, Next Object Above and Below, saved selections and the Magic Wand (#2655) select only objects that Select All selects and objects inside them: nothing hidden or locked, nothing in a hidden or locked group, layer or sublayer, nothing on a template layer, and in isolation mode nothing outside the isolated group or layer. In isolation mode Select All, All on Active Artboard and Inverse select nothing while the isolated group or layer, or a group or layer it is in, is hidden, locked or a template layer.
|
||||
Next Object Above and Below check only the siblings of the selected object, each through the layers and groups that hold it, instead of collecting every object Select All can reach on each press, and they select the same object. In a release build, stepping from the middle of 100,000 rectangles on one layer takes a median of 0.08 µs of thread CPU time per step, against 11.5 ms with a test-only copy of the earlier search, and 0.08 µs against 7.4 ms with 1,000 groups of 100 (7 alternating runs of each in one process; `next_object_perf`). The earlier search's time grows with the number of objects in the document, so the change matters on large documents. `next_object_gives_what_the_search_over_every_selectable_object_gave` compares every node and every step of random documents, isolation mode included, with the earlier search.
|
||||
In a CMYK document the Magic Wand's Fill Color and Stroke Color tolerances run from 0 to 100 and compare the colors' CMYK values; in an RGB document they run from 0 to 255 and compare RGB values, as the [help page](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf) gives the two ranges. The distance is VectorCraft's own: the Euclidean distance between the C, M, Y and K percentages, with RGB, Gray and Lab colors converted to CMYK. A tolerance above 100 set in an RGB document applies as 100 in a CMYK document and comes back in an RGB one. `magicWand.set` refuses a tolerance out of its range and changes nothing (`cmyk_document_compares_fill_and_stroke_colors_in_cmyk`, `set_rejects_tolerances_out_of_range_and_changes_nothing`).
|
||||
The Magic Wand finds compound paths, the selected objects and the objects it picks through hash sets instead of searching lists, and it selects the same objects in the same order. In a release build, with every second object selected in a document of 50,000 paths (12,500 of them in 6,250 compound paths), setting that selection and Shift-clicking takes a median of 142 ms of CPU time, against 353 ms for the same steps run with test-only copies of the earlier searches, and 30 ms against 61 ms at 20,000 paths (7 alternating runs of each in one process, measured while other builds were running; `magic_wand_membership_timing`). Small documents gain little: 2.1 ms against 2.3 ms at 2,000 paths. `membership_sets_give_the_same_objects_in_the_same_order_as_searches` compares the selection in each mode with the earlier searches.
|
||||
Select ▸ Object ▸ Bristle Brush Strokes selects the objects whose topmost stroke has a bristle brush, whatever the brush is named, and leaves out objects whose brush is of another type, also when its name has "Bristle" in it.
|
||||
|
||||
Reference in New Issue
Block a user