Inkscape.org
  1. #1
    Nihilist Nihilist @Nihilist

    Hi, I've been working on an extension, just want to ask, is it possible (and if so how) to have gui elements in the .inx file (buttons or text labels, whatever) be sourced from some outside file? Particularly JSON, however I could pass it on with Python too if that works better.

    Short example of what I mean. User runs my extension. The extension checks a JSON file, finds 3 objects, which are then presented in the GUI for the user to choose from.

    Thanks for any help!

  2. #2
    Martin Owens Martin Owens @doctormo🌹⚖🧀

    Hi Nihilist,

    This is currently not possible. But you can make your own user interface using Gtk or Tk which can gather any kind of information from the user. You specify that the extension has it's own gui to inkscape and get on with presenting things as you need them.

  3. #3
    Nihilist Nihilist @Nihilist

    Hi Martin,

    Thanks for the info. I think I'll just work around it for now, and maybe give the custom GUI a go later down the road.

    If you don't mind, I have one more question: When I run my extension, and press ok in the gui window to run the python script, the window itself doesn't close. The script runs but to a user it might appear like nothing is happening. How can I have the window close? (probably an easy fix I've just somehow missed it.)

  4. #4
    Martin Owens Martin Owens @doctormo🌹⚖🧀

    I think there's an option, but I'm not sure what it is. It's a setting in the inx file you can try.