scour icon indicating copy to clipboard operation
scour copied to clipboard

Option --create-groups should only factorize known attributes

Open Jehan opened this issue 8 years ago • 2 comments

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 group. The problem is that the SVG spec says nowhere that the value of 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.

Jehan avatar Nov 01 '16 15:11 Jehan

P.S.: tested with scour 0.35.

Jehan avatar Nov 01 '16 15:11 Jehan

Issue seems to have been discovered before: https://github.com/scour-project/scour/blob/210c5f64abdf336e25c58ca927093b3aa94c0a0c/scour/scour.py#L1007

Ede123 avatar Nov 27 '16 18:11 Ede123