Warning: This question might be specefic to Inkscape extension scripts written in Python.
I've come up with ideas for several little extensions scripts I'd like to write for Inkscape. Most deal with allowing the type of "precision" drawing that would make Inkscape more suitable for precision drawing. I keep running into an obstacle when I think about the design of these scripts, and I thought I might get some help here.
An example may be the easiest way to ask my question.
I want to write a script that makes one line segment parallel or perpendicular to another line segment. The problem is that I want to make the line segment selected last by the user parallel to the line segment that is selected first, not the other way around.
I'm looking for a way to do this without having the user run two scripts. The first to select the line that will not be modified, and the second to select the line that will be modified and that then performs the operation.
Does Inkscape "deliver" the selected items to an extension script in the order they were selected? Or is the order random? If the order isn't random, which items (or nodes) would come first? Those selected last by the user, or those selected first?
I hope my question makes sense. I might be pushing the envelope of what is possible with Inkscape's current extensions script system.
Thanks,
Scott Huey