use current drawing datas in Extensions (inx) files WAS Re: Extensions (inx) files
Le mercredi 23 avril 2008 à 17:10 +0200, Marcin Floryan a écrit :
I suppose one could think about creating an interface between Inkscape and the running external Extension via a simple messaging system using D-Bus architecture (especially that it already provides binding for Python among others). That would fit neatly with the plans to use D-Bus for Inkscape anyway.
Would be extremely useful and powerful for extension designer, better than redesign the well each time an extension need a boolean operation or sthing else !
But what would be actually really useful for some projects is that we can use data taken from the current drawing inside an extension dialog.
Just for instance, I want to design an origami diagram manager upon inkscape, where each step is stock in an svg:g with an id in a particular namespace. Writing an extension where I can manage the creation or removing of a step, open the new group in order to the step will be drawn inside it is really easy (I am on the finishing of this part) with lxml, but I would love to write another part to choose the step to edit, where the extension dialog let me shows all the step-id and title of the current drawing.
I have think about delegate some parts of my project on another gui -tkinter or something else- when I need to use datas from the drawing, but something like :
<xslt:for-each select="g[@oh:step]"> <option value="{./@id}"><xslt:value-of select="@title" /></option> </xslt:for-each>
would be really really great.
But I know .inx are loaded when inkscape is launched, thus this behaviour is currently impossible. But if begin to clean this part of inkscape...
Regards,
On Wed, 2008-04-23 at 10:50 -0700, Aurèle Duda wrote:
Le mercredi 23 avril 2008 à 17:10 +0200, Marcin Floryan a écrit :
I suppose one could think about creating an interface between Inkscape and the running external Extension via a simple messaging system using D-Bus architecture (especially that it already provides binding for Python among others). That would fit neatly with the plans to use D-Bus for Inkscape anyway.
Would be extremely useful and powerful for extension designer, better than redesign the well each time an extension need a boolean operation or sthing else !
If I read your e-mail correctly, this would be something like a macro recorder that could turn a set of steps into an extension. Yes, that would be very cool.
You mention that INX files are only read on startup, and yes that is currently the case. The only reason for this is simplicity. I think the only place that the code may need an update is putting effects into the menus to do it dynamically. That shouldn't be too hard. Everything else is generated off a dynamic database of entries. If you don't want them to have menus (i.e. they're displayed somewhere else) all the code is there to load the extensions dynamically.
Sounds like a cool project!
--Ted
participants (2)
-
Aurèle Duda
-
Ted Gould