It is currently Thu Jul 04, 2024 4:29 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [Um, no]Can a motivated user edit Python2 plug-ins to work in Py3?
PostPosted: Wed Nov 30, 2022 9:46 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
GIMP Version: 2.10.30
Operating System: Linux
OS Version: Ubuntu 22.04 LTS
GIMP Experience: Experienced User

List any relevant plug-ins or scripts:
all (^;



I debated whether this should go here or in Scripts-and-Plugins, but decided that even if the answer is:
"Oh, blazes, NO!"
there may be others wondering if there is any GIMP Help for accomplishing it.
[I did find this mention of the topic, but I am interested in learning What Specific Steps would be required, in the general case.]

Elsewhere I reported hoisting myself upon my own petard, again.

@rich2005 pointed out that, in addition to a flatpak, user @Tas_mania has addressed the problem by publishing a GIMP-version-that-will-work. And, I will go that route.

However, it is obvious--to someone as blind as myself--that, ultimately, all Python2 plug-ins will have to be modified to work with Python3, because GIMP 3.0 will use that version.

Q. If that is not wrong, then could ordinary, but motivated, users "somehow" learn to modify existing Python scripts to work under Python3--and presumably offer the variants to others?

(I have an uncomfortable feeling that I am going to be--rightfully--flamed for this... I have next-to-no-feeling in my backside anyway from "prior encounters with dragons.")

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Last edited by gramp on Wed Dec 07, 2022 12:43 pm, edited 2 times in total.

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: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 11:27 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2438
vitforlinux wrote:
I've been waiting a long time to see a Python 2 plugin ported to Python 3 on Gimp 2.99 to figure out how it's done and venture into editing.


How about the foggify plugin ;)

https://gitlab.gnome.org/GNOME/gimp/-/b ... foggify.py

_________________
Image


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 11:33 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
@vitforlinux
When I first read/redd:
Quote:
But it's not clear and it's in Italian

my immediate thought was, "I think I see the problem: it's in Italian." and then I laughed at myself.

As for your English, au contraire, you have nearly mastered a second language that I increasingly struggle with myself.

Thanks for your quick commentary.

Cheers!

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 11:40 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
rich2005 wrote:
vitforlinux wrote:
I've been waiting a long time to see a Python 2 plugin ported to Python 3 on Gimp 2.99 to figure out how it's done and venture into editing.


How about the foggify plugin ;)

https://gitlab.gnome.org/GNOME/gimp/-/b ... foggify.py


Thanks. I see there some number of Python3 scripts already available. (I wonder that possibly you picked 'foggify' for a double-entendre, but would benefit from a pointer to the Python2 version for a side-by-side, which is what @vitforlinux was after I think.)

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 11:57 am  (#5) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2438
gramp wrote:
...snip benefit from a pointer to the Python2 version for a side-by-side ...


It is a regular Gimp 2.10 plugin. Filters -> Decor -> Fog For linux, you would typically find it in /usr/lib/gimp/2.0/plug-ins/foggify/

When it comes to re-writing python plugins, I seem to recall Ofnuts recently commenting that the Gimp 3 api was still too fluid to make conversions worth while.

The Italian, I follow most of it. My usual installation is kubuntu 20.04 and I used old packages to add gimp-python, a similar procedure. Unfortunately these do not work with a kubuntu 22.04
Getting Gimp 2.10.32 from the Panda Jim PPA and using the appimage launcher is an easy way out.

_________________
Image


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 12:29 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Searching "Panda Jim PPA" brought back:
https://launchpad.net/~ubuntuhandbook1/ ... ex?memo=75

and I recognize Launchpad as a "place for PPAs".

It has instructions for fetching and installing Panda Jim's offering(s).

Thanks, Rich.

You'd recommended Tas_mania's appimage too back in August.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Wed Nov 30, 2022 5:06 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1456
Many of the python stuff for text styling can be replaced by my GEGL filters. I hope someone ports OfNuts plugins to Gimp 3 as I find some of them very useful.


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Thu Dec 01, 2022 3:12 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
First let the new GIMP3 API be stable enough, so it's worth the effort.
My2c

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Sun Dec 04, 2022 7:59 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
I just found this, a developer's summary of advance prep work to ease the "Resynthesizer" plug-in's transition to GIMP3:
https://github.com/bootchk/resynthesize ... -version-3

Scanning it, I determine: "MOTIVATION--is not enough."

This one excerpt clinched it for me:
"GimpFu will not be supported by the GIMP organization starting with GIMP version 3. Instead, plugins will need to be written or modified to use GObject introspection."

"GObject."
"Introspection."

Those seem to eliminate casual, even although "Motivated!", users.

My answer to My question is thus: "No."

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Can a motivated user edit Python2 plug-ins to work in Python3?
PostPosted: Mon Dec 05, 2022 3:28 am  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
gramp wrote:
I just found this, a developer's summary of advance prep work to ease the "Resynthesizer" plug-in's transition to GIMP3:
https://github.com/bootchk/resynthesize ... -version-3

Scanning it, I determine: "MOTIVATION--is not enough."

This one excerpt clinched it for me:
"GimpFu will not be supported by the GIMP organization starting with GIMP version 3. Instead, plugins will need to be written or modified to use GObject introspection."

"GObject."
"Introspection."

Those seem to eliminate casual, even although "Motivated!", users.

My answer to My question is thus: "No."


Big words, but nothing terrible. This just means that *any* language that has an API to Glib can "discover" the GIMP API calls. In practice most of these calls are a carbon copy of the original interface. I ported a couple of Python scripts to v3, and although a few things came to a stop because some functionality was still missing, use of the API was fairly easy (in fact, somewhat easier than in v2.10).

There are other things to learn/discover and there are currently not many people who know this stuff and have the time to explain it, so this going to be an uphill battle for "casual" programmers for the time being.

_________________
Image


Top
 Post subject: Re: [Um, no]Can a motivated user edit Python2 plug-ins to work in Pyth
PostPosted: Mon Dec 05, 2022 6:54 am  (#11) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Hello! :)

I hope this thread helps.

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Don't work procedures plug-in-bump-map, plug-in-displace

2

No new posts Attachment(s) Gimp 3 deprecating Python2 could cause a regression. Can we fix it?

9

No new posts Gimp Appimage For Ubuntu That Includes Python2

0

No new posts Attachment(s) Paintbrush doesnt work and none of the solutions on the internet work

13

No new posts is there a way to edit all the occurences of a object on a layer?

1



* Login  



Powered by phpBB3 © phpBB Group