mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 20:01:43 +00:00
Effects: pasted art keeps an SVG filter whose name the document gives another filter
Pasted art whose svg.filter effect named one of the document's SVG filters
but drew another definition kept that name, so editing or deleting the
document's filter rewrote the pasted art's filter. Paste now renames such
a filter to a free name ("Soft 2") when the art comes from another
document or from SVG, and takes the document's filter when the art is
pasted back into the document it was copied from. Symbols, patterns,
brushes and graphic styles on the clipboard follow the same rule.
This commit is contained in:
+3
-1
@@ -3680,7 +3680,9 @@ step. `svgFilter.apply {name, ids?|id?, item?}` applies one as the live effect `
|
||||
in one undo step. The effect (`{name, xml, scale, origin}`) names the document's filter: editing the filter changes
|
||||
what every object that uses it draws, in the edit's one undo step, and an application after an edit takes the edited
|
||||
filter. Deleting a filter that objects use leaves their effects in place, still named, drawing nothing (their `xml`
|
||||
empty) until a filter of that name is defined or imported again. Opened from such an effect, Apply SVG Filter shows the
|
||||
empty) until a filter of that name is defined or imported again. A pasted effect that names one of the document's
|
||||
filters but draws another definition keeps its own filter under a free name (`Soft 2`); pasted back into the document
|
||||
it was copied from, it takes the document's filter. Opened from such an effect, Apply SVG Filter shows the
|
||||
name above the list, not selectable. `effect.apply {effect: "svg.filter", params: {xml}}` takes a filter
|
||||
directly and names it by its `id`; an `xml` that isn't one such filter is an error. `ui.svgFilterDialog {}` opens Apply
|
||||
SVG Filter (New, Edit, Delete, Import…), and from the Appearance panel it edits which filter an applied effect runs;
|
||||
|
||||
Reference in New Issue
Block a user