Hi all,
About a year ago, I posted regarding a Python graphical scripting tool I was working on. I got sort of hung in the middle, because I started with Skencil, then started looking at Inkscape.
Inkscape was simpler in one respect because the SVG representation is easier to manipulate, but it's harder to integrate the plugin because I couldn't (easily) *use* Inkscape from the script.
For example, it would be nice to be able to select and skew an object using Inkscape's selection and transformation tool rather than having to compute and apply the transformation at the point level within my program, but that would require a way to call that tool from the Python script.
In Skencil, by contrast, this is relatively simple to do, because the Skencil API is completely accessible to scripts and plugins.
The downside is that Skencil uses an internal Python object model for the drawing which is not easily serializable. Thus, for example, it is very awkward to keep a library of drawing components available for my program to manipulate.
When I brought this up on inkscape-user, I was told that a DOM API would (at sometime) be made available which would solve this problem (although now that I think about it, "document" doesn't really fit, though "object model" does -- this may've been a miscommunication?)
I have recently seen "DOM" mentioned in the inkscape-devel archives, but that seems to be a different concept -- the idea of a DOM to describe the SVG file being manipulated, not the Inkscape application doing the manipulation.
I didn't have a pressing enough need for the tool I was writing to plow through this obstacle, so I wound up setting it aside, thinking that it might prove easier later anyway.
So I'd just like to ask if functionality like this already exists in Inkscape, is on an existing roadmap, or if this is something I ought to place as a feature request?
Cheers, Terry
On Mon, Nov 26, 2007 at 02:10:22PM -0600, Terry Hancock wrote:
So I'd just like to ask if functionality like this already exists in Inkscape, is on an existing roadmap, or if this is something I ought to place as a feature request?
It's on the roadmap, but needs more developer attention before an ETA could be given for it.
Bryce
On Mon, 2007-11-26 at 14:10 -0600, Terry Hancock wrote:
When I brought this up on inkscape-user, I was told that a DOM API would (at sometime) be made available which would solve this problem (although now that I think about it, "document" doesn't really fit, though "object model" does -- this may've been a miscommunication?)
I have recently seen "DOM" mentioned in the inkscape-devel archives, but that seems to be a different concept -- the idea of a DOM to describe the SVG file being manipulated, not the Inkscape application doing the manipulation.
Well the reason that DOM has been advocated over other models is that it provides a consistent well documented API for us to support. It means that we can easily maintain compatibility with past and future plugins without having to publish and document an API.
I believe this is one of the largest strengths we've gained by having Inkscape based on SVG. For a large majority of things, there is no debate we've already agreed on a format that is standardized.
Certainly there are features that would be desirable to use inside scripts. This is why I've advocated an interface to allow calling of verbs on a document. If you look at the work done by the guys at GLIMMER I believe they've shown the power of this approach (and I promise to get it integrated shortly!)
--Ted
participants (3)
-
Bryce Harrington
-
Ted Gould
-
Terry Hancock