Post all Gimp scripts and script writing questions here
Post a reply

GEGL Plugin development guide from a Associate Gimp Developer

Wed Jan 11, 2023 8:46 am

https://barefootliam.blogspot.com/2022/ ... using.html

https://barefootliam.blogspot.com/2022/ ... -gegl.html

https://barefootliam.blogspot.com/2023/ ... three.html

We have a professional guide on how to make third party GEGL filters. Made by associate Gimp developer Barefoot Liam (not me).


GEGL_GUIDE_by_Liam.zip
(1.52 MiB) Downloaded 15 times

Re: GEGL Plugin development guide from a Associate Gimp Developer

Mon Jan 23, 2023 12:43 pm

Im trying to install GIMP3-ML on windows 10 ive downloaded the file from github and extracted it i installed python 3.10 and i downloaded the weights but i confused on what to do with the weights and the extracted GIMP3-ML i need help im also using gimp version 2.99.14
im completely lost trying to use this website and where yo ask a question

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Jan 24, 2023 6:15 am

Thank you LinuxBeaver :bigthup

Re: GEGL Plugin development guide from a Associate Gimp Developer

Mon Apr 24, 2023 5:37 pm

It is almost one year since I made my first plugin and so far no one is even making GEGL Graphs :(

There is one person who isn't on Gimp Chat (Pix Cores) who has made basic GEGL Graphs but not plugins. I'm trying to see if I can guide him into making one.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 6:02 am

Well I keep trying but I get very frustrated by the process - even though you have done a great job in your tut (and with your plug-ins) - as well as the Bare Foot blogger's stuff. Couldn't find any documentation for the gimp:gegl stuff and the plug-in by kevin to use gegl graph stuff seems to not like gimp:alpha stuff.

Suppose I was hoping to apply to custom font files.

(Too much stuff talk I know - but that's about as technical as I get these days!) :gaah :gaah

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 8:26 am

Skinnyhouse wrote:Well I keep trying but I get very frustrated by the process - even though you have done a great job in your tut (and with your plug-ins) - as well as the Bare Foot blogger's stuff. Couldn't find any documentation for the gimp:gegl stuff and the plug-in by kevin to use gegl graph stuff seems to not like gimp:alpha stuff.

Suppose I was hoping to apply to custom font files.

(Too much stuff talk I know - but that's about as technical as I get these days!) :gaah :gaah


Only Pango MarkUp can apply custom fonts, but "GIMP GEGL" Blend modes are listed like this inside c file templates. They
are represented as these numbers for an unknown reason and blendspace 1 or 2 may mean to avoid or cover transparency while blending. I forgot.

Here is a list of all common blend modes people would expect to use in Gimp

hslcolor = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 39, NULL);

grainmerge = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 47, NULL);

softlight = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 45, NULL);

addition = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 33, NULL);


hardlight = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 44, NULL);


hsvhue = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 37, NULL);


overlay = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 23, NULL);

burn = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 43, "blend-space", 1, NULL);

lchcolor = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 26, "blend-space", 3, NULL);

multiply = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 30, "blend-space", 2, NULL);

linearlight = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 50, "blend-space", 2, NULL);

screen = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 31, "blend-space", 2, NULL);

antierase = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 63, "blend-space", 2, NULL);

colorerase = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 57, "blend-space", 1, NULL);

divide = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 41, "blend-space", 1, "opacity", 0.03, NULL);

subtract = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 34, "composite-mode", 0, NULL);

dodge = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 42, "composite-mode", 0, "composite-space", 1, "blend-space", 1, NULL);

grainextract = gegl_node_new_child (gegl,
"operation", "gimp:layer-mode", "layer-mode", 46, "composite-mode", 0, NULL);





This is one major thing that was never documented. It is the equalivant of linking

Code:
gimp:layer-mode layer-mode=


As for gimp:threshold-alpha that is easy just write

Code:
  thresholdalpha    = gegl_node_new_child (gegl,
                                  "operation", "gimp:threshold-alpha",
                                  NULL);



Liam never talked about renaming ENUM list either so you can link or make filters with list. :(


gimp_only_blend_modes.zip
(510 Bytes) Downloaded 137 times

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 8:55 am

I have made a useless plugin that does nothing but dye things blue. It shows `gimp:layer-mode layer-mode=hsl-color` and emboss ENUM list being renamed successful. Study the code.

Notice the 2 in front of Emboss type? It always has to be a different number. No two ENUM list can share the same name
Code:
enum_start (gegl_emboss_type2)
  enum_value (GEGL_EMBOSS_TYPE_EMBOSS2,  "emboss",  N_("Emboss"))
  enum_value (GEGL_EMBOSS_TYPE_BUMPMAP2, "bumpmap", N_("Bumpmap (preserve original colors)"))
enum_end (GeglEmbossType2)

property_enum (type, _("Emboss Type"),
               GeglEmbossType2, gegl_emboss_type2, GEGL_EMBOSS_TYPE_EMBOSS2)
    description(_("Rendering type"))



It is best to name the ENUM list random jibberish or something special to you so it never conflicts with someone else's ENUM list.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 8:59 am

Also if one studies String1 and String2 in Glossy Balloon's source code you can see how to link a GEGL Graph inside a GEGL Graph



Code:
property_string (string, _("Graph1"), TUTORIAL)
    ui_meta     ("role", "output-extent")

#define TUTORIAL \
" color-overlay value=#f587ff median-blur  percentile=90 alpha-percentile=100 "\

property_string (string2, _("Graph2"), TUTORIAL2)
    ui_meta     ("role", "output-extent")

#define TUTORIAL2 \
" id=3 screen aux=[   ref=3 emboss  type=bumpmap azimuth=30  elevation=15 ] median-blur  percentile=90 alpha-percentile=100 gaussian-blur std-dev-x=1 std-dev-y=1 filter=fir id=3 screen aux=[ ref=3  emboss  type=bumpmap azimuth=90  elevation=15 ] screen aux=[ ref=3  emboss  type=bumpmap azimuth=90  elevation=15 ] median-blur  percentile=50 alpha-percentile=100 screen aux=[ ref=3  emboss  type=bumpmap azimuth=90  elevation=15 ] median-blur  percentile=50 alpha-percentile=100 screen aux=[ ref=3  emboss  type=bumpmap azimuth=90  elevation=15 ] reinhard05 brightness=-4 light=0 chromatic=0   "\




Code:
graph   = gegl_node_new_child (gegl,
                                  "operation", "gegl:gegl",
                                  NULL);

graph2   = gegl_node_new_child (gegl,
                                  "operation", "gegl:gegl",
                                  NULL);




Gimp only operations like gimp:threshold-alpha can also go inside these graphs.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 12:34 pm

gimp_exclusive_blend_modes.pdf
(80.75 KiB) Downloaded 149 times


I made a short guide on how to link Gimp exclusive blend modes as GEGL Plugins.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Apr 25, 2023 12:47 pm

:tyspin Contrast

Well there is a lot here to digest C so I will look again carefully over the next few weeks to see what I can learn.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Sat May 20, 2023 7:11 pm

Here is a list of all numbers for all Gimp only blend modes so they can be called in GEGL.

In example

47 is the Grain Merge Blend mode.
Code:
grainmerge = gegl_node_new_child (gegl,
                              "operation", "gimp:layer-mode", "layer-mode", 47, "composite-mode", 0, NULL);


39 is HSL Color

Code:
hslcolorig = gegl_node_new_child (gegl,
                              "operation", "gimp:layer-mode", "layer-mode", 39, "composite-mode", 0, NULL);


60 is the Gimp Split Blend mode.
Code:
xor = gegl_node_new_child (gegl,
                                    "operation", "gimp:layer-mode", "layer-mode", 60,  "composite-mode", 0, "blend-space", 0, "composite-space", 0, NULL);



57 is the Color Erase Blend mode.

Code:
colorerase = gegl_node_new_child (gegl,
                                    "operation", "gimp:layer-mode", "layer-mode", 57,  "blend-space", 1, NULL);






These operations will not work outside of Gimp but they are very useful for plugin development.


62 is Gimp's replace blend mode that I failed to list. My list ends at 61. lol

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Jun 30, 2023 10:06 pm

plugins1.pdf
(343.64 KiB) Downloaded 119 times


plugins2.pdf
(703.87 KiB) Downloaded 140 times


plugins3.pdf
(675.59 KiB) Downloaded 125 times


Liam's GEGL plugin development guide with extra notes that isn't included on the website, its still 95% similar to the website

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Jun 30, 2023 10:10 pm

PDF documenting the most common reasons why my plugins will break in the future. NOTE ONE OF THEM IS GIMP'S TEAM ADDING A NEW BLEND MODE. This is for future maintainers. I don't expect this to happen anytime soon near future.

for_future_maintainers.pdf
(40.87 KiB) Downloaded 125 times

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Sep 15, 2023 8:22 am

Souless Tree already made two node chaining type GEGL plugins but doesn't plan to make anymore. ( I asked him)
https://github.com/soulless-tree/soulless-gegl

BarefootLiam made one that calls the Pango Markup language, this is not a node chaining type plugin like I make.
https://gitlab.com/barefootliam/gegl-pango-markup

I made over 50 GEGL plugins, all of them are based around node chaining, but now as 2023 is in its later parts I have to wonder if the entire year will end with no other third party GEGL devs? Hopefully by the end of the year Gimp 3 is released and someone else considers making a GEGL plugin. I've been begging for this to happen for a long time to no avail.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Sep 15, 2023 10:40 am

If I wanted to create a GEGL plugin, where would I find the current guide to setting-up the tools on Windows for compiling the plugin?

Kevin

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Sep 15, 2023 11:00 am

Install this
https://www.msys2.org/

Use Windows 64 bit and install install GEGL, Meson and Ninja afterward
https://packages.msys2.org/search?q=gegl

Re: GEGL Plugin development guide from a Associate Gimp Developer

Fri Sep 15, 2023 12:19 pm

paynekj wrote:If I wanted to create a GEGL plugin, where would I find the current guide to setting-up the tools on Windows for compiling the plugin?

Kevin


If you can compile one of my plugins on Windows with those listed mysys2 tools. You have everything you need to develop a new plugin. So that will be the confirmation test.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Sun Oct 01, 2023 1:14 pm

paynekj wrote:If I wanted to create a GEGL plugin, where would I find the current guide to setting-up the tools on Windows for compiling the plugin?

Kevin


I just repeated this process today because my virtual box Windows 7 broke.

Install MySys2

Run the Application MSYS2 MINGW64

Run this command inside MINGW64
Code:
pacman --noconfirm -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-meson mingw-w64-x86_64-gegl

This will install EVERYTHING NEEDED

If something unknown happens, it will only allow to compile plugins in this folder.
C:\msys64\home\USERNAME

but in most cases it will compile anything system wide.
Then opening the build_linux.sh files in MySys2 will compile my plugins. If you can compile my plugins you can compile your own.

Re: GEGL Plugin development guide from a Associate Gimp Developer

Sat Oct 28, 2023 5:38 pm

The entire development of a GEGL plugin was documented in this thread.
viewtopic.php?f=9&t=20579&start=0

Re: GEGL Plugin development guide from a Associate Gimp Developer

Tue Dec 12, 2023 7:49 am

It is almost 2024 and I am at the point where I am literally integrating AI in my GEGL plugins and others have yet to make a single GEGL plugin, and based on view counts of threads on Gimp Chat it seems people are far more interested in calling GEGL From python then chaining GEGL nodes inside GEGL composers like I do.

GEGL from python will do interesting things but I beg the community to make a GEGL plugin the way I do. Its hard to believe I am still the only one doing this.
Post a reply