It is currently Thu Apr 25, 2024 5:37 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Scripting GEGL functions
PostPosted: Wed May 19, 2021 12:50 pm  (#31) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Hello :)

Here is the paynekj's code converted into a "gegl_command.py" plug-in.
It does not show in any menu, but it enables to code "pdb.python_gegl(theImage, theDrawable, theGeglCommand)".
It's tested on Linux but not on Windows.

EDIT:
That's a (near-)duplicate of gimp-forum.net.
(The file was "fu-python-gegl_ops_test.py". It enabled to code "pdb.gegl_gegl(theDrawable, theGeglCommand)".)
Regardless of the duplication, I suggest to keep "gegl_command.py" that is made up of paynekj's simpler version.
( :oops: Sorry, for the mess.)

==> "gegl_command.py" has to be put in the "plug-ins" directory.


Attachments:
gegl_command.zip [934 Bytes]
Downloaded 312 times

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Last edited by cli345 on Fri Jun 04, 2021 8:49 am, edited 4 times in total.
Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Thu May 20, 2021 3:16 am  (#32) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12658
Location: Spain, Aragón
cli345, thanks again for your nice plug-ins.
I have windows and it works great in neontext. :tyspin :hi5


Attachments:
Works_in_Windows.jpg
Works_in_Windows.jpg [ 42.62 KiB | Viewed 4311 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Thu May 20, 2021 3:38 pm  (#33) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Thanks instead to paynekj :tyspin (It isn't my plug-in, I only isolated his code into a file)

Thank you Issabella for your feedback :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue May 25, 2021 9:41 am  (#34) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Is there an update of the Gegl-operations-common file posted at #25?
Some operations are missing.
Sorry to ask but I'm unable to find an update by googling, I suppose there is a recent more complete list of the c functions, where to look to see the required parameters.
Thanks.

_________________
"Where am I ?"


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue May 25, 2021 12:54 pm  (#35) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
dinasset wrote:
Is there an update of the Gegl-operations-common file posted at #25?
Some operations are missing.
Sorry to ask but I'm unable to find an update by googling, I suppose there is a recent more complete list of the c functions, where to look to see the required parameters.
Thanks.


For what it is worth the GEGL page is back on line. https://gegl.org/operations/ That takes you to individual functions with descriptions and syntax.

For Windows ;)

The samj 2.10.24 no longer includes the file gegl.exe but it is there in the zip on post#25 I works in both samj and regular Gimp 2.10.24
It is worth reading the samj GEGL post on this page https://samjcreations.blogspot.com/2020 ... -tres.html

Example screenshot for functions listing ( --list-all ) and for an individual operation. ( --info gegl:xxxxx) I make 250 operations.

Attachment:
gegl.jpg
gegl.jpg [ 161.44 KiB | Viewed 3910 times ]

_________________
Image


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue May 25, 2021 1:01 pm  (#36) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2246
Location: Poland
https://gegl.org/operations/

Image

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Tue May 25, 2021 1:30 pm  (#37) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks a lot, I will check whether I can find what needed.
In any of my last scripts there are some gegl operations (sometimes I didn't find what I was looking for).

_________________
"Where am I ?"


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Wed Nov 24, 2021 11:10 pm  (#38) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1394
Hey guys. A command like

gegl:layer src=/home/contrast/Pictures/LinkedLayers/share.png

is literally the closest thing to having to a shared shared layer system like photoshop

Image I made a GEGL Graph preset of it but I was wondering if anyone had a better idea to implement this?


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Thu Nov 25, 2021 10:15 am  (#39) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1394
I would like to show GEGL Graph's ability to live syntax edit text style effects. I wish more Gimp users knew about this as I have been doing this since June 2021 and no longer have to spam multiple drop shadow filters.

https://streamable.com/4p9c1z


Top
 Post subject: Re: Scripting GEGL functions
PostPosted: Thu Nov 25, 2021 3:21 pm  (#40) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 129
Location: Lake Havasu City, Arizona, USA
contrast_,
That was a informative video. Thanks.

_________________
Charles


Top
 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: 1394
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: 1394
*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: 1394
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: 3975
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: 129
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) 
Offline
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 1989
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


Latest plug-in update: Paragrapher v.1.4
Custom Font Links
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: 3975
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: 3975
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: 14816
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: 3975
Location: Canada
hehe ok

_________________
TinT


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts I figured out how to hide useless UI functions in GEGL filters.

1

No new posts Eager to learn how to draw pixel functions in GIMP python

2

No new posts Attachment(s) GEGL "Glass over Text' is STAND ALONE BUT NOW PART OF GEGL EFFECTS

5

No new posts Attachment(s) GEGL Bevel (filter of its own but now ships with GEGL Effects)

32

No new posts Help! Script-fu gegl:gegl works on only some of my third party filters

5


cron

* Login  



Powered by phpBB3 © phpBB Group