> Has anybody an idea how to install new additional scripts in Gimp? Suppose
> you have a written Script- Fu- script stored as a textfile of course, and
> want the script to be executeable via the submenu of the popup window or
> through the Script- Fu database console window as a command, one of the two
> option shall be sufficient enough to get explained. I have already tried to
> store the scripts in the appropriate /scripts directory of the gimp
> installation of course, but that  did not imply any automatic loading
> procedure... which I had exspected. Is there a mechanism of automatically
> loading scripts into menus available or is there any special type of script
> configuration file additionally, where all actual scripts are listed and
> where you can configure at least the file manually...?  And: the file
> suffix of the script might be of help too, as .txt might not be the proper
> format. Thanx.

Gimp automatically loads any script it finds when it starts. There isn't any 
special configuration necessary, but they do need to be correctly formatted, 
named, and in the correct directory.

Scheme scripts should have a .scm extension, in /usr/share/gimp/<ver>/scripts 
or $HOME/.gimp/scripts.

Perl and Python scripts don't need an extension (under Linux, anyway...), but 
they should be set to executable, and be put in /usr/lib/gimp/<ver>/plug-ins/ 
or $HOME/.gimp/plug-ins.

In either case, Gimp will try to validate each script when it opens it. If 
there is a critical error in the script itself, it will usually show this 
message when run from a command line:
LibGimp-WARNING **: gimp: wire_read: unexpected EOF

You can call the script from any part of the menu you want, just specify where 
it should be put in the register function. Here is an example (in Scheme):

; Register the function with the GIMP:

    _"<Image>/Script-Fu/MyScript"   <-- location in menu structure
    "What does this script do?"
    SF-IMAGE "Image" 0                <---- variables to pass to the script
    SF-DRAWABLE "Drawable" 0


Gimp-user mailing list

Reply via email to