It is currently Thu Jul 04, 2024 1:10 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 97 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Mon Nov 06, 2023 2:37 pm  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
Where's the man at? Kevin?

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Mon Nov 06, 2023 3:15 pm  (#12) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
Image
This is friendlier labels when run from front end or browsing in procedure browser
as it shows default value and min..max right in brackets ie (default: 1, 0..50)


Attachments:
File comment: Friendlier labels for easier values default & range
gegl-python-fu (3).zip [7.24 KiB]
Downloaded 133 times

_________________
TinT
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Mon Nov 06, 2023 11:49 pm  (#13) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
I was bored and thought it would be fun to generate some static color 2 gray (c2g)
and let people browse by clicking to get a good feel of what the values do as they change.
You get to see different values at the same time so it's kind'a cool
https://tinmantaken.blogspot.com/2023/1 ... tions.html

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Mon Nov 06, 2023 11:53 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Tin, see my post on the other thread.

_________________
"Where am I ?"


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Tue Nov 07, 2023 12:06 am  (#15) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
dinasset wrote:
Tin, see my post on the other thread.

It's done here


Attachments:
File comment: suppresses or not show console version (after this [url=http://gimpchat.com/viewtopic.php?f=9&t=18040&p=284967#p284966]finding[/url])
gegl-python-fu & gegl_graph (2).zip [8.67 KiB]
Downloaded 170 times
File comment: 2 in one that doesn't use dinasset naming
gegl-python-fu & gegl_graph.zip [8.66 KiB]
Downloaded 122 times

_________________
TinT


Last edited by trandoductin on Tue Nov 07, 2023 7:52 am, edited 2 times in total.
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Tue Nov 07, 2023 4:20 am  (#16) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2438
Interesting plugins, I love experimenting.

I did find one that locked-up, GEGL tiles. I thought it might be me, so tried again and....

System Warning, running out of space in my home partition (kubuntu 20.04) this is filelight.

Attachment:
gegl.jpg
gegl.jpg [ 42.5 KiB | Viewed 39972 times ]


Not a problem, just emptied ~/.cache, as long as you know where to look ;)

_________________
Image


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 exposed
PostPosted: Tue Nov 07, 2023 6:33 am  (#17) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
rich,
I tried it tile and it just ate up the image like blank it (completely transparent) out on mine. I am on windows.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 9:22 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 136
Location: Lake Havasu City, Arizona, USA
Tim,
Thank you for the very useful plug-in. In GIMP 2.10, GEGL operations when run from Python can be flakey, so your plug-in will reduce some self doubt and prove to be an excellent research tool for me. :yes

_________________
Charles


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 10:02 am  (#19) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
vit, do you have the latest 2 files?
as dinasset requested the name change to remove dinasset from the function call so it needs the other gegl_graph.py included with that last zip (download/file.php?id=69700)

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 12:30 pm  (#20) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Tin, sorry I can't help.

I gave up on this quite soon after starting when I found that there's no way to pass curve arrays into GEGL: https://gitlab.gnome.org/GNOME/gegl/-/issues/264

Kevin


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 12:35 pm  (#21) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
Understandable.
I guess we'll just have to wait for the real source to expose them.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 2:06 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
I'm not a Gegl specialist but here's something to consider:

1. Your plugin works on the active layer - you might want to add making a copy of the layer or creating a new image.

2. Gegl plugins can operate in the minimum, maximum range and not only in the ui-minimum, ui-maximum range (but I don't know if this is always the case).


Example-1: Difference of Gaussians (https://gegl.org/operations/gegl-differ ... sians.html), in menu: GEGL-Automated ➤ Gegl to Python: difference-of-gaussians...

Difference of Gaussians
Edge detection with control of edge thickness, based on the difference of two gaussian blurs
Radius 1
name: radius1 type: double default: 1.00 minimum: 0.00 maximum: 1000.00 ui-minimum: 0.00 ui-maximum: 10.00 ui-gamma: 1.50 ui-step-small: 0.01 ui-step-big: 1.00 ui-digits: 3
Radius 2
name: radius2 type: double default: 2.00 minimum: 0.00 maximum: 1000.00 ui-minimum: 0.00 ui-maximum: 20.00 ui-gamma: 1.50 ui-step-small: 0.01 ui-step-big: 1.00 ui-digits: 3


3. Where possible, replace PF_FLOAT with PF_SPINNER.

4. Adding a preview (but for single Gegl operations it doesn't make much sense except registration in PDB)

Example-2:Supernova (how to enable color selection, type parameters: %f, %d, %s), (https://gegl.org/operations/gegl-supernova.html), in menu: GEGL-Automated ➤ Gegl to Python: Supernova...

I deliberately changed the registration and location in the menu so that it does not conflict with your version.


Attachments:
Example 1.jpg
Example 1.jpg [ 112.17 KiB | Viewed 6475 times ]
Example 2.jpg
Example 2.jpg [ 128.05 KiB | Viewed 6475 times ]
gegl_to_python.zip [9.35 KiB]
Downloaded 77 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 07, 2023 2:11 pm  (#23) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
hehehe I don't know anything about GEGL.
Thanks all the info.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Wed Nov 08, 2023 6:23 am  (#24) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 136
Location: Lake Havasu City, Arizona, USA
On Windows 10, the latest version fixed the GEGL cartoon error for me.

_________________
Charles


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Wed Nov 08, 2023 10:02 am  (#25) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
@vitforlinux,
I don't think it is case-sensitive issue because Python is already case-sensitive.
I think there's a problem with linux version as Kevin only guaranteed that it would work on Windows (for dinasset). and my version just took out the dinasset in the name.
Sorry, I am on windows as well so I don't know what else it could be.
I tried deleting all my files and downloaded the 2 versions (one that opens on command/terminal window briefly when it ran and one that doesn't open command/terminal at all), and they both worked as expected.

if you don't see /Python-Fu/gegl_graph/Do gegl graph menu item then it's a linux thing, which is odd to me because Rich was able to run all the other ones and I think rich is on Linux.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Thu Nov 09, 2023 9:57 am  (#26) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
Hooray! :D

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP
PostPosted: Sun Nov 12, 2023 12:52 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1456
trandoductin wrote:
does anyone know if

name: cpn-3-keep type: boolean default: False label:[color-model {rgb} : rgb-label, color-model {hsl} : hsl-label] rgb-label:Keep blue component hsl-label:Keep lightness component

is equivalent to
(PF_OPTION,"cpn-3-keep", "OPTION:", 0, ["Keep blue component","Keep lightness component"]),

Am I even close? boolean? and then a bunch of labels?
or do I have to map rgb and hsl to some other constant numbers?


That command has to do with the slider display name in gegl:alien-map (aka the solarization filter) other then that I don't know how to help here.


Also, if you want to make this useful allow python to call gegl commands with ANY namespace not just gegl:


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sun Nov 12, 2023 12:57 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1456
*author update, this post is partially inaccurate. It can read anything but gimp: namespaces)
This plugin can not benefit me because it only works on (gegl:) name space operations. A custom operation of mine like lb:glossy-balloon (lb:) or gimp:threshold-alpha (gimp:) name space won't work. Gimp's team instructed me to make all new filters of mine use my own name space (lb:) and not (gegl:)

So someone please figure out how to get this to work with my plugins that use alt name spaces.


Last edited by contrast_ on Tue Nov 14, 2023 8:20 pm, edited 1 time in total.

Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sun Nov 12, 2023 1:07 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1456
The only thing that makes GEGL better then traditional methods is the ability to chain operations (a individual filter node) into meta operations (many filters in one node). In example filters like gegl:dropshadow are meta operations built on (gegl:color, gegl:dst-over, gegl-median-blur, gegl:gaussian-blur) chained together, and gaussian blur can even be reductionized to a node called gegl:g-blur.

Calling GEGL filters individually is just like using script fu, it doesn't make munch sense. What you need to be doing is writing gegl syntax, make a custom filter then call it a node. That is what I do with all my filters; chain simple operations to make complex ones. Then call namespace:operation in python, gegl, script fu or whatever to test your new operation


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sun Nov 12, 2023 3:13 pm  (#30) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
Sorry it's beyond my capability.

_________________
TinT


Top
Post new topic Reply to topic  [ 97 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Make a key binding to access third party GEGL Operations faster

1

No new posts I'll make a filter based on other people's GEGL chain operations

1

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

1

No new posts Attachment(s) Requested plugin Christmas Wrapped Text

11

No new posts GIMP's fast pixel operations

4



* Login  



Powered by phpBB3 © phpBB Group