The location of where you put the plug-ins changed when the GIMP came out with a native version for OS X. I never did get an answer to this by Googling. I finally just went through each subfolder of GIMP.app until I found it: /Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins
There is a very handy tool in the called Python-Fu in GIMP that lets you use Python interactively from within GIMP. You can find it at Filters->Python-Fu->Console
You can get a list of commands at Help->Procedure Browser. But before you use a procedure you must:
- import gimpfu
- prepend the command with pdb(.)
- change the dashes to underscores
When Python-Fu calls another plug-in you don't specify a run mode. If you browse to gimp-file-save in the procedure browser, the documentation lists the parameters as:
- run-mode - INT32 - The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1), RUN-WITH-LAST-VALS (2) }
- image - IMAGE - Input image
- drawable - DRAWABLE - Drawable to save
- filename - STRING - The name of the file to save the image in
- raw-filename - STRING - The name as entered by the use
- you can get a list of all open images with imageArray = gimp.image_list()
- then you can get one image by accessing it within the array img = imageArray[#]
- you can get the active drawable for the image with imgDrawable = pdb.gimp_image_get_active_drawable(img)
- You can also obtain the DRAWABLE with imgDrawable = pdb.gimp_image_merge_visible_layers(img, The type of merge { EXPAND-AS-NECESSARY (0), CLIP-TO-IMAGE (1), CLIP-TO-BOTTOM-LAYER (2) })
- You can get the filename of the image with fn = pdb.gimp_image_get_filename(img)
- Since this is not interactive with the user, you use the same filename for both parameters
$ chmod 755 <filename.py>
I hope these hints helped you in some way. If you have any more insights, please leave a comment.