It is currently Fri May 03, 2024 4:17 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
Author Message
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Thu Nov 23, 2023 12:48 am  (#81) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
Does anyone think about making a syntax where users can chain both GEGL and GMIC commands? I dream of that. Someone do it!


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Thu Nov 23, 2023 4:08 pm  (#82) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
So far I ported all of these plugins of mine to python

Glossy Balloon, Custom Bevel, Sharp Bevel, Metallic, and Action Lines

#-------------------------------------Glossy_Balloon-----------------------------------------------------   

def gegl_glossy_balloon(image, layer, gaus,hue,lightness,opacityall):


    gegl_graph_string="lb:script-glossy-balloon gaus=%f hue=%f lightness=%f opacityall=%f" % (gaus, hue, lightness, opacityall)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_glossy_balloon",
    "GEGL to Python. Works on the active layer",
    "Glossy Balloon GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/gegl-glossy-balloon...",             #Menu path
    "*",
    [
    (PF_FLOAT, "gaus","Balloonification (default:6.0, 0.5 20.0):", 6.0),   
    (PF_FLOAT, "hue","Rotate Color (default:0, -180 180.0):", 0),
    (PF_FLOAT, "lightness","Lightness (default:-7, -15.0 15.0):", -7),
    (PF_FLOAT, "opacityall","Internal Opacity (default:0.0, 1.0 5.0):", 3.0),

    ],
    [],
    gegl_glossy_balloon)

#-------------------------------------Custom_Bevel-----------------------------------------------------   

def gegl_custom_bevel(image, layer, opacity, blendmode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb):


    if blendmode==0:
        blend_mode= "Hardlight"
    if blendmode==1:
        blend_mode= "Multiply"
    if blendmode==2:
        blend_mode= "ColorDodge"
    if blendmode==3:
        blend_mode= "Plus"
    if blendmode==4:
        blend_mode= "Darken"
    if blendmode==5:
        blend_mode= "Lighten"



    gegl_graph_string="lb:script-custom-bevel opacity=%f blendmode=%s azimuth=%f elevation=%f depth=%f size=%f alphapercentile=%f gaus=%f box=%f mcb=%f" % (opacity, blend_mode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_custom_bevel",
    "GEGL to Python. Works on the active layer",
    "Custom Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/gegl-custom-bevel...",             #Menu path
    "*",
    [
    (PF_FLOAT, "opacity","Internal opacity (default:1.0, 3.5 10.0):", 3.5),
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 30 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 90):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 1 100):", 24),
    (PF_FLOAT, "size","Internal Median Radius (default:1, 0 15):", 1),
    (PF_FLOAT, "alphapercentile","Internal Median AP (default:68, 0 100):", 68),
    (PF_FLOAT, "gaus","Internal Gaussian Blur (default:2, 0 9):", 2),
    (PF_FLOAT, "box","Internal Box Blur (default:0, 0 6):", 0),
    (PF_FLOAT, "mcb","Smooth (default:0, 0 6):", 1),

    ],
    [],
    gegl_custom_bevel)

#-------------------------------------Sharp_Bevel-----------------------------------------------------   

def gegl_sharp_bevel(image, layer, blendmode,  azimuth, elevation, depth,  size,  transvalue, bevelcontrol, smooth):

    if blendmode==0:
        blend_mode= "hardlight"
    if blendmode==1:
        blend_mode= "multiply"
    if blendmode==2:
        blend_mode= "colordodge"
    if blendmode==3:
        blend_mode= "plus"
    if blendmode==4:
        blend_mode= "darken"
    if blendmode==5:
        blend_mode= "lighten"
    if blendmode==6:
        blend_mode= "overlay"


    gegl_graph_string="lb:script-sharpbevel blendmode=%s azimuth=%f elevation=%f depth=%f size=%f transvalue=%f bevelcontrol=%f smooth=%f" % (blend_mode, azimuth, elevation, depth, size, transvalue, bevelcontrol, smooth)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_sharp_bevel",
    "GEGL to Python. Works on the active layer",
    "Sharp Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/gegl-sharp-bevel...",             #Menu path
    "*",
    [
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten","Overlay"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 20 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 140):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 8 100):", 24),
    (PF_FLOAT, "size","Size (default:3, 1 9):", 3),
    (PF_FLOAT, "transvalue","Remove Black Artifact (default:0.05, 0.00 0.03):", 0.05),
    (PF_FLOAT, "bevelcontrol","Make Surface Flat (default:1, 1 6):", 1),
    (PF_FLOAT, "smooth","Smooth (default:9, 1 20):", 9),


    ],
    [],
    gegl_sharp_bevel)
#-------------------------------------Metallic-----------------------------------------------------

def gegl_metallic(image, layer, solar1, solar2, solar3, light, smooth, value):


    gegl_graph_string="lb:script-metallic solar1=%f solar2=%f solar3=%f light=%f smooth=%f value=%f" % (solar1, solar2, solar3, light, smooth, value)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_metallic",
    "GEGL to Python. Works on the active layer",
    "Metallic GEGL Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/gegl-metallic...",             #Menu path
    "*",
    [
    (PF_FLOAT, "solar1","Solarization of Red Channel (default:2.7, 0.0 4.0):", 2.7),
    (PF_FLOAT, "solar2","Solarization of Green Channel (default:2.8, 2.2 4.0):", 2.8),
    (PF_FLOAT, "solar3","Solarization of Blue Channel (default:2.1, 0.0 4.0):", 2.1),
    (PF_FLOAT, "light","Lightness (default:0, -10.0 10.0):", 0),      
    (PF_FLOAT, "smooth","Smooth (default:2, 0 8):", 2),
    (PF_FLOAT, "value","Invert Original Image (default:0.0, 1.0 5.0):", 0),

    ],
    [],
    gegl_metallic)

#-------------------------------------Action_Lines-----------------------------------------------------

def gegl_action_lines(image, layer, movex,movey,color_al,radius,lines, seed_al, opacity):

    color_to_gegl_al=rgb_to_hex(color_al)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)      

    gegl_graph_string="lb:action-lines movex=%f movey=%f color=%s radius=%d lines=%d seed=%s opacity=%f" % (movex, movey, color_to_gegl_al, radius, lines, seed, opacity)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_action_lines",
    "GEGL to Python. Works on the active layer",
    "Action Lines GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/gegl-action_lines...",             #Menu path
    "*",
    [
    (PF_FLOAT, "movex","Move Horizontal (default:0.500, 0.0 0.80):", 0.500),
    (PF_FLOAT, "movey","Move Vertical (default:0.500, 0.0 0.80):", 0.500),
    (PF_COLOR, "color_al",         "Color:", (0, 0, 0)),
    (PF_SPINNER, "radius","Radius of Lines (default:3200, 800..10000):", 3200, (800, 10000, 3200)),
    (PF_SPINNER, "lines","Amount of Lines (default:700, 380..1024):", 700, (380, 1024, 700)),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "opacity","Opacity of Lines (default:2.0, 0.6 3.0):", 2.0),

    ],
    [],
    gegl_action_lines)

#-------------------------------------Align-----------------------------------------------------


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Nov 24, 2023 4:45 am  (#83) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2252
Location: Poland
Just a suggestion to register in the Gimp menu, plugins in a separate file gegl-python-fu by LinuxBeaver.py


Attachments:
File comment: code from post #82 as py file
gegl-python-fu by LinuxBeaver Ver.1.0.zip [2.58 KiB]
Downloaded 49 times
MenuLB.jpg
MenuLB.jpg [ 32.65 KiB | Viewed 3781 times ]
Add info.jpg
Add info.jpg [ 112.38 KiB | Viewed 3781 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Nov 24, 2023 7:02 am  (#84) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2252
Location: Poland
Rel 3.0: added: color-exchange, cubism, long-shadow, newsprint, pixelize.

A word about newsprint:
It is an extensive filter with several color models, tabs and a variable number of parameters - that's why it had to be divided into 3 parts.

For those interested in writing additional plugins, I am attaching the 'c' codes in Operation Gegl 0.4.47 c file.zip (includes LinuxBeaver and Workshop).

Current GEGL as Python listing:

absolute
antialias
bilateral-filter
bloom
box-blur
brightness-contrast
bump-map
c2g
cartoon
channel-mixer
clone
color-assimilation-grid
color-enhance
color-exchange
color-temperature
component-extract
cubism
difference-of-gaussians
diffraction-patterns
display
domain-transform
dropshadow
edge-laplace
edge-neon
edge-sobel
emboss
engrave
exposure
fattal02
gegl
gray
high-pass
hue-chroma
invert-gamma
invert-linear
json:grey2
lens-flare
levels
linear-sinusoid
long-shadow
mantiuk06
mblur
mean-curvature-blur
mirrors
mono-mixer
mosaic
motion-blur-circular
motion-blur-linear
motion-blur-zoom
newsprint-B&W
newsprint-CMYK
newsprint-RGB
noise-reduction
open-buffer
perlin-noise
photocopy
pixelize
polar-coordinates
posterize
red-eye-removal
reinhard05
rgb-clip
sdl2-display
sepia
shadows-highlights
slic
snn-mean
softglow
stress
stretch-contrast
stretch-contrast-hsv
supernova
svg-huerotate
svg-luminancetoalpha
svg-matrix
svg-saturate
tile-glass
tile-seamless
unpremultiply
unsharp-mask
value-invert
wavelet-blur
whirl-pinch

That's probably all I have to say on this topic.


Attachments:
newsprint.jpg
newsprint.jpg [ 179.4 KiB | Viewed 3771 times ]
Operation Gegl 0.4.46 c file.zip [908.07 KiB]
Downloaded 41 times
gegl-python-fu & gegl_graph Ver.3.0.zip [15.59 KiB]
Downloaded 66 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Nov 24, 2023 1:27 pm  (#85) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
MareroQ wrote:
Just a suggestion to register in the Gimp menu, plugins in a separate file gegl-python-fu by LinuxBeaver.py


LOL, I just did that late last night. and my list contains 13 plugins so far.
REMOVED DOWNLOAD BECAUSE MR.Q'S VERSION CONFLICTS WITH MINE AND I'LL JUST ADD MY CODE TO HIS DOWNLOAD


Here's my updated code.

#-------------------------------------Glossy_Balloon-----------------------------------------------------   

def gegl_glossy_balloon(image, layer, gaus,hue,lightness,opacityall):


    gegl_graph_string="lb:script-glossy-balloon gaus=%f hue=%f lightness=%f opacityall=%f" % (gaus, hue, lightness, opacityall)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_glossy_balloon",
    "GEGL to Python. Works on the active layer",
    "Glossy Balloon GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-glossy-balloon...",             #Menu path
    "*",
    [
    (PF_FLOAT, "gaus","Balloonification (default:6.0, 0.5 20.0):", 6.0),   
    (PF_FLOAT, "hue","Rotate Color (default:0, -180 180.0):", 0),
    (PF_FLOAT, "lightness","Lightness (default:-7, -15.0 15.0):", -7),
    (PF_FLOAT, "opacityall","Internal Opacity (default:0.0, 1.0 5.0):", 3.0),

    ],
    [],
    gegl_glossy_balloon)

#-------------------------------------Custom_Bevel-----------------------------------------------------   

def gegl_custom_bevel(image, layer, opacity, blendmode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb):


    if blendmode==0:
        blend_mode= "Hardlight"
    if blendmode==1:
        blend_mode= "Multiply"
    if blendmode==2:
        blend_mode= "ColorDodge"
    if blendmode==3:
        blend_mode= "Plus"
    if blendmode==4:
        blend_mode= "Darken"
    if blendmode==5:
        blend_mode= "Lighten"



    gegl_graph_string="lb:script-custom-bevel opacity=%f blendmode=%s azimuth=%f elevation=%f depth=%f size=%f alphapercentile=%f gaus=%f box=%f mcb=%f" % (opacity, blend_mode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_custom_bevel",
    "GEGL to Python. Works on the active layer",
    "Custom Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-custom-bevel...",             #Menu path
    "*",
    [
    (PF_FLOAT, "opacity","Internal opacity (default:1.0, 3.5 10.0):", 3.5),
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 30 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 90):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 1 100):", 24),
    (PF_FLOAT, "size","Internal Median Radius (default:1, 0 15):", 1),
    (PF_FLOAT, "alphapercentile","Internal Median AP (default:68, 0 100):", 68),
    (PF_FLOAT, "gaus","Internal Gaussian Blur (default:2, 0 9):", 2),
    (PF_FLOAT, "box","Internal Box Blur (default:0, 0 6):", 0),
    (PF_FLOAT, "mcb","Smooth (default:0, 0 6):", 1),

    ],
    [],
    gegl_custom_bevel)

#-------------------------------------Sharp_Bevel-----------------------------------------------------   

def gegl_sharp_bevel(image, layer, blendmode,  azimuth, elevation, depth,  size,  transvalue, bevelcontrol, smooth):

    if blendmode==0:
        blend_mode= "hardlight"
    if blendmode==1:
        blend_mode= "multiply"
    if blendmode==2:
        blend_mode= "colordodge"
    if blendmode==3:
        blend_mode= "plus"
    if blendmode==4:
        blend_mode= "darken"
    if blendmode==5:
        blend_mode= "lighten"
    if blendmode==6:
        blend_mode= "overlay"


    gegl_graph_string="lb:script-sharpbevel blendmode=%s azimuth=%f elevation=%f depth=%f size=%f transvalue=%f bevelcontrol=%f smooth=%f" % (blend_mode, azimuth, elevation, depth, size, transvalue, bevelcontrol, smooth)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_sharp_bevel",
    "GEGL to Python. Works on the active layer",
    "Sharp Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-sharp-bevel...",             #Menu path
    "*",
    [
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten","Overlay"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 20 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 140):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 8 100):", 24),
    (PF_FLOAT, "size","Size (default:3, 1 9):", 3),
    (PF_FLOAT, "transvalue","Remove Black Artifact (default:0.5, 0.5 14):", 4),
    (PF_FLOAT, "bevelcontrol","Make Surface Flat (default:1, 1 6):", 1),
    (PF_FLOAT, "smooth","Smooth (default:9, 1 20):", 9),


    ],
    [],
    gegl_sharp_bevel)
#-------------------------------------Metallic-----------------------------------------------------

def gegl_metallic(image, layer, solar1, solar2, solar3, light, smooth, value):


    gegl_graph_string="lb:script-metallic solar1=%f solar2=%f solar3=%f light=%f smooth=%f value=%f" % (solar1, solar2, solar3, light, smooth, value)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_metallic",
    "GEGL to Python. Works on the active layer",
    "Metallic GEGL Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-metallic...",             #Menu path
    "*",
    [
    (PF_FLOAT, "solar1","Solarization of Red Channel (default:2.7, 0.0 4.0):", 2.7),
    (PF_FLOAT, "solar2","Solarization of Green Channel (default:2.8, 2.2 4.0):", 2.8),
    (PF_FLOAT, "solar3","Solarization of Blue Channel (default:2.1, 0.0 4.0):", 2.1),
    (PF_FLOAT, "light","Lightness (default:0, -10.0 10.0):", 0),      
    (PF_FLOAT, "smooth","Smooth (default:2, 0 8):", 2),
    (PF_FLOAT, "value","Invert Original Image (default:0.0, 1.0 5.0):", 0),

    ],
    [],
    gegl_metallic)

#-------------------------------------Action_Lines-----------------------------------------------------

