Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can python access gegl tools?
#5
(11-23-2021, 04:03 PM)rich2005 Wrote: A couple of plugins that you can look at Wink

First the fu-python-high-pass.py  This is the type that you want. It registers in the database as gegl-high-pass with parameters. Too complicated for me to adapt to recursive-transform.

The second gegl-command.py is an example of slotting a gegl function into a plugin written for the purpose.

Find information about the recursive transform variables: https://gegl.org/operations/gegl-recursi...sform.html
You can  get some gegl settings if you export the saved values to a file. Looks like this:

Code:
https://gegl.org/operations/gegl-recursive-transform.html
# GIMP 'Recursive Transform' settings

(time 0)
(transform "matrix(0.99331105831873456,0,0,0,0.95348834991455078,0,4,0,1)")
(first-iteration 3)
(iterations 5)
(fade-color (color-rgba 0 0 0 0))
(fade-opacity 1)
(paste-below no)
(sampler-type linear)

# end of 'Recursive Transform' settings

...and rewritten as a string 

Code:
gegl_graph_string="recursive-transform transform='matrix(0.99331105831873456,0,0,0,0.95348834991455078,0,4,0,1)' first-iteration=3 iterations=5 fade-color=rgba(0.0,0.0,0.0,0.10)  fade-opacity=1 paste-below=1 sampler-type=linear"

and that goes into the gegl-command.py in line 53  The plugin registers in the tools menu. 

Apart from that, I do not know,best of luck Wink

Edit: Does not work in Windows , such is life, probably needs the Windows GEGL binary installing.

Silly-me, It does work, I was not using a transparent layer.

Wow, invaluable link and examples!
Thank you so much Rich
Reply


Messages In This Thread
Can python access gegl tools? - by PixLab - 11-10-2021, 03:06 PM
RE: Can python access gegl tools? - by rich2005 - 11-10-2021, 06:49 PM
RE: Can python access gegl tools? - by PixLab - 11-23-2021, 05:37 AM
RE: Can python access gegl tools? - by rich2005 - 11-23-2021, 04:03 PM
RE: Can python access gegl tools? - by PixLab - 11-24-2021, 08:24 AM

Forum Jump: