It is currently Fri Jul 17, 2026 8:44 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Scripting GEGL functions
PostPosted: Sun Feb 26, 2023 6:36 pm  (#41) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2012
Guys I need help getting this plugin working in 2.10.32 and up

https://www.gimp-forum.net/Thread-Scrip ... operations
https://www.gimp-forum.net/attachment.php?aid=4477


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Sat Aug 26, 2023 10:05 am  (#42) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2012
*August 26 update to fix a conflict with gegl_command.py (said update applies to both stable and experimental GEGL Effects)
FIX HERE
https://github.com/LinuxBeaver/GEGL-Eff ... L/releases

Also the post above shows me clueless about why my own plugin use to break this.

Outside of this drama we need to update this python script to include gegl name spaces other then just gegl. ( Such as gimp: svg: or lb:) my own custom name space. A Gimp dev Liam even uses the name space (boy:) so there would need to be a way to tell this script to accept any gegl name space


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Sep 25, 2023 10:00 pm  (#43) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2012
This is tedious and painful. If people want to call my plugins in scripts this tool needs to allow GEGL plugins that use name spaces other then gegl:, In example (anything:pluginname) instead of just (gegl:pluginname)


I had to rename plugins of mine from lb: to gegl: again just to run them in BIMP.


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Sun Nov 05, 2023 7:07 pm  (#44) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4503
Location: Canada
Hey I was looking at this viewtopic.php?f=9&t=18040&p=254914#p255005
What if I like parse out all pages from https://www.gegl.org/operations/
and make the right replacemnts (sort of like translating into autogenerated python_fu files using this generic template) and just make right replacements.
So that we have access to all the GEGL functions from python fu. It calls the made dinasset_gegl_graph.
Would people actually use it?
#!/usr/bin/env python
from gimpfu import *
def #FUNCTION_NAME#(image, layer, #VARIABLES#):
   #radius=300
   #samples=4
   #iterations=10
   #enhance_shadows=True
   gegl_graph_string="#GEGL_METHOD# #PARAMS#" % (#VARIABLES)
   pdb.python_fu_dinasset_gegl_graph(image, layer, gegl_graph_string)

register(
   "python_fu_#FUNCTION_NAME#",
   "GEGL Testing",
   "GEGL Testing",
   "Auto Author",
   "Auto Author",
   "Auto Generated Dated",
   "<Image>/Python-Fu/GEGL-Automated/#FUNCTIONNAME#",             #Menu path
   "*",
   [
   #PFVARIABLES#
   ],
   [],
   #FUNCTION_NAME#)

main()


Follow progress of this

_________________
TinT


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 4:08 am  (#45) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 282
Location: Lake Havasu City, Arizona, USA
Your idea would be invaluable to me as a proof of GEGL to Python-Fu operability.

_________________
Charles


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 6:32 am  (#46) 
Online
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 2845
Location: East Midlands of England
I really admire what Contrast/Beaver has done with GEGL but I just cannot get my head around using it at all; I keep looking at his code and the GEGL syntax and my brain goes into meltdown.

I need to be able to use GEGL through python scripts so if you can pull this off I will be extremely happy indeed. Heroic in fact!
:coolthup :tyspin :hi5 :yes :geek :clap

_________________
Image
"Let no one steal your dreams."
Paul Cookson

Custom Font Links
2.10 Tools
Character Paths
White Bases


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 6:51 am  (#47) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4503
Location: Canada
Not heroic, just tinkering and direct translation/parsing in concept.
currently, I have no idea how to call dinasset_gegl_graph for

gegl operations that have pads which aren't just input output (less or more).

Hopefully someone will chime in.

But if I know how to call them then in theory this would work (I cross my finger).

_________________
TinT


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 11:32 am  (#48) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4503
Location: Canada
I think you'll be partially happy with 72 functions exposed post.

_________________
TinT


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 11:45 pm  (#49) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Tin, you can remove "dinasset" from your exposed gegl functions, they will work the same, "dinasset" is superfluos and just remembers the gift to me of paynekj.

ps: or replace "dinasset" with "paynekj", which is likely even better

_________________
"Where am I ?"


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Mon Nov 06, 2023 11:53 pm  (#50) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4503
Location: Canada
hehe ok

_________________
TinT


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue Nov 07, 2023 6:42 am  (#51) 
Online
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 2845
Location: East Midlands of England
Amazing (okay heroic was perhaps a little over the top I admit) work Tim.

Have downloaded and played a little with a few of the options (time always short at the beginning of the week for me) and it seems to work so far.

Not sure if this can be used in custom font fun - was hoping to use pdb calls in scripts - but takes longer than I hoped and of course console appears as it works.

:tyspin

_________________
Image
"Let no one steal your dreams."
Paul Cookson

Custom Font Links
2.10 Tools
Character Paths
White Bases


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue Nov 07, 2023 7:25 am  (#52) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4503
Location: Canada
1. I learned something new
the by adding the line
#!/usr/bin/env python

to beginning of gegl_graph.py, it suppressed or doesn't show console (on Windows).

2. you are able to call it from pdb.procedures. I tested and they work fine.
for example
pdb.python_fu_gegl_brightness_contrast(image,layer,-0.31000000000000005)
pdb.python_fu_gegl_svg_saturate(image,layer,'')
pdb.python_fu_gegl_motion_blur_zoom(image,layer,0.16, 0.08, 0.14)
pdb.python_fu_gegl_unpremultiply(image,layer,)
pdb.python_fu_gegl_reinhard05(image,layer,56.389999999999986, 0.69, 0.82)


I have added this single line change to not show console to this post

_________________
TinT


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Fri Nov 17, 2023 8:08 pm  (#53) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2012
https://github.com/LinuxBeaver/Special_ ... /releases/

These 24 GEGL plugins of mine are compatible with python scripting and gegl_command.py and can be "exposed to Python Fu" the other 46 plugins of mine do not work with python fu.


If anyone is willing to convert my GEGL plugins to python these should be the only ones you work on. I'd really appreciate if someone got to porting my plugins to python fu.


Top
Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group