It is currently Thu Jul 04, 2024 3:28 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Macbook User and Python plugin
PostPosted: Mon Oct 14, 2019 8:42 am  (#1) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
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


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Mon Oct 14, 2019 9:07 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
Plug-ins are about the same for Unix(&Linux), OSX and Windows.

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Mon Oct 14, 2019 9:21 am  (#3) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
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


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Mon Oct 14, 2019 1:02 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
Can you attach a ZIP of your file?

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Tue Oct 15, 2019 5:11 am  (#5) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
Tried to upload the plugin as gz, can't see it ???


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Tue Oct 15, 2019 5:04 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
Not sure .gz is an allowed extension on GC.

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Wed Oct 16, 2019 8:37 am  (#7) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
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


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Wed Oct 16, 2019 5:42 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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)?

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Thu Oct 17, 2019 4:08 am  (#9) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
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


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Thu Oct 17, 2019 7:13 am  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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:

--------------------------------------------------------------
Registration OK
--------------------------------------------------------------


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
check-reg.png [ 28.17 KiB | Viewed 7161 times ]


The MD5 sum of the file is:

90831f8a310d6f30d414533b5db2eb42  check-reg.py


So you can check that you are using exactly the version I sent.


Attachments:
check-reg.zip [396 Bytes]
Downloaded 165 times

_________________
Image
Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Fri Oct 18, 2019 12:43 am  (#11) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
;-(
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 ;-)


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Fri Oct 18, 2019 1:16 am  (#12) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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.

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Fri Oct 18, 2019 1:34 am  (#13) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
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)


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Fri Oct 18, 2019 5:09 am  (#14) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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.

_________________
Image


Top
 Post subject: Re: Macbook User and Python plugin
PostPosted: Sun Oct 27, 2019 12:44 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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.

_________________
Image

Slava
Ukraini!


Top
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Convert GIMP plugin from Python 2 to Python 3

4

No new posts GIMP 2.10 console etc Macbook

0

No new posts Unable to get simple python plugin to show up

8

No new posts Please make a python plugin to combine my GEGL filters with GMIC

1

No new posts Get a mouse click or select a pixel in an image in a python plugin?

3



* Login  



Powered by phpBB3 © phpBB Group