gimp - python can't import gimpfu -


i'm trying write gimp script using pythonfu. however, when try run script locally, error

`--> ./vvv.py traceback (most recent call last):   file "./vvv.py", line 5, in <module>     gimpfu import * importerror: no module named gimpfu 

i gather script might loadable through gimp. however, script doesn't appear @ gimp menus. in case, how error output?

depending on os, have gimp plugin's directory, like:

gimp 2\lib\gimp\2.0\plug-ins  

and copy script there. of course have add registration stuff this:

register(     "python-fu-draw",                                #<- plugin name     n_("brief"),                                     #<- description     "long",                                          #<- description     "name surname",                                  #<- author     "@copyright 2013",                               #<- copyright info     "2013/10/29",                                    #<- creation date     n_("_draw..."),                                  #<- label shown in gimp's menu     "",  #<- kind of image requested script (index,rgb,...and on)     [                                                #<- input parameters array         (pf_file, "ifile", n_("color input file"), 'default.txt'), ], [],                                                  #<- output parameters array (usually empty) draw,                                                #<- main method call  menu="<image>/filters/",                             #<- add plugin domain=("gimp20-python", gimp.locale_directory)  )  main()                                               #<- don't forget 

once copied script right directory right registration stuff can run gimp , run script selecting in drop down menu selected in registration stuff. don't have run python console. wouldn't work:

python myscript.py ./myscript.py >>> myscript 

to debug script interactively open python-fu console gimp:

filters->python-fu->console 

take @ this web site. slides useful.

while if want run script in batch mode please take @ this


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -