please, I've spent all the day to make it work, but unsuccessfully.
Python-Fu scripts in GIMP are not working on my system. When I
register() any new function, it is not possible to find it nowhere in
menu. The only thing working is Xtns->Python-Fu->Console. The simplest
script I have been testing is located downhere..
I've tried to search all the google, but have found nothing, I'm
===========I've all things needed:
===========PyGTK demo also works:
import gtk window = gtk.Window() window.set_title("PyGTK Test Window") window.show_all() gtk.main()
- new "PyGTK Test Window" is shown
===========Testing script resize.py:
from gimpfu import * def Resize(img, drawable, width, height): pdb.gimp_image_undo_group_start(img) pdb.gimp_image_scale(img, width, height) pdb.gimp_image_undo_group_end(img) if __name__ == '__main__': register( "redimensionar_imagen", "Redimensionar imagen", "Redimensionar imagen", "Javi Pacheco", "Javi Pacheco", "2005", "/Python-Fu/Ejemplos/1- Basico/Redimensionar imagen", "RGB*, GRAY*", [ (PF_SPINNER, "width", "Ancho", 200, (0, 1000, 1)), (PF_SPINNER, "height", "Alto", 200, (0, 1000, 1)) ], , Resize) main()
=========== strange error message
When I try to run this script from Python console
(Xtns->Python-Fu->Console), error message is shown:
gimp_env_init() must only be called once!
When I remove the last line containing "main()", It seems everything is
all right, but still, there is none new function available in menu..
PS: I have the indent of source code well formated in the .py file. Just here is displayed wrong..