![]() |
|
Problem with Gimp 3 Python plug-in color_argument - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: Problem with Gimp 3 Python plug-in color_argument (/Thread-Problem-with-Gimp-3-Python-plug-in-color-argument) |
Problem with Gimp 3 Python plug-in color_argument - Volker - 11-16-2025 I try to migrate my Python plug-in to decorate a jpeg photo with margin, border and description from Gimp 2 to Gimp 3. it works as intended as long as I don't add a color-argument. What is wrong with this code? Code: import sysIf I omit the procedure.add_color_argument all is well, but with it the plug-in doesn't even show up in Gimp. I can't find any code errors, or do you? Thanks in advance for your help. RE: Problem with Gimp 3 Python plug-in color_argument - programmer_ceds - 11-16-2025 (4 hours ago)Volker Wrote: ... If you run GIMP in a terminal window you will see the error that is preventing your script from running. You need to call Babl.init() (just before the add_color_argument would do) Also you need the following lines near the start of the file: gi.require_version('Babl', '0.1') from gi.repository import Babl RE: Problem with Gimp 3 Python plug-in color_argument - Volker - 11-16-2025 With Babl.init() at the right place the script works as expected. Thank you. RE: Problem with Gimp 3 Python plug-in color_argument - programmer_ceds - 11-16-2025 (3 hours ago)Volker Wrote: With Babl.init() at the right place the script works as expected. Pleased that it worked. I forgot to mention earlier that I think that you should also have a call of Babl.exit() at the end of your processing to free up the resources it uses. |