It is currently Tue Jul 02, 2024 3:31 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 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: 4001
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 6473 times ]
Example 2.jpg
Example 2.jpg [ 128.05 KiB | Viewed 6473 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: 4001
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: 4001
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: 4001
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: 1455
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: 1455
*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: 1455
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: 4001
Location: Canada
Sorry it's beyond my capability.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Mon Nov 13, 2023 3:04 pm  (#31) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1455
trandoductin wrote:
Sorry it's beyond my capability.


Thanks anyway for advancing GEGL. Eventually someone will figure out how to allow python to read non (gegl:) namespaces.
Once that happens I'm sure it will all work out.


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

Joined: May 07, 2014
Posts: 4001
Location: Canada
Eventually, hopefully.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 14, 2023 4:47 pm  (#33) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1455
Update, I was partially wrong about something and owe an apology + I have 24 plugins of mine in a zip (with binaries) that I'd kindly request to be converted to python_commands.

WHAT I WAS WRONG ABOUT: ( it turns out gegl_command.py) can use my lb:namespace operations
WHAT I WAS RIGHT ABOUT: (it still can't use (gimp: or svg:) name space operations)

So here is an example of why my plugins would not work with GEGL_command.py originally.

Attachment:
2023-11-14_11-20.png
2023-11-14_11-20.png [ 40.19 KiB | Viewed 6773 times ]


Attachment:
gegl_command_crash.png
gegl_command_crash.png [ 120.22 KiB | Viewed 6773 times ]


Download here
(its 8mb because it contains pics of the plugins)
https://cdn.discordapp.com/attachments/ ... 14771b7e1&

Attached is a zip folder with code, and binaries for Windows and Linux of 21 plugins of mine and 3 special forks hidden from Gimp's GUI that are compatible with gegl command.py. Every other plugin of mine so far will NOT work with gegl_command.py. Originally only 9 plugins of mine worked with gegl:command-py now 24 of them do and my Github will soon update to fix that.

Listed below are the operation names

lb:clouds
gegl:starfield ( DOES NOT USE LB UNTIL GIMP 3 )
lb:antique
lb:align
lb:polygons
lb:bokeh
lb:electricity (now uses lb:)
lb:aura (now uses lb:)
lb:pencil (now uses lb)
gegl:edge-extract ( DOES NOT USE LB UNTIL GIMP 3 )
lb:video-degradation-mod
lb:innerglow
gegl:long-shadow-pd
lb:action-lines
lb:colorizeluminance
lb:fog
lb:neon-border
lb:sand-text
lb:starburst
lb:doubleglow
lb:shadow
lb:script-glossy-balloon
lb:script-custom-bevel
lb:script-metallic


*UPDATE I ATTACHED INNER GLOWS UPDATED WINDOWS BINARY (lb:innerglow) THAT I FORGOT IN THE MAIN ZIP

Please someone if you don't mind convert these 24 plugins of mine into Python FU Compatible commands.


Attachments:
inner-glow.dll.zip [36.22 KiB]
Downloaded 73 times


Last edited by contrast_ on Tue Nov 14, 2023 8:58 pm, edited 2 times in total.
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 14, 2023 8:16 pm  (#34) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1455
I have updated all 21 said repositories with newer binaries that are compatible with gegl_command.py. However my main Github and Discord plugin download page is still outdated with versions that do NOT work with GEGL_Command.py.


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 14, 2023 8:25 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1455
Based on new evidence it is most accurate to say that GEGL_Command.py only works if GEGL .c files have no left over content. I have a habit of leaving scrapped content from early development in my .c files. The scrapped content are GEGL nodes or GUI options that are not in use.

This is the primary thing that was causing my plugins not to work in GEGL_Command.py, but for some reason it works in GEGL just fine.


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Nov 14, 2023 8:59 pm  (#36) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1455
https://github.com/LinuxBeaver/Special_ ... le_plugins


I made a repo on Github of all (currently 24) plugins of mine that work with gegl_command.py and soon I will update mroe


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

Joined: Oct 31, 2020
Posts: 1455
I just released a special version of my lb:sharp-bevel filter that is compatible with python scripting lb:script-sharpbevel
and it is in the Github download here. This makes 24/70 plugins of mine compatible with Python scripting. I am still waiting to see if someone will convert them to python fu.

https://github.com/LinuxBeaver/Special_ ... le_plugins


Image

Image


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

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Changes in Ver.2:

- combined into one file gegl-python-fu.py and gegl-graph.py to gegl-python-fu & gegl-graph.py (standalone files: gegl-python-fu.py and gegl-graph.py must be deleted),
- change menu location (You can change it very quickly as you want using Notepad++),
- removed gegl-tile (because it doesn't work), gegl-nop (No operation),
- added: bump-map, component_extract, dropshadow, embos, mosaic, supernova.
- added: "Additional Information"
Image

A little about bump-map:

- bump-map: https://gegl.org/operations/gegl-bump-map.html
- about GEGL graph by Kevin and Tmanni: https://www.gimp-forum.net/Thread-GEGL- ... 0#pid19960. This was crucial to solving the aux problem - save aux.
- chanche offset: '+' up/right, '-' down/left
- gegl_graph_string + aux does not accept commas (that was problem number 2 but I don't know why at all),

I think that the save method (assuming that the 'd:' drive exists) will allow the conversion of filters from 2 pads: aux2 aux.
Tim wrote about 3 pads - which filter is it?

Edit:
Version 2.0 has been removed due to detected bugs
Reported bugs have been fixed in version 2.1 #55


Attachments:
Result BM.jpg
Result BM.jpg [ 199.79 KiB | Viewed 7023 times ]

_________________
Image

Slava
Ukraini!


Last edited by MareroQ on Mon Nov 20, 2023 1:42 pm, edited 1 time in total.
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Mon Nov 20, 2023 1:10 am  (#39) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Please check gegl-mosaic.
It doesn't apply correctly parameters: neatness (and type)
choosing type=SQUARE and varying NEATNESS I get
- same result with any valuye of NEATNESS from 0.00 to 0.99 (first attachment)
- total neatness with value 1.00 but changing square to hexagon (second attachment)

Attachment:
avinash-kumar-pdGd5N5J7UM-unsplash GEGL MOSAIC tile=SQUARE neat=0.99.jpg
avinash-kumar-pdGd5N5J7UM-unsplash GEGL MOSAIC tile=SQUARE neat=0.99.jpg [ 1.25 MiB | Viewed 6994 times ]

Attachment:
avinash-kumar-pdGd5N5J7UM-unsplash GEGL MOSAIC tile=SQUARE neat=1.00.jpg
avinash-kumar-pdGd5N5J7UM-unsplash GEGL MOSAIC tile=SQUARE neat=1.00.jpg [ 1.14 MiB | Viewed 6994 times ]


Thanks

_________________
"Where am I ?"


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Mon Nov 20, 2023 3:10 am  (#40) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Just a note.
I went to the filter definition.
Could the problem be the use of "-" instead of "_" in some parameters?
I didn't change to try. But you could.

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 97 posts ]  Go to page Previous  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