I was wondering how to obtain the current selection from within an Inkscape script written in Python. I note that the getselected method in the inkex.py file contains a comment that says it "Collect selected nodes". Does this mean that it only returns the nodes from the selection? Does it return the DOM representation of the selection?
What is the quickest way, if it is even possible, to obtain the current selection in Inkscape from a python script? I'm thinking maybe I can get an id of the selection with a helper method an then use some methods in to get the DOM element of the selection using the "id" attribute.
I hope my question makes sense. I've been trying to read through some of the material online about writing scripts and/or extensions for Inkscape, but I must admit it is a little confusing for me. I appreciate your patient assistance.
I will do my best to post a summary of any responses to this question on the Inkscape wiki if that would help other future script writers. :]
Scott Huey