01-19-2019, 01:14 PM
(01-16-2019, 11:21 PM)Ofnuts Wrote: The only example I understand: https://sourceforge.net/projects/gimp-to...y/download
Thanks very much! Looking at the example, you used pygtk with gtk 2.0. Do you think it is possible to use gtk+ 3 with python-fu? At the moment I've tryed to do:
Code:
from gimpfu import *
import gi
import os
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk, GObject, GdkPixbuf
GObject.threads_init()
but I'm getting this error when executing grimp from the terminal:
Code:
Traceback (most recent call last):
File "/home/davide/.config/GIMP/2.10/plug-ins/style-transfer/style-transfer.py", line 2, in <module>
import gi as gi3
File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 39, in <module>
raise ImportError(_static_binding_error)
ImportError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183