Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hi, I am a newbie here learning how to write extensions on Inkscape. Right now I'm learning how to make Python extensions. In the long run, if things go well, I would like to also step up and write extensions in C++.
I am on OS X 10.9 (Mavericks).
I have managed to compile and run Inkscape successfully using MacPorts' inkscape-devel port file. Now, I have a quick question about how to install script extensions on Inkscape. Based on the wiki here I can just copy and paste my script files onto extensions dir (~/.config/inkscape/extensions). I did that by starting with my hello world example based on this page. After copying two files, INX and .py onto my extensions dir, I was expected to find my extension in Effects -> Examples menu, but I didn't find anything, not even the Effects menu once I started Inkscape from Terminal. Is there something I'm missing here?
- Inkscape-devel loads extensions from somewhere else entirely, instead of the directory I listed above, but I am not sure.
- I probably need to "execute" my script somehow before I can start Inkscape.
Any helps appreciated!
The 'Effects' menu had been renamed to 'Extensions' a couple of years ago, right before the release of Inkscape 0.47:
If the INX file has correct syntax and was parsed correctly, you should find the extension under
'Extensions > Examples > Hello World!'
If it doesn't load, you can find error messages related to the loading of extensions in
Edit: the renaming is only in the GUI - you do not have to change INX-internal tags.
I just tested the 'Hello World' extension, and it works as expected with current stable Inkscape, but fails (not unexpectedly) with trunk (aka 'inkscape-devel' from MacPorts), due to
Additional info is here:
This is an unfortunate situation for getting started with extensions: the breakage was not 'planned' - it was a side-effect of enhanced unit support in Inkscape core.
Thank you for these tips! I have got the Hello World example running now.
Is there any way to re-load the extension (if I modify the code) without having to close and re-open inkscape from Terminal?
If you modify INX files, you need to restart Inkscape to reload the new version.
Wrt script files: As long as the name of the extension script hasn't changed, there is no need to relaunch inkscape: the next run of the extension will launch the latest version (the content of the script itself is not cached AFAIU, only the path & file name).