Switch to full style
Ask all general Gimp related questions here
Post a reply

Python Scripts Working, But Python Plug-ins Not Showing on Mac

Tue Nov 28, 2017 10:59 pm

GIMP Version: 2.8.22
Operating System: Mac OS
OS Version: 10.11.6 El Capitan
GIMP Experience: Basic Level
URL or Image link: https://gimpscripts.com/2017/05/abstractart/

List any relevant plug-ins or scripts:
AbstractArt



Hello! I have a Mac (10.11.6 ~ El Capitan) and have played around with Gimp for a couple years (just easy stuff). Recently, I found the "world" of scripts and plug-ins...so cool! I'm interested in the AbstractArt plug-in. I downloaded it, put the DIEGO_ARTISTIC_AbstractArt.py file in the plug-in directory ($HOME/Library/Application Support/GIMP/2.8/plug-ins), made sure that directory was in my Gimp preferences (Gimp->Preferences->Folders->Plug-Ins), made it executable (chmod +x DIEGO_ARTISTIC_AbstractArt.py), restarted Gimp, and I cannot find it anywhere in the menu items. I've tried a number of different plug-ins with the same outcome. I was able to download and try several scripts, which all show up. What am I doing wrong?

Any help would be so appreciated!

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 1:47 am

Double-checked on Windows: it works.
Sorry, I'm not an expert on Mac.
Does this happen with ANY other .py plug-in you download/install?

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 1:55 am

ps: it makes use of plug-in Mosaic, do you have it running? (Filters/Distort/Mosaic...).
Also: it creates a new entry in Gimp Menu: Diego/Artistic; could this be an obstacle in Mac environment?

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 2:09 am

Maybe the "guru" Rich (Rich2005) could help?
Or someone else running Mac?

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 2:27 am

1)Find your "Gimp profile", open the "pluginrc" file with a text editor, and look for the plugin file name. Is it there?
2) If not there, start Gimp in a terminal, and look for Python syntax error messages. If you edited the script you may have added spaces/tabs at the wrong place (if so, unpack the file again)

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 4:04 am

Never a guru, just a devoted dabbler.

As well as Ofnuts checks, another one.

The stock Gimp installation already contains a few python plug-ins. A couple to see if they are in the menu.
foggify.py in Filters-> render -> clouds -> fog
text-brush.py in File -> Create -> New Brush From Text default gives a brush like a 'G'

If those are there and work, look at your installation procedure

One thing to check when making executable, is do you need the whole path?
chmod +x /path-to/DIEGO_ARTISTIC_AbstractArt.py

edit: Never-ever even used a Mac but once found this GUI utility for changing permissions.
http://www.lagentesoft.com/batchmod/
Any Mac users out there. I would love to know if it works, might help other users.

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 9:27 am

Thanks for the quick replies. I have gone through and tried your suggestions, but still having trouble.

I downloaded glass-text.scm and starry-sky.scm and they show up and work.

I have tried the following Python plug-ins:
DIEGO_ARTISTIC_AbstractArt.py
DIEGO_ARTISTIC_FakeVoronoi.py
DIEGO_ARTISTIC_PrintOnStones2.py
neon-pth-0.1.py

Only neon_pth-0.1.py is showing up in the pluginrc file, which was a great suggestion to look at.

I noticed that the file that unzipped was named "DIEGO_ARTISTIC_AbstractArt .py" (a space " " before .py), so I removed the space. I did not edit the file except for the name. I do have Filters->Distorts->Mosaic..., Filters->Render->Clouds->Fog..., and File->Create->New Brush From Text. The command "ls -l" is a way to check that the permissions are correct and they are.

I had tried downloading the latest Python, but removed that this morning, since I think these modules are installed with this level of Gimp. I also noticed that if I go to $HOME/Library/Application Support/ there were two Gimp folders, namely GIMP and Gimp-2.8. GIMP had a folder underneath that for 2.8. Since the preferences was using GIMP, I removed the Gimp-2.8 folder.

Thanks again!

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 10:26 am

Gimp python scripts require Python 2.7.x.

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 10:51 am

Well, because all 3 of my filters try to register under the new menu entry "DIEGO/ARTISTIC", I have still the suspect that there could be a problem in creating a new menu entry in your Gimp.
If you don't mind, you may open the source using for instance notepad++, go to the menu statement (almost at the end) and replace
menu="<Image>/Diego/Artistic",
with
menu="<Image>/Filters/Artistic",
Let's see...

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 11:17 am

Just a guess, but as the .py file is named "DIEGO_ARTISTIC_AbstractArt .py" (with the space), does that means the python file also needs to be unzipped, just a thought, it's possible to overlook the fact that it's a compressed file, unless that's just me (??)

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 11:28 am

