
On Monday 18 Apr 2005 22:48, aaron@...749... wrote:
bulia byak wrote:
- if the extension creates a new object, it should not copy anything
from the original at all, just create a new document with that new object;
I was hoping to add "Create slices layer", "Remove Slices layer", "Toggle slices", etc., and perhaps an actual tool that draws slices as opposed to normal rectangles too. For this, a much more sophisticated system would be required, I think: something like exposing the DOM, along with some helper functions and the existing objects defined by tools etc.
Off the top of my head, and thinking very long-term (I realise it's a bit of work to implement), I'd want a python scripting interface something like this:
* Probably most important: direct access to the DOM, or better yet, an object-oriented abstraction of it that, which allows you to use the subclasses in the next points.
* Ability to subclass existing objects
* Ability to subclass and add existing tools, and to define event handlers in this tool class for only what is needed beyond the default handler. For example, a slice would act very much like a rectangle, except for:
- forced colour and transparency (at least, forced in individual objects, but settable on a global basis, or overridable on an individual basis), set during creation of the rectangle
- snapping while moving/scaling: to other slices, to the edge of the page, and perhaps to the edges of underlying objects
- the ability to hide/unhide objects when a tool is selected (so that the slices layer would only appear when you click the slices tool)
* Ability to add menus, submenus, and menu items, including toggles, mutually exclusive items, and items that are disabled unless certain conditions are met. For example, I imagine I'd want menu items that are ghosted unless a particular kind of object is selected.
* Some way of offering extended options for export, that's uniform and appears when expected rather than when a simpler architecture allows.
With those, you would have a very complete and powerful plugin system, imho. With one more, which requires a more fundamental change to Inkscape, I'd be both very happy, and very optimistic about Inkscape's success:
* Eventually, the ability to define "property panels", such as those in 3DS Max etc, which scroll and collapse in a side bar. This is probably the most extensible, powerful, and usable plugin interface I know of. It's great for building complex apps with lots of add-ons in a without things getting messy :)
I personally would much rather wait for effects to be implemented properly. By that I mean that they affect the document in the user's window preserving the name and undo, etc.
Agreed. I think it would be better to define a good framework, and move toward that slowly, implementing the most crucial features first, rather than