Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: Krzysztof on July 22, 2019, 01:06:13 PM

Title: Save transformations independently on each object instead of group
Post by: Krzysztof on July 22, 2019, 01:06:13 PM
Hello. I would like to free groups from any transformations and force Inkscape to save them on each grouped object independently.
I think I have seen somewhere such feature (in inkscape or built-in addons) but don't see it now.
Or maybe i have seen things ...
Title: Re: Save transformations independently on each object instead of group
Post by: Moini on July 23, 2019, 06:29:15 AM
Are you maybe looking for this: https://inkscape.org/~Klowner/%E2%98%85apply-transforms ? Another option is to ungroup and then regroup, with coordinate saving set to absolute in Edit > Preferences > Input/Output > SVG output.
Title: Re: Save transformations independently on each object instead of group
Post by: Krzysztof on July 26, 2019, 03:09:59 AM
Are you maybe looking for this: https://inkscape.org/~Klowner/%E2%98%85apply-transforms ? Another option is to ungroup and then regroup, with coordinate saving set to absolute in Edit > Preferences > Input/Output > SVG output.

Nope, SVG output setting absolute/relative is related only to paths and has nothing to do with transformations on group or objects in group.
Apply transform is nice idea, but still is not reliable at 100%. It just breaks more complicated drawings. I will report this to author in later time, now i am strict at some deadline.

Group / regroup is some solution but is inconvenient to do this manually - it is not one group. When group is exploded in inkscape then transforms are moved to nested groups or objects. Exploding nested groups in inkscape quite often making the transforms to return on parent group. So good extension like deep regroup is needed. For one drawing this inconvenience can be overlooked, but with many SVG ...

I am unfortunate to this point my work will be ported to external software which is using similar syntax to SVG specification but with some exceptions - transforms like matrix doesn't exists at all and translate is using in other way. Scale and rotate have the same function. But rotate is not using anymore in modern softs replaced by shorter matrix transform. Inkscape still using rotate but only when rotate is the only  transform, otherwise matrix makes its enter. I really actually stand on my head only to make drawings compatible.
But my previous question has no sense - for illustrator CS6 it is better when the main group has all transforms. Illustrator is weird a little - it only use matrices and only when there is no possibility to flat transforms, but if other program created many transforms like inkscape like to do this, illustrator just leave them be - it even doesn't alter them applying own transforms directly on object and fitting all modification to be corelated with existed transforms.

EDIT: further tests showed that even with combination inkscape/illustrator CS6 i still can't get rid of some transforms.
Well, i will somehow fit my works to the limitations but it is really tiring ...
Title: Re: Save transformations independently on each object instead of group
Post by: Moini on July 26, 2019, 06:09:10 AM
If I may ask: What type of specialized software is that that you must be using? It seems to be very limited.
Title: Re: Save transformations independently on each object instead of group
Post by: Krzysztof on July 29, 2019, 06:54:17 AM
Schneider TGML graphics editor. It has own drawing capabilities but they are so scary poor that using it as editor has no sense.
It allow to create finished graphic (with animation and other features) for Building Management System of Schneider solutions.

EDIT: next funny thing (funny in sad matter) if there is no stroke="none" then TGML thinks stroke is black.
Fortunatelly inkscape is quite smart on this, but illustrator ... removes stroke attribute.
Title: Re: Save transformations independently on each object instead of group
Post by: Moini on July 29, 2019, 04:56:39 PM
I see... I think in that case, I would just ungroup everything before exporting to optimized SVG. Or do you need the groups in the other software, and not just for editing?

Extensions > Arrange > Deep Ungroup would be helpful for that.
Title: Re: Save transformations independently on each object instead of group
Post by: Krzysztof on August 02, 2019, 02:51:33 AM
No, i need groups, TGML is using them as well to organize object into subparts. What i would need is "Deep Regroup".
Title: Re: Save transformations independently on each object instead of group
Post by: Moini on August 02, 2019, 08:33:41 AM
MMmh. I think that hasn't been invented yet... :-/ Maybe make a feature request at https://inkscape.org/report ?
Title: Re: Save transformations independently on each object instead of group
Post by: Moini on August 02, 2019, 08:35:14 AM
But call it 'Add options to apply transformations' or similar.

Thinking about it... Have you tried what happens when you save as optimized SVG? Does that do anything useful for you?
Title: Re: Save transformations independently on each object instead of group
Post by: Krzysztof on August 02, 2019, 01:46:41 PM
Not much useful, and it is annoying to choose "save as optimized svg" with each save - it should remember my save settings in current session.
This option creates similar syntax like Illustrator exporter do as usual when saving. It still leaves all transforms intact.
I would write deep regroup myself but it will take too much time to learn the basics about extensions.
Apply transforms is a feature requested already since 8 years and only Klowner made his approach (not 100% successful unfortunately) as third party addon.
It seems too less people needs sth like this - i draw in inkscape from time to time since 2011 and this is first time i need to examine how it save SVG and why graphics looks differently in other software.