def gegl_action_lines(image, layer, movex,movey,color_al,radius,lines, seed_al, opacity):

    color_to_gegl_al=rgb_to_hex(color_al)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)      

    gegl_graph_string="lb:action-lines movex=%f movey=%f color=%s radius=%d lines=%d seed=%s opacity=%f" % (movex, movey, color_to_gegl_al, radius, lines, seed, opacity)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_action_lines",
    "GEGL to Python. Works on the active layer",
    "Action Lines GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-action_lines...",             #Menu path
    "*",
    [
    (PF_FLOAT, "movex","Move Horizontal (default:0.500, 0.0 0.80):", 0.500),
    (PF_FLOAT, "movey","Move Vertical (default:0.500, 0.0 0.80):", 0.500),
    (PF_COLOR, "color_al",         "Color:", (0, 0, 0)),
    (PF_SPINNER, "radius","Radius of Lines (default:3200, 800..10000):", 3200, (800, 10000, 3200)),
    (PF_SPINNER, "lines","Amount of Lines (default:700, 380..1024):", 700, (380, 1024, 700)),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "opacity","Opacity of Lines (default:2.0, 0.6 3.0):", 2.0),

    ],
    [],
    gegl_action_lines)

#-------------------------------------Align-----------------------------------------------------

def gegl_align (image, layer, scale_mode, scale, x, y):

    if scale_mode==0:
        scalemode= "nohalo"
    if scale_mode==1:
        scalemode= "lohalo"

    gegl_graph_string="lb:align algorithm=%s scale=%f x=%f y=%f" % (scalemode, scale, x, y)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_align",
    "GEGL to Python. Works on the active layer",
    "Align GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-align...",             #Menu path
    "*",
    [
    (PF_OPTION,  "scale_mode", "Algorithm:", 0, ["nohalo","lohalo"]),
    (PF_FLOAT, "scale","Scale Down Image (default:1.00, 0.05 1.00):", 1.00),
    (PF_FLOAT, "x","X Horizontal (default:0.5, 0.0 1.0):", 0.5),
    (PF_FLOAT, "y","Y Vertical (default:0.5, 0.0 1.0):", 0.5),

    ],
    [],
    gegl_align)

#-------------------------------------Old Photo Effect-----------------------------------------------------

def gegl_antique (image, layer, scale1, scale, lightness, noisergb, gaus, shadows, highlights):

    gegl_graph_string="lb:antique scale1=%f scale=%f lightness=%f noisergb=%f gaus=%f shadows=%f  highlights=%f" % (scale1, scale, lightness, noisergb, gaus, shadows, highlights)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_antique",
    "GEGL to Python. Works on the active layer",
    "Align GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-antique...",             #Menu path
    "*",
    [
    (PF_FLOAT, "scale1","Saturation (default:-11, -100 20.00):", -11),
    (PF_FLOAT, "scale","Sepia (default:0.0, 0.0 1.0):", 0.3),
    (PF_FLOAT, "lightness","Lightness (default:0.88, 0.0 1.00):", 0.88),
    (PF_FLOAT, "noisergb","Noise (default:0.2, 0.0 0.3):", 0.2),
    (PF_FLOAT, "gaus","Mild Blur (default:1.5, 0.0 3.5):", 1.5),
    (PF_FLOAT, "shadows","Shadows (default:0.0, -100.0 100.0):", 0.0),
    (PF_FLOAT, "highlights","highlights (default:0.0, -70.0 50.0):", 0.0),

    ],
    [],
    gegl_antique)


#-------------------------------------Aura-----------------------------------------------------

def gegl_aura (image, layer, color, radius, gradius, opacity, tile_size, tile_saturation, maskradius):

    zegl=rgb_to_hex(color)

    gegl_graph_string="lb:aura color=%s radius=%f gradius=%f opacity=%f tile-size=%f tile-saturation=%f maskradius=%f" % (zegl, radius, gradius, opacity, tile_size, tile_saturation, maskradius)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_aura",
    "GEGL to Python. Works on the active layer",
    "Aura GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-aura...",             #Menu path
    "*",
    [
    (PF_COLOR,   "color",         "Color:", (0, 255, 31)),
    (PF_FLOAT, "radius","Lens Blur Radius (default:11, 0.0 50.0):", 11),
    (PF_FLOAT, "gradius","Gaussian Radius (default:0.0, 0 50.0):", 0.0),
    (PF_FLOAT, "opacity","Opacity (default:1.0, 1 4.0):", 1.0),
    (PF_FLOAT, "tile_size","Internal Tile Size (default:6, 16.0):", 6),
    (PF_FLOAT, "tile_saturation","Internal Tile Saturation(default:3.0, 3.0 8.0):", 5.4),
    (PF_FLOAT, "mask_radius","Oilify (default:1.0, 1.0 4.0):", 4.0),

    ],
    [],
    gegl_aura)

#-------------------------------------Bokeh-----------------------------------------------------

def gegl_bokeh (image, layer, color, shape_2, amount, seed_al, size, opacity, blur):

    zegl=rgb_to_hex(color)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   


    if shape_2==0:
        shape= "circle"
    if shape_2==1:
        shape= "square"
    if shape_2==2:
        shape= "diamond"

   
    gegl_graph_string="lb:bokeh color=%s neighborhood=%s amount=%f seed=%s size=%f opacity=%f blur=%f " % (zegl, shape, amount, seed, size, opacity, blur)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)





register(
    "python_fu_gegl_bokeh",
    "GEGL to Python. Works on the active layer",
    "Bokeh GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-bokeh...",             #Menu path
    "*",
    [
    (PF_COLOR,   "color",         "Color:", (255, 255, 255)),
    (PF_OPTION,  "shape", "Bokeh Shape:", 0, ["circle","square","diamond"]),
    (PF_FLOAT, "amount","Increase Amount of Bokeh's (default:0.12, 0.05 0.35):", 0.12),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "size","Size of Bokeh's (default:25, 1 80):", 25),
    (PF_FLOAT, "opacity","Opacity (default:0.6, 0.1 1.3):", 0.6),
    (PF_FLOAT, "blur","blur (default:2, 0 12):", 2),

    ],
    [],
    gegl_bokeh)

#-------------------------------------Clouds-----------------------------------------------------


def gegl_clouds (image, layer, cloudsize, saturation, hue, seed_al):

    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   

    gegl_graph_string="lb:clouds cloudsize=%f saturation=%f hue=%f seed=%s " % (cloudsize, saturation, hue, seed)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_clouds",
    "GEGL to Python. Works on the active layer",
    "Clouds GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-clouds...",             #Menu path
    "*",
    [
    (PF_FLOAT, "cloudsize","Cloud Size (default:4.0, 0.05 4.14):", 4.0),
    (PF_FLOAT, "saturation","Saturation (default:0.6, 0.6 1.0):", 0.6),
    (PF_FLOAT, "hue","Hue Rotation (default:0, -180 180):", 0),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),


    ],
    [],
    gegl_clouds)

#-------------------------------------Double Glow-----------------------------------------------------

def gegl_double_glow (image, layer, photocopy, photocopy2, photocopy3, photocopy4, color, gaussian1, glow1, color2, gaussian2, glow2, glow2radius, blurall):

    color_special=rgb_to_hex(color)
    color2_special=rgb_to_hex(color2)


    gegl_graph_string="lb:doubleglow photocopy=%f photocopy2=%f photocopy3=%f photocopy4=%f color=%s gaussian=%f opacity=%f color2=%s radius=%f opacity2=%f grow-radius=%f gaussian3=%f " % (photocopy, photocopy2, photocopy3, photocopy4, color_special, gaussian1, glow1, color2_special, gaussian2, glow2, glow2radius, blurall)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_double_glow",
    "GEGL to Python. Works on the active layer",
    "Double Glow GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-doubleglow...",             #Menu path
    "*",
    [
    (PF_FLOAT, "photocopy","Internal Photocopy (default:5, 3 50):", 5),
    (PF_FLOAT, "photocopy2","Internal Photocopy 2 (default:1, 0.5 1):", 1),
    (PF_FLOAT, "photocopy3","Internal Photocopy 3 (default:1, 0.5 1):", 1),
    (PF_FLOAT, "photocopy4","Internal Photocopy 4 (default:0.99, 0.6 1):", 0.99),
    (PF_COLOR,   "color",         "Color:", (248, 0, 75)),
    (PF_FLOAT, "gaussian1","Blur Glow 1 (default:24, 0 50):", 24),
    (PF_FLOAT, "glow1","Hyper Opacity Glow 1 (default:2.5, 0 4):", 2.5),
    (PF_COLOR,   "color2",         "Color:", (252, 117, 47)),
    (PF_FLOAT, "gaussian2","Blur Glow 2 (default:1, 0 40):", 1),
    (PF_FLOAT, "glow2","Hyper Opacity Glow 2 (default:1.2, 0 2.0):", 1.2),
    (PF_FLOAT, "glow2radius","Radius of Glow 2 (default:1, -1 50):", 1),
    (PF_FLOAT, "blurall","Blur all (default:10, 0 60):", 10),

    ],
    [],
    gegl_double_glow)

#-------------------------------------Edge Extract-----------------------------------------------------

def gegl_edge_extract (image, layer, edgeamount, threshold, gaus, color):

    color_special=rgb_to_hex(color)

    gegl_graph_string="gegl:edge-extract edgeamount=%f threshold=%f gaus=%f value=%s  " % (edgeamount, threshold, gaus, color_special)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_edge_extract",
    "GEGL to Python. Works on the active layer",
    "Edge Extract GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-edge-extract...",             #Menu path
    "*",
    [
    (PF_FLOAT, "edgeamount","Edge Amount (default:10, 3 16):", 10),
    (PF_FLOAT, "threshold","Threshold (default:0.76, -0.25 0.90):", 0.76),
    (PF_FLOAT, "gaus","Blur (default:1, 0.5 20.0):", 1),
    (PF_COLOR,   "color",         "Color:", (255, 255, 255)),

    ],
    [],
    gegl_edge_extract)

#-------------------------------------Electricity-----------------------------------------------------

def gegl_electricity (image, layer, tile_size, tile_saturation, seed_al, transparency_threshold, oil, iterations, opacity, blur, col):

    zegl=rgb_to_hex(col)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   

    gegl_graph_string="lb:electricity tile-size=%f tile-saturation=%f seed=%s transparency-threshold=%f oil=%f iterations=%f opacity=%f blur=%f col=%s  " % (tile_size, tile_saturation, seed, transparency_threshold, oil, iterations, opacity, blur, zegl)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_electricity",
    "GEGL to Python. Works on the active layer",
    "Electricity GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-electricity...",             #Menu path
    "*",
    [
    (PF_FLOAT, "tile_size","Internal Cubism Size (default:19, 6.0 35.0):", 19),
    (PF_FLOAT, "tile_saturation","Internal Cubism Spacing (default:4.0, 2 9.0):", 4.0),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "transparency_threshold","Reduce electricity effect (default:0.064, 0.020 0.600):", 0.064),
    (PF_FLOAT, "oil","Internal Oilify to enhance electric effect (default:14, 8 30):", 14),
    (PF_FLOAT, "iterations","Internal Mean Curvature (default:20, 8 30):", 20),
    (PF_FLOAT, "opacity","Hyper Opacity (default:1.0, 1.0 2.0):", 1.0),
    (PF_FLOAT, "blur","Blur Rough Edges (default:1, 0 1):", 1),
    (PF_COLOR,   "col",         "Color:", (255, 255, 255)),

    ],
    [],
    gegl_electricity)


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Nov 24, 2023 5:04 pm  (#86) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
constrast,
You're working so hard on this.
The other day, maybe yesterday I don't remember but I asked ChatGPT if there's a simple way to track how many times plug-ins are used.
I would be interested in this because I assumed that coders would like to know the stats of their plug-ins being used heavily or not.
I don't know knowing numbers excite me.
ChatGPT suggested ways and said that you have to be transparent to the users and that have the option for users to opt-out.
So I decided to forego the idea, since if people opt-out then the numbers won't be anywhere close to real numbers.
Some places track downloads, but that doesn't actually say how heavily it's used. Since it could be downloaded 10 times but very heavily used repeatedly versus 100 downloads but hardly used more than once then it's not worth pursuing.
But if it can report every time it's used then you'd know it a plug-in is useful in that sense and can pursue plug-ins in the similar vicinity and know that it's more likely to be used.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sat Nov 25, 2023 2:50 am  (#87) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
We are tracked enough on the net. No need to be tracked using GIMP plugins.
I would stop using them immediately should I discover they have tracking code in them.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sat Nov 25, 2023 6:43 am  (#88) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
nelo wrote:
We are tracked enough on the net. No need to be tracked using GIMP plugins.
I would stop using them immediately should I discover they have tracking code in them.

I get you.
but we're being tracked not just on net but real life already by the man, I mean everytime I go groceries shopping I feel like being watched all the time by their cameras.

_________________
TinT


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sat Nov 25, 2023 1:58 pm  (#89) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
trandoductin wrote:
constrast,
You're working so hard on this.
The other day, maybe yesterday I don't remember but I asked ChatGPT if there's a simple way to track how many times plug-ins are used.
I would be interested in this because I assumed that coders would like to know the stats of their plug-ins being used heavily or not.
I don't know knowing numbers excite me.
ChatGPT suggested ways and said that you have to be transparent to the users and that have the option for users to opt-out.
So I decided to forego the idea, since if people opt-out then the numbers won't be anywhere close to real numbers.
Some places track downloads, but that doesn't actually say how heavily it's used. Since it could be downloaded 10 times but very heavily used repeatedly versus 100 downloads but hardly used more than once then it's not worth pursuing.
But if it can report every time it's used then you'd know it a plug-in is useful in that sense and can pursue plug-ins in the similar vicinity and know that it's more likely to be used.


Yeah, A lot of people in the Linux community care about privacy and would be upset if a plugin gathered information without their out right consent. But yeah it would be cool to know those stats.


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

Joined: Oct 31, 2020
Posts: 1414
19 GEGL plugins of mine have been ported to python and four of them are special cases just for python and hidden from the GUI.

This py file goes in the normal Gimp plugins folder that has existed since the 90s

Attachment:


These binaries go the new plugins folder for GEGL only stuff

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

**Windows**

C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins

**Linux**

/home/(USERNAME)/.local/share/gegl-0.4/plug-ins

**Linux (Flatpak includes Chromebook)**

/home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins

Now restart Gimp and look for "Python as GEGL" in the main menu and you'll see a "third party plugin" section. If you already have the binary Mr.Q provided overwrite it with the latest version. His only has four plugins of mine, this one has 19.

Changelog

# Rel 1.0: Initial release: 23/11/2023 LinuxBeaver [ aka contrast_]: 19 plugins (scheduled 24) Rel 1.0 includes these five: Glossy Balloon, Custom Bevel, Sharp Bevel, Metallic, Action Lines,
# Rel 1.1: adds the following: Align, Old Photo Effect, Bokeh, Clouds, Double Glow, Edge Extract, Electricity, Fog, Grains of Sand, Inner Glow, Long Shadow Extrusion, Neon Border, Pencil,
# Rel 1.2:




If you already have many of these binaries overwrite all of them with the latest versions as many of them were recently updated to work with python fu.


#-------------------------------------Glossy_Balloon-----------------------------------------------------   

def gegl_glossy_balloon(image, layer, gaus,hue,lightness,opacityall):


    gegl_graph_string="lb:script-glossy-balloon gaus=%f hue=%f lightness=%f opacityall=%f" % (gaus, hue, lightness, opacityall)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_glossy_balloon",
    "GEGL to Python. Works on the active layer",
    "Glossy Balloon GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-glossy-balloon...",             #Menu path
    "*",
    [
    (PF_FLOAT, "gaus","Balloonification (default:6.0, 0.5 20.0):", 6.0),   
    (PF_FLOAT, "hue","Rotate Color (default:0, -180 180.0):", 0),
    (PF_FLOAT, "lightness","Lightness (default:-7, -15.0 15.0):", -7),
    (PF_FLOAT, "opacityall","Internal Opacity (default:0.0, 1.0 5.0):", 3.0),

    ],
    [],
    gegl_glossy_balloon)

#-------------------------------------Custom_Bevel-----------------------------------------------------   

def gegl_custom_bevel(image, layer, opacity, blendmode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb):


    if blendmode==0:
        blend_mode= "Hardlight"
    if blendmode==1:
        blend_mode= "Multiply"
    if blendmode==2:
        blend_mode= "ColorDodge"
    if blendmode==3:
        blend_mode= "Plus"
    if blendmode==4:
        blend_mode= "Darken"
    if blendmode==5:
        blend_mode= "Lighten"



    gegl_graph_string="lb:script-custom-bevel opacity=%f blendmode=%s azimuth=%f elevation=%f depth=%f size=%f alphapercentile=%f gaus=%f box=%f mcb=%f" % (opacity, blend_mode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_custom_bevel",
    "GEGL to Python. Works on the active layer",
    "Custom Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-custom-bevel...",             #Menu path
    "*",
    [
    (PF_FLOAT, "opacity","Internal opacity (default:1.0, 3.5 10.0):", 3.5),
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 30 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 90):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 1 100):", 24),
    (PF_FLOAT, "size","Internal Median Radius (default:1, 0 15):", 1),
    (PF_FLOAT, "alphapercentile","Internal Median AP (default:68, 0 100):", 68),
    (PF_FLOAT, "gaus","Internal Gaussian Blur (default:2, 0 9):", 2),
    (PF_FLOAT, "box","Internal Box Blur (default:0, 0 6):", 0),
    (PF_FLOAT, "mcb","Smooth (default:0, 0 6):", 1),

    ],
    [],
    gegl_custom_bevel)

#-------------------------------------Sharp_Bevel-----------------------------------------------------   

def gegl_sharp_bevel(image, layer, blendmode,  azimuth, elevation, depth,  size,  transvalue, bevelcontrol, smooth):

    if blendmode==0:
        blend_mode= "hardlight"
    if blendmode==1:
        blend_mode= "multiply"
    if blendmode==2:
        blend_mode= "colordodge"
    if blendmode==3:
        blend_mode= "plus"
    if blendmode==4:
        blend_mode= "darken"
    if blendmode==5:
        blend_mode= "lighten"
    if blendmode==6:
        blend_mode= "overlay"


    gegl_graph_string="lb:script-sharpbevel blendmode=%s azimuth=%f elevation=%f depth=%f size=%f transvalue=%f bevelcontrol=%f smooth=%f" % (blend_mode, azimuth, elevation, depth, size, transvalue, bevelcontrol, smooth)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_sharp_bevel",
    "GEGL to Python. Works on the active layer",
    "Sharp Bevel GEGL Text Styling Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-sharp-bevel...",             #Menu path
    "*",
    [
    (PF_OPTION,  "blend_mode", "Blendmode:", 0, ["Hardlight","Multiply","ColorDodge","Plus","Darken","Lighten","Overlay"]),
    (PF_FLOAT, "azimuth","Azimuth (default:67, 20 90.0):", 67),
    (PF_FLOAT, "elevation","Elevation (default:25, 7 140):", 25),
    (PF_FLOAT, "depth","Depth (default:24, 8 100):", 24),
    (PF_FLOAT, "size","Size (default:3, 1 9):", 3),
    (PF_FLOAT, "transvalue","Remove Black Artifact (default:0.05, 0.00 0.03):", 0.05),
    (PF_FLOAT, "bevelcontrol","Make Surface Flat (default:1, 1 6):", 1),
    (PF_FLOAT, "smooth","Smooth (default:9, 1 20):", 9),


    ],
    [],
    gegl_sharp_bevel)
#-------------------------------------Metallic-----------------------------------------------------

def gegl_metallic(image, layer, solar1, solar2, solar3, light, smooth, value):


    gegl_graph_string="lb:script-metallic solar1=%f solar2=%f solar3=%f light=%f smooth=%f value=%f" % (solar1, solar2, solar3, light, smooth, value)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_metallic",
    "GEGL to Python. Works on the active layer",
    "Metallic GEGL Plugin In Python (Special fork)",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-metallic...",             #Menu path
    "*",
    [
    (PF_FLOAT, "solar1","Solarization of Red Channel (default:2.7, 0.0 4.0):", 2.7),
    (PF_FLOAT, "solar2","Solarization of Green Channel (default:2.8, 2.2 4.0):", 2.8),
    (PF_FLOAT, "solar3","Solarization of Blue Channel (default:2.1, 0.0 4.0):", 2.1),
    (PF_FLOAT, "light","Lightness (default:0, -10.0 10.0):", 0),      
    (PF_FLOAT, "smooth","Smooth (default:2, 0 8):", 2),
    (PF_FLOAT, "value","Invert Original Image (default:0.0, 1.0 5.0):", 0),

    ],
    [],
    gegl_metallic)

#-------------------------------------Action_Lines-----------------------------------------------------

def gegl_action_lines(image, layer, movex,movey,color_al,radius,lines, seed_al, opacity):

    color_to_gegl_al=rgb_to_hex(color_al)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)      

    gegl_graph_string="lb:action-lines movex=%f movey=%f color=%s radius=%d lines=%d seed=%s opacity=%f" % (movex, movey, color_to_gegl_al, radius, lines, seed, opacity)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_action_lines",
    "GEGL to Python. Works on the active layer",
    "Action Lines GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-action_lines...",             #Menu path
    "*",
    [
    (PF_FLOAT, "movex","Move Horizontal (default:0.500, 0.0 0.80):", 0.500),
    (PF_FLOAT, "movey","Move Vertical (default:0.500, 0.0 0.80):", 0.500),
    (PF_COLOR, "color_al",         "Color:", (0, 0, 0)),
    (PF_SPINNER, "radius","Radius of Lines (default:3200, 800..10000):", 3200, (800, 10000, 3200)),
    (PF_SPINNER, "lines","Amount of Lines (default:700, 380..1024):", 700, (380, 1024, 700)),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "opacity","Opacity of Lines (default:2.0, 0.6 3.0):", 2.0),

    ],
    [],
    gegl_action_lines)

#-------------------------------------Align-----------------------------------------------------

def gegl_align (image, layer, scale_mode, scale, x, y):

    if scale_mode==0:
        scalemode= "nohalo"
    if scale_mode==1:
        scalemode= "lohalo"

    gegl_graph_string="lb:align algorithm=%s scale=%f x=%f y=%f" % (scalemode, scale, x, y)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_align",
    "GEGL to Python. Works on the active layer",
    "Align GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-align...",             #Menu path
    "*",
    [
    (PF_OPTION,  "scale_mode", "Algorithm:", 0, ["nohalo","lohalo"]),
    (PF_FLOAT, "scale","Scale Down Image (default:1.00, 0.05 1.00):", 1.00),
    (PF_FLOAT, "x","X Horizontal (default:0.5, 0.0 1.0):", 0.5),
    (PF_FLOAT, "y","Y Vertical (default:0.5, 0.0 1.0):", 0.5),

    ],
    [],
    gegl_align)

#-------------------------------------Old Photo Effect-----------------------------------------------------

