Closed odisseus closed 9 months ago
That's an interesting discrepancy between Inkscape and Simple Inkscape Scripting. When I get back from travel (toward the end of the month) I'll look into making ungroup
first apply its transform to its immediate children. In the meantime, you can use code like the following to perform that step explicitly:
for o in gr:
o.transform = gr.transform @ o.transform
gr.ungroup()
ungroup
's behavior should now match that of Inkscape's. Post again if you find any cases I overlooked.
It works for me, thanks!
I have a script which generates several objects, groups them and applies a transform to the whole group. When I ungroup these objects with the Inkscape UI, all the objects remain in place. However, if I call the group's
ungroup()
method within the script, the objects look like the group's transform has never been applied to them (e. g. shifted coordinate origin).