Dynamic Extension Interface

Discussion about writing code for Inkscape.
abysmal88
Posts: 4
Joined: Wed Jul 06, 2016 6:50 pm

Dynamic Extension Interface

Postby abysmal88 » Wed Jul 06, 2016 8:12 pm

Hi guys, I'm quite new in scripting extension and I have some questions:
I'd like to change the extension interface interactively, for example:
-If i set a value for an option I want to show/hide some value for another one
-I'd like to show the values for an option based on the selected SVG.
I seemed to understand that it is not possible with extensions because the .INX file is loaded at startup, is there another way to do that?

Thanks in advance :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Dynamic Extension Interface

Postby Moini » Wed Jul 06, 2016 9:39 pm

If you know how to do shell scripts, you can use zenity (https://en.wikipedia.org/wiki/Zenity) to create an interactive display.
This extension can serve as an example (works on Linux, don't know about Windows): http://wiki.colivre.net/Aurium/InkscapeGenerator

I've also heard about people wanting to try if it works using Tkinter, but haven't seen a successful project with that.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

abysmal88
Posts: 4
Joined: Wed Jul 06, 2016 6:50 pm

Re: Dynamic Extension Interface

Postby abysmal88 » Thu Jul 07, 2016 5:29 pm

ok thanks a lot! I will study some shell scripting.
I think I will try with Tkinter because my extension must run on Windows :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Dynamic Extension Interface

Postby Moini » Thu Jul 07, 2016 9:28 pm

If you try the above extension on Win, could you post if it's possible to make it work? I've made a bunch of example files, so one can use the extension quickly: https://inkscape.org/en/~Moini/%E2%98%8 ... -extension
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

abysmal88
Posts: 4
Joined: Wed Jul 06, 2016 6:50 pm

Re: Dynamic Extension Interface

Postby abysmal88 » Fri Jul 15, 2016 12:59 am

Yes, when I have a moment I'll do that ;)


Return to “Programming”