GIMP Chat http://gimpchat.com/ |
|
Macbook User and Python plugin http://gimpchat.com/viewtopic.php?f=8&t=17741 |
Page 1 of 1 |
Author: | PKHG [ Mon Oct 14, 2019 8:42 am ] |
Post subject: | Macbook User and Python plugin |
GIMP Version: Operating System: Mac OS GIMP Experience: Experienced User Hallo, if you are using Gimp 2.10 on a Macbook and have (a little bit) experience of writing yourself a python plugin occurring somewhere in Gimp under Filters or Python-fu of what you have programmed Contact me please Peter |
Author: | ofnuts [ Mon Oct 14, 2019 9:07 am ] |
Post subject: | Re: Macbook User and Python plugin |
Plug-ins are about the same for Unix(&Linux), OSX and Windows. |
Author: | PKHG [ Mon Oct 14, 2019 9:21 am ] |
Post subject: | Re: Macbook User and Python plugin |
Dear Ofnuts, Yes I know, and a number of plugins (coming from Arakne guide lab) are working here (my PC) te Ptk way ;-) No succes with a sript where tin tan and you have worked on: The plugin alone inserted in a Python Console making an image, display, layer etc new then calling e.g plugin_simple_shapes_centered(image, layer, 1, 6, 10, 20, 30, 50, 30, 30, 30, 30, 40, 40, 1, 'Walnut',1, (23,255,24) , 1) works (though not yet all 46 examples etc.) BUT 'register' seems not to be obeyed... register( "plugin_simple_shapes_centered", "Simple paths shapes centered in the image or selection Ver - 1.0.\n===========================================\nYou can also add a margin on each side (resize the layer and not the path).This option requires script Changing Image Border.scm.\n------------------------------------------------------------------------------\nThanks to Tin Tran, Ofnuts, TheUncle2k,Fencepost and J.Stipe.\n", "Simple path shapes centered in the image v.1.0", "MrQ", "GPL", "2016 10-10-12019", "<Image>/Filters/Path/Simple shapes centered...", "RGB*, GRAY*", [ ], [], plugin_simple_shapes_centered) main() If I do not copy main() into the console, but after the function is available main() crashes Python So, on a Macbook Gimp either I do not (yet) know to solve it OR it is not (yet) possible . Reason for this post ;-) an other question: a script-fu (*.scm) doing the same stuff, I could not find ... Thanks for you quick idea ... Peter |
Author: | ofnuts [ Mon Oct 14, 2019 1:02 pm ] |
Post subject: | Re: Macbook User and Python plugin |
Can you attach a ZIP of your file? |
Author: | PKHG [ Tue Oct 15, 2019 5:11 am ] |
Post subject: | Re: Macbook User and Python plugin |
Tried to upload the plugin as gz, can't see it ??? |
Author: | ofnuts [ Tue Oct 15, 2019 5:04 pm ] |
Post subject: | Re: Macbook User and Python plugin |
Not sure .gz is an allowed extension on GC. |
Author: | PKHG [ Wed Oct 16, 2019 8:37 am ] |
Post subject: | Re: Macbook User and Python plugin |
Hi Ofnuts I am on the way to get my old guide lab with with(your & .. shapes) on Macbook working ... A lot of Macbook strange things discovered. Th stderr starting with the Launchpad is WHERE? Solved by using a Terminal which seems to become stderr, atleast some error messages are shown there Peters-MacBook-Pro:~$ /Applications/GIMP2.10.app/Contents/MacOS/gimp Starting with this ERROR message: Error spawning command line “dbus-launch --autolaunch=70:56:81:92:0c:21 --binary-syntax --close-stderr”: Child process exited with code 1 With probably forces me to really remove an Gtk Error-message. Otherwise I can not open a new display. GRRR al not really understood staff ==> reason for the title of this post. Next after some tries (some GIMP?) creates sometimes pluginrc~ thug there is a pluginrc , BUT which one is really used and an updated one??? What I do id removing both and then ONE pluginrc is created fresh (my experience). The same is true with files ins */plug-ins ... probably because of using emacs as file-editor??? Not willing to refresh vi knowledge now willing to learn nano. Third Importing scripts from the interner suffer (more often than not) that in the source inbetween are cr-lf ==> not allowed and give (in the Gimp-python Console) indentation errors Sometimes in the Gimp python Console the start of a copy from a file give too indentations Error e.g. first line from pythonfu import * ==> indentation error???? must be something with the different end-of-line in a text of the different OS'es ??!! And an other problem: the info about registering plugins for Linux (my way of trying to do so) does NOT work, e.g. your path-insert-centered file (works but is NOT registered) =====> Macuser doing plugins needed What works are the registering the Arakne way ;-) (luckily) ==> consequence very slow repairing old plug ins (now a bit quicker than in the beginning ;-) ) If I will be content (next week or so) I will upload my result |
Author: | ofnuts [ Wed Oct 16, 2019 5:42 pm ] |
Post subject: | Re: Macbook User and Python plugin |
pluginrc: that's the one in your Gimp profile CRLF: could be a problem (but not in my own plugins, since I am on Linux, I don't produce them). But not the reason for indentation errors. Indentation errors: likely a space/tabs problem. Indentation must be identical, a tab is not 4 or 8 spaces. Some editors replace spaces by tabs and vice-versa on the lines you edit, creating a mess... path-insert-centered: I don't remember writing such a plugin. And AFAIK my plugins work on OSX (8% of all the downloads, since 2011, if they didn't work someone would have yelled by now)? |
Author: | PKHG [ Thu Oct 17, 2019 4:08 am ] |
Post subject: | Re: Macbook User and Python plugin |
Hi Ofnuts Wanted to refer to: register( "plugin_simple_shapes_centered", "Simple paths shapes centered in the image or selection Ver - 1.0.\n===========================================\nYou can also add a margin on each side (resize the layer and not the path).This option requires script Changing Image Border.scm.\n------------------------------------------------------------------------------\nThanks to Tin Tran, Ofnuts, TheUncle2k,Fencepost and J.Stipe.\n", "Simple path shapes centered in the image v.1.0", "MrQ", "GPL", "2016", "<Image>/Filters/Path/Simple shapes centered...", "RGB*, GRAY*", All of analog *.py plugins do NOT register Macbook Gimp 2.10 If you would be so kind to make a so small as possible Python plugin with working register (checked on a Macbook Gimp 2.10) greets Peter |
Author: | ofnuts [ Thu Oct 17, 2019 7:13 am ] | ||
Post subject: | Re: Macbook User and Python plugin | ||
The fact that I'm thanked doesn't make me an author? The copyright seems to be Mareroq's. See attached for a very basic registration. After installation, start Gimp in a terminal, you should see among the various messages: Code: Select all -------------------------------------------------------------- Once Gimp is started, you should have a "Test registration" menu in the menu bar, with a "Test python script registration" entry, and if you click on that you get "Script called OK" in a message dialog (or in the error console, if you have started it)(this is enabled only if you have at least one image open in Gimp). Attachment: check-reg.png [ 28.17 KiB | Viewed 7179 times ] The MD5 sum of the file is: Code: Select all 90831f8a310d6f30d414533b5db2eb42 check-reg.py So you can check that you are using exactly the version I sent.
|
Author: | PKHG [ Fri Oct 18, 2019 12:43 am ] |
Post subject: | Re: Macbook User and Python plugin |
;-( I set the content of the zip into my local plug-ins directory. Started gimp from a terminal ==> NO Registration OK to be seen in the Terminal-window No Test_registration in the GIMP menu row Thanks Ofnuts for your patience with me. I give it up for now. Means: either my GIMP 2.10 installation suffers from (not known) changes from me to get GIMP up and running OR it is something wrong in the installation of GIMP I have used. I am sorry, only answer to all this trouble can be solved, if a Macbook-User with GIMP 2.10 can follow your suggestion with the very short Test_registration example with succes. sorry sorry, and thanks again Ofnuts At this moment plug-ins (locally added) only do its work if the Arakne guide lab Gtk way is used on my PC. Am content with that .. I am now able to check my old guidelabextra script containing all Mareroq's and your work for simple patches ;-) |
Author: | ofnuts [ Fri Oct 18, 2019 1:16 am ] |
Post subject: | Re: Macbook User and Python plugin |
If you see a line of dashes in the terminal, please post the lines that follow. If you don't, check that the python file has the executable flag set. And also check it's MD5 sum. |
Author: | PKHG [ Fri Oct 18, 2019 1:34 am ] |
Post subject: | Re: Macbook User and Python plugin |
oh oh , because of not a real Unix user I did not realise that the mode missed executable ;-( After adding the x (chmod ... ) Your test registration works! What a beginners error ;-( So in a sense the Apple IO is a sort of Unix. Should have realised much more earlier, because visible in the file system of the Macbook disk /etc etc Big hug Ofnuts ;-) Now being aware of that other things will work (probably) |
Author: | ofnuts [ Fri Oct 18, 2019 5:09 am ] |
Post subject: | Re: Macbook User and Python plugin |
You may want to find something else to unzip files. The file is zipped with the executable flag set and when it is unzipped the result file has the flag set. |
Author: | MareroQ [ Sun Oct 27, 2019 12:44 pm ] |
Post subject: | Re: Macbook User and Python plugin |
Dear Peter. What progress? If you have time and feel like I would like to interest you in another topic - make GTK Plugin UNICODE to shapes and paths.py viewtopic.php?f=9&t=17235&hilit=unicode#p236443 similar to arakne-path-shape-creator. |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |