scour
scour copied to clipboard
Option --create-groups should only factorize known attributes
I had a SVG with SMIL animation which I tried to optimize with scour (actually Inkscape but it turns out they use scour in backend. Ref: https://bugs.launchpad.net/inkscape/+bug/1638040).
Many <animate*> tags had a fill
attribute with freeze
value and scour therefore factorized them inside a single fill
on the parent node is used when it is absent. It only says that remove
is the default value (cf. https://www.w3.org/TR/SVG11/single-page.html#animate-TimingAttributes). As a consequence the SVG animation ended broken since I was relying on pieces of animation getting frozen to their last frame.
The create-groups
option should only create groups on attributes known to work with the parent's value.
P.S.: tested with scour 0.35.
Issue seems to have been discovered before: https://github.com/scour-project/scour/blob/210c5f64abdf336e25c58ca927093b3aa94c0a0c/scour/scour.py#L1007