Hey guys, I am trying to make a inkscape extension and seem to have stumbled out of the gate, my question is how to I get an extension to show up under the extension tab when i open inkscape.
I have downloaded inkcut and when I installed copy the files into the inkscape extension folder, the inkcut extension show up when I reopen inkscape. However, when I add the template file provided by the inkscape get started page, (only the .inx and .py files) I can't seem to get it to show up.
I looked through the inkcut inx and py files and i don't see exactly what is makeing them show up in the inkscape extension tab.
a related question, how is the menu structure in inkscape determined. Everything is in the same extension folder in the file directory, but when you open the extension menu inside inkscape, they are neatly nested, how is that determined.
Inscpae has two places where extensions are looked for when you start the application (if you did not fully restart Inkscape after you installed the new extensions, you should try that first).
Next, check under the "Preferences" and "System" ... this gives you a list of the various paths to resources on your computer where Inkscape loads and saves data from. Look to see what you have for the installed location if your inkcut extension and ensure that you've placed it either in the "User extensions:" location or in the "Inkscape extensions:" location.
Please let us know if that helped, otherwise there may be an issue with the extension itself which we can troubleshoot next.
ok I restarted my computers. and I found the tempate extension under render tab inside inkscape. So last night, I think I just did not find it for some reason. So problem solved.
I also found how to decide which menu it appears in. inside the inx there an effect-menu submenu that allow you to put your own extension where you want. I think i figured it out. Thank you.
Note that extensions have changed quite a bit since that template has been created and are somewhat incompatible. It needs to be updated for Inkscape 1.0, which will soon be released.
Thank you Maren, Do you recommand that i download the beta version of 1.0 to start developing a simple extension and if so, do you have a start up tutorial for 1.0 just to help me get started. Thank you.
Thanks yeungx for starting this topic! I want to write extensions for inkscape too, and I stumbled out of the gate by not finding a good, basic extension to examine.Thanks for posting those links!
I'm currently using Inkscape 0.91 and can't upgrade cause I'm using an outdated windoze computer. I have written a few addons and scripts in python for blender3d, so I'm not entirely new at this, just new to Inkscape's way of extensions. Since I'm using 0.91, is the API online somewhere for it?
Any information on error logs would be helpful, and I haven't seen anything like a python console window in Inkscape, so I assume there isn't one.
There are no error log files for runtime errors of extensions. If an extension doesn't show up in the menu, it's either that a dependency is missing (which would appear in extension_errors.log in your Inkscape preferences directory) , or that the inx file is not well-formed (viewing it in Firefox helps find the cause, as it will tell you which tag is not closed).
For runtime errors, you get a stacktrace printed out to a dialog in Inkscape. You can also log your own errors and debug messages to that dialog, with inkex.debug("message") (I think. It's now self.errormsg("message").)
Even if you're stuck on 0.91, you could download the 1.0 extensions. Or at least the python parts fromt he new API, it's better that you learn that anyway since so much has changed for 1.0.
You can put python from the 1.0 extensions in your local user extension path and then build from there using the 1.0 API.
It would be interesting to have this as a short guide for people such as yourself. If you get it working, please do write a quick sentence and we can add it to the wiki.
Hey guys, I am trying to make a inkscape extension and seem to have stumbled out of the gate, my question is how to I get an extension to show up under the extension tab when i open inkscape.
I have downloaded inkcut and when I installed copy the files into the inkscape extension folder, the inkcut extension show up when I reopen inkscape. However, when I add the template file provided by the inkscape get started page, (only the .inx and .py files) I can't seem to get it to show up.
I looked through the inkcut inx and py files and i don't see exactly what is makeing them show up in the inkscape extension tab.
a related question, how is the menu structure in inkscape determined. Everything is in the same extension folder in the file directory, but when you open the extension menu inside inkscape, they are neatly nested, how is that determined.
Thank you for your time.
Hi, yeungx:
Inscpae has two places where extensions are looked for when you start the application (if you did not fully restart Inkscape after you installed the new extensions, you should try that first).
Next, check under the "Preferences" and "System" ... this gives you a list of the various paths to resources on your computer where Inkscape loads and saves data from. Look to see what you have for the installed location if your inkcut extension and ensure that you've placed it either in the "User extensions:" location or in the "Inkscape extensions:" location.
Please let us know if that helped, otherwise there may be an issue with the extension itself which we can troubleshoot next.
Best,
Nathan
ok I restarted my computers. and I found the tempate extension under render tab inside inkscape. So last night, I think I just did not find it for some reason. So problem solved.
I also found how to decide which menu it appears in. inside the inx there an effect-menu submenu that allow you to put your own extension where you want. I think i figured it out. Thank you.
Certainly! Glad that you got it to work! Enjoy using Inkscape! =)
Note that extensions have changed quite a bit since that template has been created and are somewhat incompatible. It needs to be updated for Inkscape 1.0, which will soon be released.
See https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#For_extension_writers
I've also let Neon22 know about the need to update the template in a bug report on Github.
Thank you Maren, Do you recommand that i download the beta version of 1.0 to start developing a simple extension and if so, do you have a start up tutorial for 1.0 just to help me get started. Thank you.
Yes, I would recommend that you use the beta, and no, there's no guide, you need to look at https://gitlab.com/inkscape/extensions for up-to-date examples.
Here's a short info: https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#For_extension_writers
It's by far not enough, though.
Hi all!
Thanks yeungx for starting this topic! I want to write extensions for inkscape too, and I stumbled out of the gate by not finding a good, basic extension to examine.Thanks for posting those links!
I'm currently using Inkscape 0.91 and can't upgrade cause I'm using an outdated windoze computer. I have written a few addons and scripts in python for blender3d, so I'm not entirely new at this, just new to Inkscape's way of extensions. Since I'm using 0.91, is the API online somewhere for it?
Any information on error logs would be helpful, and I haven't seen anything like a python console window in Inkscape, so I assume there isn't one.
Thanks for any and all help....
There's no API documentation available for 0.91.
There are no error log files for runtime errors of extensions. If an extension doesn't show up in the menu, it's either that a dependency is missing (which would appear in extension_errors.log in your Inkscape preferences directory) , or that the inx file is not well-formed (viewing it in Firefox helps find the cause, as it will tell you which tag is not closed).
For runtime errors, you get a stacktrace printed out to a dialog in Inkscape. You can also log your own errors and debug messages to that dialog, with inkex.debug("message") (I think. It's now self.errormsg("message").)
Even if you're stuck on 0.91, you could download the 1.0 extensions. Or at least the python parts fromt he new API, it's better that you learn that anyway since so much has changed for 1.0.
You can put python from the 1.0 extensions in your local user extension path and then build from there using the 1.0 API.
It would be interesting to have this as a short guide for people such as yourself. If you get it working, please do write a quick sentence and we can add it to the wiki.