Merge pull request #8628 from dotCooCoo/fix/live-paint-bucket-fill-color

Live Paint: a color chosen with the Live Paint Bucket is the color it paints with
This commit is contained in:
BFlat
2026-11-19 15:06:53 +07:00
committed by GitHub
16 changed files with 500 additions and 41 deletions
+18 -2
View File
@@ -3891,8 +3891,10 @@ already walks Image Trace. Short agent entry points:
moving and transforming, `path.moveAnchors`, `file.place` with `replace`, Puppet Warp, Delete
and Cut, Group, Hide, Lock, Arrange, Expand,
Recolor Artwork, plug-in filters, effects, the gradient commands, `gradient.selectStop`, the Appearance panel's rows and
`symbol.instance.setAppearance`. A Cmd-drag that lends the Selection or Group Selection tool selects the instance whole
first and moves it. `swatch.unused` and `recolor.colors` count the fills and strokes an instance keeps for objects of its
`symbol.instance.setAppearance`. While the Live Paint Bucket is the active tool, `paint.editGradient` and
`gradient.presets.apply` without `ids`, `id` or `item` change the bucket's gradient instead, and
`gradient.selectStop` selects a stop of it. A Cmd-drag that lends the Selection or Group Selection tool selects the
instance whole first and moves it. `swatch.unused` and `recolor.colors` count the fills and strokes an instance keeps for objects of its
art. Commands that change nothing in the document, such as `attributes.info`, `css.selection`, `css.export`,
`effect.list` and `object.expand.info`, read the instance. These commands do not check for a selected object and use the instance:
`edit.copy` copies the instance whole; `document.exportSelection`, `document.export` with `selectionOnly` and
@@ -4681,6 +4683,20 @@ already walks Image Trace. Short agent entry points:
another scope, or one that is not an array of the group's edge ids or names an edge twice, is an error and changes
nothing. `livePaint.fill` and `livePaint.strokeEdge` refuse a `scope` other than `"one"` with `points`. Both replies add `count`, the number of
faces or edges the click reaches, including those that already had the paint.
While the Live Paint Bucket is the active tool, a fill or stroke color chosen without `ids`, `id` or `item`
(`paint.setFill`, `paint.setStroke`, `paint.none`, `paint.lastColor`, `paint.lastGradient`, `paint.editGradient`,
`paint.invert`, `paint.complement`, `paint.sampleColor`, `gradient.presets.apply`, a swatch or the Color Picker), and
`paint.swap` or `paint.default` without `ids` or `id`, becomes the color the bucket paints with, and a stroke weight
(`stroke.set`, `stroke.weightUp`, `stroke.weightDown`) becomes the weight it paints with. The selection keeps its
paint, and no undo step is recorded. A null `ids` or `id` counts as left out. The Stroke panel's other options
(`stroke.set`, `stroke.setAdvanced` without `brush`) change the stroke for new art and leave the selection as it is;
the bucket takes only the color and weight of that stroke. A stop selected on the bucket's gradient
(`gradient.selectStop`) is deselected when another tool is chosen, when the first selected object changes, when an
object of a symbol instance's art is picked or released, when the other proxy comes to the front, and when the
Appearance panel's active row changes. The Fill and Stroke proxies (`paint.proxies`) show those colors, never mixed, the Stroke panel shows
that stroke as it does with nothing selected, and with New Art Has Basic Appearance off the selection's appearance
does not replace them after a command. They are also the fill and stroke for new art, so another tool chosen
afterwards keeps them until a command or a new selection changes them.
With the Live Paint Bucket selected and no drag in progress, Left and Right without Shift, Alt or Cmd/Ctrl (which
keep their shortcuts) run `paint.setFill {swatch, ids: []}` (or
`paint.setStroke` when the Stroke proxy is in front) with the color swatch before or after the active paint in the