def gegl_antique (image, layer, scale1, scale, lightness, noisergb, gaus, shadows, highlights):

    gegl_graph_string="lb:antique scale1=%f scale=%f lightness=%f noisergb=%f gaus=%f shadows=%f  highlights=%f" % (scale1, scale, lightness, noisergb, gaus, shadows, highlights)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_antique",
    "GEGL to Python. Works on the active layer",
    "Align GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-antique...",             #Menu path
    "*",
    [
    (PF_FLOAT, "scale1","Saturation (default:-11, -100 20.00):", -11),
    (PF_FLOAT, "scale","Sepia (default:0.0, 0.0 1.0):", 0.3),
    (PF_FLOAT, "lightness","Lightness (default:0.88, 0.0 1.00):", 0.88),
    (PF_FLOAT, "noisergb","Noise (default:0.2, 0.0 0.3):", 0.2),
    (PF_FLOAT, "gaus","Mild Blur (default:1.5, 0.0 3.5):", 1.5),
    (PF_FLOAT, "shadows","Shadows (default:0.0, -100.0 100.0):", 0.0),
    (PF_FLOAT, "highlights","highlights (default:0.0, -70.0 50.0):", 0.0),

    ],
    [],
    gegl_antique)


#-------------------------------------Aura-----------------------------------------------------

def gegl_aura (image, layer, color, radius, gradius, opacity, tile_size, tile_saturation, maskradius):

    zegl=rgb_to_hex(color)

    gegl_graph_string="lb:aura color=%s radius=%f gradius=%f opacity=%f tile-size=%f tile-saturation=%f maskradius=%f" % (zegl, radius, gradius, opacity, tile_size, tile_saturation, maskradius)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_aura",
    "GEGL to Python. Works on the active layer",
    "Aura GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-aura...",             #Menu path
    "*",
    [
    (PF_COLOR,   "color",         "Color:", (0, 255, 31)),
    (PF_FLOAT, "radius","Lens Blur Radius (default:11, 0.0 50.0):", 11),
    (PF_FLOAT, "gradius","Gaussian Radius (default:0.0, 0 50.0):", 0.0),
    (PF_FLOAT, "opacity","Opacity (default:1.0, 1 4.0):", 1.0),
    (PF_FLOAT, "tile_size","Internal Tile Size (default:6, 16.0):", 6),
    (PF_FLOAT, "tile_saturation","Internal Tile Saturation(default:3.0, 3.0 8.0):", 5.4),
    (PF_FLOAT, "mask_radius","Oilify (default:1.0, 1.0 4.0):", 4.0),

    ],
    [],
    gegl_aura)


#-------------------------------------Bokeh-----------------------------------------------------

def gegl_bokeh (image, layer, color, shape_2, amount, seed_al, size, opacity, blur):

    zegl=rgb_to_hex(color)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   


    if shape_2==0:
        shape= "circle"
    if shape_2==1:
        shape= "square"
    if shape_2==2:
        shape= "diamond"

   
    gegl_graph_string="lb:bokeh color=%s neighborhood=%s amount=%f seed=%s size=%f opacity=%f blur=%f " % (zegl, shape, amount, seed, size, opacity, blur)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)





register(
    "python_fu_gegl_bokeh",
    "GEGL to Python. Works on the active layer",
    "Bokeh GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-bokeh...",             #Menu path
    "*",
    [
    (PF_COLOR,   "color",         "Color:", (255, 255, 255)),
    (PF_OPTION,  "shape", "Bokeh Shape:", 0, ["circle","square","diamond"]),
    (PF_FLOAT, "amount","Increase Amount of Bokeh's (default:0.12, 0.05 0.35):", 0.12),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "size","Size of Bokeh's (default:25, 1 80):", 25),
    (PF_FLOAT, "opacity","Opacity (default:0.6, 0.1 1.3):", 0.6),
    (PF_FLOAT, "blur","blur (default:2, 0 12):", 2),

    ],
    [],
    gegl_bokeh)

#-------------------------------------Clouds-----------------------------------------------------


def gegl_clouds (image, layer, cloudsize, saturation, hue, seed_al):

    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   

    gegl_graph_string="lb:clouds cloudsize=%f saturation=%f hue=%f seed=%s " % (cloudsize, saturation, hue, seed)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_clouds",
    "GEGL to Python. Works on the active layer",
    "Clouds GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-clouds...",             #Menu path
    "*",
    [
    (PF_FLOAT, "cloudsize","Cloud Size (default:4.0, 0.05 4.14):", 4.0),
    (PF_FLOAT, "saturation","Saturation (default:0.6, 0.6 1.0):", 0.6),
    (PF_FLOAT, "hue","Hue Rotation (default:0, -180 180):", 0),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),


    ],
    [],
    gegl_clouds)

#-------------------------------------Double Glow-----------------------------------------------------

def gegl_double_glow (image, layer, photocopy, photocopy2, photocopy3, photocopy4, color, gaussian1, glow1, color2, gaussian2, glow2, glow2radius, blurall):

    color_special=rgb_to_hex(color)
    color2_special=rgb_to_hex(color2)


    gegl_graph_string="lb:doubleglow photocopy=%f photocopy2=%f photocopy3=%f photocopy4=%f color=%s gaussian=%f opacity=%f color2=%s radius=%f opacity2=%f grow-radius=%f gaussian3=%f " % (photocopy, photocopy2, photocopy3, photocopy4, color_special, gaussian1, glow1, color2_special, gaussian2, glow2, glow2radius, blurall)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_double_glow",
    "GEGL to Python. Works on the active layer",
    "Double Glow GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-doubleglow...",             #Menu path
    "*",
    [
    (PF_FLOAT, "photocopy","Internal Photocopy (default:5, 3 50):", 5),
    (PF_FLOAT, "photocopy2","Internal Photocopy 2 (default:1, 0.5 1):", 1),
    (PF_FLOAT, "photocopy3","Internal Photocopy 3 (default:1, 0.5 1):", 1),
    (PF_FLOAT, "photocopy4","Internal Photocopy 4 (default:0.99, 0.6 1):", 0.99),
    (PF_COLOR,   "color",         "Color:", (248, 0, 75)),
    (PF_FLOAT, "gaussian1","Blur Glow 1 (default:24, 0 50):", 24),
    (PF_FLOAT, "glow1","Hyper Opacity Glow 1 (default:2.5, 0 4):", 2.5),
    (PF_COLOR,   "color2",         "Color:", (252, 117, 47)),
    (PF_FLOAT, "gaussian2","Blur Glow 2 (default:1, 0 40):", 1),
    (PF_FLOAT, "glow2","Hyper Opacity Glow 2 (default:1.2, 0 2.0):", 1.2),
    (PF_FLOAT, "glow2radius","Radius of Glow 2 (default:1, -1 50):", 1),
    (PF_FLOAT, "blurall","Blur all (default:10, 0 60):", 10),

    ],
    [],
    gegl_double_glow)

#-------------------------------------Edge Extract-----------------------------------------------------

def gegl_edge_extract (image, layer, edgeamount, threshold, gaus, color):

    color_special=rgb_to_hex(color)

    gegl_graph_string="gegl:edge-extract edgeamount=%f threshold=%f gaus=%f value=%s  " % (edgeamount, threshold, gaus, color_special)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_edge_extract",
    "GEGL to Python. Works on the active layer",
    "Edge Extract GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-edge-extract...",             #Menu path
    "*",
    [
    (PF_FLOAT, "edgeamount","Edge Amount (default:10, 3 16):", 10),
    (PF_FLOAT, "threshold","Threshold (default:0.76, -0.25 0.90):", 0.76),
    (PF_FLOAT, "gaus","Blur (default:1, 0.5 20.0):", 1),
    (PF_COLOR,   "color",         "Color:", (255, 255, 255)),

    ],
    [],
    gegl_edge_extract)

#-------------------------------------Electricity-----------------------------------------------------

def gegl_electricity (image, layer, tile_size, tile_saturation, seed_al, transparency_threshold, oil, iterations, opacity, blur, col):

    zegl=rgb_to_hex(col)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   

    gegl_graph_string="lb:electricity tile-size=%f tile-saturation=%f seed=%s transparency-threshold=%f oil=%f iterations=%f opacity=%f blur=%f col=%s  " % (tile_size, tile_saturation, seed, transparency_threshold, oil, iterations, opacity, blur, zegl)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_electricity",
    "GEGL to Python. Works on the active layer",
    "Electricity GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-electricity...",             #Menu path
    "*",
    [
    (PF_FLOAT, "tile_size","Internal Cubism Size (default:19, 6.0 35.0):", 19),
    (PF_FLOAT, "tile_saturation","Internal Cubism Spacing (default:4.0, 2 9.0):", 4.0),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "transparency_threshold","Reduce electricity effect (default:0.064, 0.020 0.600):", 0.064),
    (PF_FLOAT, "oil","Internal Oilify to enhance electric effect (default:14, 8 30):", 14),
    (PF_FLOAT, "iterations","Internal Mean Curvature (default:20, 8 30):", 20),
    (PF_FLOAT, "opacity","Hyper Opacity (default:1.0, 1.0 2.0):", 1.0),
    (PF_FLOAT, "blur","Blur Rough Edges (default:1, 0 1):", 1),
    (PF_COLOR,   "col",         "Color:", (255, 255, 255)),

    ],
    [],
    gegl_electricity)

#-------------------------------------Fog-----------------------------------------------------


def gegl_fog (image, layer, turbulence, seed_al, transparency, gaus, value, opacity, width, height):


    zegl=rgb_to_hex(value)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   

    gegl_graph_string="lb:fog turbulence=%f seed=%s transparency=%f gaus=%f value=%s opacity=%f width=%f height=%f " % (turbulence, seed, transparency, gaus, zegl, opacity, width, height)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_fog",
    "GEGL to Python. Works on the active layer",
    "Fog GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-fog...",             #Menu path
    "*",
    [
    (PF_FLOAT, "turbulence","Turbulence of Fog (default:1.0, 0.0 26.0):", 1.0),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "transparency","Isolate Fog patches (default:0.1, 0.0 0.5):", 0.1),
    (PF_FLOAT, "gaus","blur (default:0.0, 0.0 1.0):", 0.0),
    (PF_COLOR,   "col",         "Color:", (65535, 0, 0)),
    (PF_FLOAT, "opacity","opacity (default:1.0, 0.6 1.5):", 1.0),
    (PF_FLOAT, "width","width (default:1024, 0 4096):", 1024),
    (PF_FLOAT, "height","height (default:786, 0 4096):", 768),


    ],
    [],
    gegl_fog)

#-------------------------------------Grains of Sand-----------------------------------------------------



def gegl_grains_of_sand (image, layer, lightness, value, amountx, amounty, seed_al, tilesize,  amountx2, amounty2, seed_al2, tilesize2,  value2):


    zegl=rgb_to_hex(value)
    zegl2=rgb_to_hex(value2)
    if seed_al==0:
        seed=0
    if seed_al==1:
        seed=random.randrange(0,4294967296)   
    if seed_al2==0:
        seed2=0
    if seed_al2==1:
        seed2=random.randrange(0,4294967296)   

    gegl_graph_string="lb:sand-text lightness=%f value=%s amount-x=%f amount-y=%f seed=%s tilesize=%f amount-x2=%f amount-y2=%f seed2=%s tilesize2=%f  value2=%s   " % (lightness, zegl, amountx, amounty, seed, tilesize, amountx2, amounty2, seed2, tilesize2,  zegl2)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_grains_of_sand",
    "GEGL to Python. Works on the active layer",
    "Grains of Sand GEGL Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-grains_of_sand...",             #Menu path
    "*",
    [
    (PF_FLOAT, "lightness","Lightness (default:0.0, 0.0 15.0):", 0.0),
    (PF_COLOR,   "value",         "Color:", (255, 255, 255)),
    (PF_FLOAT, "amountx","Amount X (default:20, 15 60):", 20),
    (PF_FLOAT, "amounty","Amount Y (default:20, 15 60):", 20),
    (PF_OPTION,  "seed_al", "Seed:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "tilesize","Tile Size (default:1.7, 1.5 2):", 1.7),
    (PF_FLOAT, "amountx2","Amount X2 (default:180, 100 512):", 180),
    (PF_FLOAT, "amounty2","Amount Y2 (default:150, 100 512):", 150),
    (PF_OPTION,  "seed_al2", "Seed2:", 0, ["Seed=0","Random seed"]),
    (PF_FLOAT, "tilesize2","Tile Size (default:1.7, 1.5 2.0):", 1.7),
    (PF_COLOR,   "value2",         "Color:", (255, 255, 255))


    ],
    [],
    gegl_grains_of_sand)

#-------------------------------------Inner Glow-----------------------------------------------------

def gegl_inner_glow(image, layer, mode,  x, y, radius, growradius, opacity, fixoutline, value2):


    if mode==0:
        modex= "default"
    if mode==1:
        modex= "invert"

    zegl=rgb_to_hex(value2)

    gegl_graph_string="lb:innerglow mode=%s  x=%f y=%f radius=%f grow-radius=%f opacity=%f fixoutline=%d value2=%s" % (modex, x, y, radius, growradius, opacity, fixoutline, zegl)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)





register(
    "python_fu_gegl_inner_glow",
    "GEGL to Python. Works on the active layer",
    "Inner Glow GEGL Text Styling and Outlining Effect Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-inner_glow...",             #Menu path
    "*",
    [
    (PF_OPTION,  "modex", "Mode of Inner Glow", 0, ["default","invert"]),
    (PF_FLOAT, "x","Amount X (default:0, -20 20):", 0),
    (PF_FLOAT, "y","Amount Y (default:0, -20 20):", 0),
    (PF_FLOAT, "radius","Blur Radius (default:9.0, 0.0 60.0):", 9.0),
    (PF_FLOAT, "growradius","Grow Radius (default:4, 1 40):", 4),
    (PF_FLOAT, "opacity","opacity (default:1.2, 0.0 2.0):", 1.2),
    (PF_SPINNER, "fixoutline","Median to cover hard to reach pixels (default:60, 50 100):", 60, (50, 100, 60)),
    (PF_COLOR,   "value2",         "Color:", (255, 255, 255))

    ],
    [],
    gegl_inner_glow)

#-------------------------------------Long Shadow PD (Extrusion 2)-----------------------------------------------------


def gegl_long_shadow_pd(image, layer, angle, length, lengthblur, ls2, chroma, lightness, eob):


    if eob==0:
        eobx= "standalone"
    if eob==1:
        eobx= "behind"

    gegl_graph_string="gegl:long-shadow-pd angle=%f length=%f lengthblur=%f ls2=%s chroma=%f lightness=%f extract-or-behind=%s " % (angle, length, lengthblur, ls2, chroma, lightness, eobx)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_long_shadow_pd",
    "GEGL to Python. Works on the active layer",
    "Long Shadow PD Extrusion Text Styling Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-long-shadow-pd-extrusion...",             #Menu path
    "*",
    [
    (PF_FLOAT, "angle","Angle (default:0, -180 180):", 0),
    (PF_FLOAT, "length","Length (default:40, 0 55):", 40),
    (PF_FLOAT, "lengthblur","Length Blur (LS2 only) (default:100, 95 200):", 100),
    (PF_TOGGLE,  "ls2",     "Enable Fading Long Shadow",   False),
    (PF_FLOAT, "chroma","Chroma (default:0, 0 30):", 0),
    (PF_FLOAT, "lightness","Lightness (default:0, -30 30):", 0),
    (PF_OPTION,  "eob", "Isolate extrusion or behind blend it", 1, ["Extract","Behind"]),

    ],
    [],
    gegl_long_shadow_pd)

#-------------------------------------Neon_Border-----------------------------------------------------

def gegl_neon_border(image, layer, blurstroke, blurstroke2, stroke, stroke2, opacity, opacity2,  gaus, gaus2, opacityglow, colorneon, colorneontwo, colorblur):

    zegl=rgb_to_hex(colorneon)
    zegl2=rgb_to_hex(colorneontwo)
    zegl3=rgb_to_hex(colorblur)


    gegl_graph_string="lb:neon-border  blurstroke=%f blurstroke2=%f stroke=%f stroke2=%f opacity=%f opacity2=%f gaus=%f gaus2=%f opacityglow=%f colorneon=%s colorneon2=%s colorblur=%s " % (blurstroke, blurstroke2, stroke, stroke2, opacity, opacity2, gaus, gaus2, opacityglow, zegl, zegl2, zegl3)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)

register(
    "python_fu_gegl_neon_border",
    "GEGL to Python. Works on the active layer",
    "Neon Border Text Styling Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-neon-border...",             #Menu path
    "*",
    [
    (PF_FLOAT, "blurstroke","Blur Radius 1 (default:2.2, 0.0 14.0):", 2.2),
    (PF_FLOAT, "blurstroke2","Blur Radius 2 (default:2.2, 0.0 14.0):", 4.3),
    (PF_FLOAT, "stroke","Grow Radius 1 (default:9.0, 0 50.0):", 9.0),
    (PF_FLOAT, "stroke2","Grow Radius 2 (default:2.1, 0.0 12.0):", 2.1),
    (PF_FLOAT, "opacity","Outline Opacity 1 (default:1.2, 0.0 1.3):", 1.2),
    (PF_FLOAT, "opacity2","Outline Opacity 2 (default:1.2, 0.0 1.3):", 1.2),
    (PF_FLOAT, "gaus","Behind Glow Horizontal Range (default:10, 0 100):", 10),
    (PF_FLOAT, "gaus2","Behind Glow Vertical Range  (default:10, 0 100):", 65),
    (PF_FLOAT, "opacityglow","Opacity of behind glow (default:0.40, 0.0 1.0):", 0.40),
    (PF_COLOR,   "colorneon",         "Color:", (255, 255, 255)),
    (PF_COLOR,   "colorneontwo",         "Color 2:", (0, 255, 5)),
    (PF_COLOR,   "colorblur",         "Color of Behind Glow:", (78, 239, 161)),

    ],
    [],
    gegl_neon_border)

#-------------------------------------Pencil-----------------------------------------------------

def gegl_pencil(image, layer, gaus, dt, dg1, dg2, low, high):

    gegl_graph_string="lb:pencil gaus=%f dt=%f dg1=%f dg2=%f low=%f high=%f " % (gaus, dt, dg1, dg2, low, high)
    pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)


register(
    "python_fu_gegl_pencil",
    "GEGL to Python. Works on the active layer",
    "Pencil Plugin In Python",
    "Auto Author",
    "Auto Author",
    "Auto Generated Dated",
    "<Image>/GEGL as Python/Third_Party_GEGL_Plugins/gegl-pencil...",             #Menu path
    "*",
    [
    (PF_FLOAT, "gaus","Blur (default:2.0, 0.0 2.5):", 2.0),
    (PF_FLOAT, "dt","Smoothness (default:1, 1 5):", 1),
    (PF_FLOAT, "dg1","Internal Difference of Gaussian 1 (default:0.4, 0.4 1.0):", 1.0),
    (PF_FLOAT, "dg2","Internal Difference of Gaussian 2 (default:0.4, 0.0 1.0):", 0.3),
    (PF_FLOAT, "low","Output Low Levels (default:0.004, 0.000 0.008):", 0.004),
    (PF_FLOAT, "high","Input High Levels (default:0.004, 0.004 0.010):", 0.009),

    ],
    [],
    gegl_pencil)


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sat Nov 25, 2023 11:28 pm  (#91) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
Let me just say the last four plugins I need to port to python are just background design plugins (starfield, star background starburst) and video degradration. All the important plugins have already been ported.

The most useful plugins for scripting IMO will be the text stylers "glossy balloon, sharp bevel, custom bevel, inner glow, long shadow pd, neon border" and align for positioning images anywhere. So they are done. Mission Accomplished. I'll get to the last four when I feel like it.


Update here contains a few parameter error fixes I made. No new plugins were added but metallic had an error I fixed. It works but it had a slider that went way above its limit.
https://github.com/LinuxBeaver/Special_ ... /releases/

This goes in

Windows
C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins

Linux
/home/(USERNAME)/.local/share/gegl-0.4/plug-ins

Linux (Flatpak includes Chromebook)
/home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins



This goes in the normal plugins directory
Attachment:
gegl-python-fu by LinuxBeaver.py.zip [6.91 KiB]
Downloaded 70 times


Last edited by contrast_ on Sat Dec 09, 2023 2:02 am, edited 1 time in total.

Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Thu Dec 07, 2023 10:37 am  (#92) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2252
Location: Poland
@contrast_
Just a thought:
Almost every "c" code contains an additional registration (except GEGL)
Gimp installation procedure
Have you tried adding them?
If successful, you can locate anywhere in the menu and I think without the need for additional registration.

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Dec 08, 2023 7:48 am  (#93) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
MareroQ wrote:
@contrast_
Just a thought:
Almost every "c" code contains an additional registration (except GEGL)
Gimp installation procedure
Have you tried adding them?
If successful, you can locate anywhere in the menu and I think without the need for additional registration.


This is the only way I know how to put filters in Gimp's main menu.
    "description", _("Make retro gaming text"),
    "gimp:menu-path", "<Image>/Filters/Text Styling/",
    "gimp:menu-label", _("Pixel Text..."),


I'm not sure if I fully understand what you mean.


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Sat Dec 23, 2023 2:10 pm  (#94) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
GEGL is now in Pixelitor and a similar rule to python GEGL applies here.

viewtopic.php?f=22&t=3247&p=286097#p286097

Any GEGL Plugin of mine that works in python will also work in Pixelitor and even some that use Gimp only name spaces do work in Pixelitor but Pixelitor will ignore the (gimp:) namespace and not load anything. Where as python will report an error and not run anything.

So for examle my custom bevel plugin works in Pixelitor with the hardlight blend mode that is (gegl:hard-light) but if it is changed to grain merge blend mode (gimp:layer-mode layer-mode=grain-merge) it will just load every operation but grain merge.

I am working on porting even more plugins of mine to python and pixelitor GEGL. Here is an example of a special build of my RING BEVEL plugin that was ported to work without any Gimp namespaces.

Image


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Feb 16, 2024 11:44 am  (#95) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
My Inner Glow plugin had an unreleased update that broke all python to gegl stuff for me. I am going to investigate why this happened. Thank God I didn't release the update.

I find it sad that GEGL plugins I make can effect someone else's plugin.


Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Tue Mar 19, 2024 10:23 am  (#96) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
I updated my special GEGL plugins to work again with modern gegl without connect_from. Now all of these plugins are hidden from Gimp's GUI but do show up in the plugins registry (WHEN USED WITH THE .PY FILE)

https://github.com/LinuxBeaver/Special_ ... command.py

*update to remove layer shadow
Attachment:
python_compatible_plugins_download.zip [1.07 MiB]
Downloaded 8 times


also off topic, it is highly concerning that scripting GEGL in python is far more popular then chaining GEGL nodes the way I do. Python is not capable of chaining GEGL nodes correctly and most of the awesome stuff I do in GEGL is not possible in python or even CMYK Student's Gimp. This is because GEGL depends on nodes and composers that only GEGL Syntax can access.


Last edited by contrast_ on Fri Mar 22, 2024 1:56 am, edited 1 time in total.

Top
 Post subject: Re: GEGL operations exposed to Python-Fu - WIP 72 ops wrapped
PostPosted: Fri Mar 22, 2024 1:26 am  (#97) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1414
The GEGL plugin script-layershadow.dll/so was causing a Gimp fail to start up issue when default layer shadow is present so it was removed.


Layer Shadow is an obscure plugin that I rarely talk about and it does not ship with anything. So there is a low chance anyone was affected by this. However Gimp will not start up until script-layershadow.dll or layershadow.dll is removed. I suggest removing script-layershadow.dll


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts I'll make a filter based on other people's GEGL chain operations

1

No new posts Make a key binding to access third party GEGL Operations faster

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