Anyhow, the usual correct way for the user gimp folder is to have: (user)..gimp-2.8
and to put the link in Gimp/Preferences to that one.
Also it may be a good practice to create under .gimp-2.8 folder a sub folder for the additional plug-ins, named for instance "python_additional" or anything you prefer (for those 3 indicated you may also choose "python Diego") and link that subfolder

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 1:30 pm

dinasset wrote:Anyhow, the usual correct way for the user gimp folder is to have: (user)..gimp-2.8
and to put the link in Gimp/Preferences to that one.
Also it may be a good practice to create under .gimp-2.8 folder a sub folder for the additional plug-ins, named for instance "python_additional" or anything you prefer (for those 3 indicated you may also choose "python Diego") and link that subfolder

Doesn't need to be a subfolder, it can be anywhere.

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 5:40 pm

Changing the menu to <Image>/Filters/Artistic did not change anything and the file still doesn't show in the pluginrc file, but a good idea.

This is what is displayed when I bring up GIMP->Filters->Python-Fu->Console:

GIMP 2.8.22 Python Console
Python 2.7.8 (default, Jul 16 2016, 22:25:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]

Is there some way I can take the script and type it into the Console to see if it runs from a command line?

Again, a million thank you's to all of you for trying to solve this!

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 7:37 pm

I'm still waiting for the results of starting Gimp in a terminal...

You can try to run it from a command line. If it says "ImportError: No module named gimpfu" this is normal (that module only exists when used from Gimp). But if you get another error, don't look further. But even with only the gimpfu complaint, you could have problems that only show once the script is started, hence the request above.

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 8:00 pm

Sorry, ofnuts...I thought you meant to run it from the terminal if I had edited the contents of the file. GIMP opened fine from the Terminal with no errors.

Can you tell me how I exactly run the DIEGO_ARTISTIC_AbstractArt.py it from the Python Console?

Thanks!

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 9:05 pm

I use a MAC, currently still using Yosemite (haven't upgraded because I heard that it would make Gimp behave badly), and have McGimp from Partha. I have found that most python scripts do not work in McGimp, except for a few that Partha included natively into it. He would be a good source of information on the subject, you can find his email (partha@partha.com) on his website...partha.com

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Wed Nov 29, 2017 11:39 pm

It can be executed by the Python Console using the following statements, having an open image:

>>> image = gimp.image_list()[0]
>>> layer = image.layers[0]
>>> gimp.pdb.python_fu_AbstractArt(image, layer, 0, 0, 0, 0, "nnnnnnnnn", 0, "nnnnnnnnn")

But I suspect that -if the filter does not show up in pluginrc- it will not be found

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Thu Nov 30, 2017 7:25 am

Huge update! I tried 2-ton's suggestion of downloading McGimp and all of the plug-ins magically showed up. :) The AbstractArt one that I had changed to <Image>/Filters/Artistic was found under Filters and all the others showed up under the main menu of Diego. I edited AbstractArt to fall under Diego. I'm having a few errors running it, but noticed that the McGimp standard edition link actually loaded the developmental release of 2.9.7. I have contact Partha about this to see if I can get a stable version for Mac.

Here are the errors:
Image
Image

I have no idea why these plug-ins are now showing up correctly on this version and are also showing up in the pluginrc, but I'm thrilled...even though they are not working, it's definitely progress! Thank you, thank you!

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Thu Nov 30, 2017 7:52 am

pawnee wrote:Huge update! I tried 2-ton's suggestion of downloading McGimp and all of the plug-ins magically showed up. :) The AbstractArt one that I had changed to <Image>/Filters/Artistic was found under Filters and all the others showed up under the main menu of Diego. I edited AbstractArt to fall under Diego. I'm having a few errors running it, but noticed that the McGimp standard edition link actually loaded the developmental release of 2.9.7. I have contact Partha about this to see if I can get a stable version for Mac.

Here are the errors:
[ Image ]
[ Image ]

I have no idea why these plug-ins are now showing up correctly on this version and are also showing up in the pluginrc, but I'm thrilled...even though they are not working, it's definitely progress! Thank you, thank you!


WHITE_FILL is defined in the "gimpfu" module and the script starts with the unavoidable "from gimpfu import *", so that must be a problem with Parth'a builds.

Re: Python Scripts Working, But Python Plug-ins Not Showing on Mac

Thu Nov 30, 2017 8:38 am

Good news, pawnee !

Edit: try replacing "WHITE_FILL" with "2" to have the filter running nonetheless.
Post a reply