Is there an existing manner, either in form of the UI or via a script to sort objects alphanumerically according to their title or other attributes in the z-order?
Rationale: I create SVG objects/groups in another software and import them in Inkscape. The files are numbered in the order of their creation sequence (01-....).
Since I would like to use the super nice grid alignment function on those objects the order is important, so they do not get mixed up.
On my computer (Win 11) this works perfectly by just selecting the files in the file explorer, dragging them into Inkscape, they maintain the order and I can align.
However, I figured out that on some computers (and I cannot figure out why) the z-order is mixed up and is not respecting the file numbering. Not sure if that originates from the way the OS is currently sorting files?
I also tested if the sequence of selecting files before the import makes a difference, and it does not.
So the question is: In case the z-order of objects is not as desired would there be any possibility to sort it according to title or similar to avoid manual z-ordering or manual pre-alignment?
If no such function is existing, would it be something for a feature request list?
thanks a lot for that pointer. I will need to wrap my head around the code, in case I have to change it, since my python abilities are still a little rudimentary but something to get started.
Hi all,
Is there an existing manner, either in form of the UI or via a script to sort objects alphanumerically according to their title or other attributes in the z-order?
Rationale: I create SVG objects/groups in another software and import them in Inkscape. The files are numbered in the order of their creation sequence (01-....).
Since I would like to use the super nice grid alignment function on those objects the order is important, so they do not get mixed up.
On my computer (Win 11) this works perfectly by just selecting the files in the file explorer, dragging them into Inkscape, they maintain the order and I can align.
However, I figured out that on some computers (and I cannot figure out why) the z-order is mixed up and is not respecting the file numbering. Not sure if that originates from the way the OS is currently sorting files?
I also tested if the sequence of selecting files before the import makes a difference, and it does not.
So the question is: In case the z-order of objects is not as desired would there be any possibility to sort it according to title or similar to avoid manual z-ordering or manual pre-alignment?
If no such function is existing, would it be something for a feature request list?
Thanks in advance for any tips on this!
This would be a starting point for a script
If you know some basic python you should be able to change the sorting order
https://gitlab.com/inklinea/restack-by-name
I can't find the original thread on the forum though - it might have been something I wrote for another site, can't remember.
:)
Maybe this extension: https://gitlab.com/inklinea/restack-by-name
https://inkscape.org/fr/forums/questions/sorting-paths-by-name/
Hey @inklinea and @TylerDurden,
thanks a lot for that pointer. I will need to wrap my head around the code, in case I have to change it, since my python abilities are still a little rudimentary but something to get started.