Tue Nov 21, 2023 1:05 am
MareroQ wrote:Changes in Ver.2:
- combined into one file gegl-python-fu.py and gegl-graph.py to gegl-python-fu & gegl-graph.py (standalone files: gegl-python-fu.py and gegl-graph.py must be deleted),
- change menu location (You can change it very quickly as you want using Notepad++),
- removed gegl-tile (because it doesn't work), gegl-nop (No operation),
- added: bump-map, component_extract, dropshadow, embos, mosaic, supernova.
- added: "Additional Information"
[ Image ]
A little about bump-map:
- bump-map: https://gegl.org/operations/gegl-bump-map.html
- about GEGL graph by Kevin and Tmanni: https://www.gimp-forum.net/Thread-GEGL- ... 0#pid19960. This was crucial to solving the aux problem - save aux.
- chanche offset: '+' up/right, '-' down/left
- gegl_graph_string + aux does not accept commas (that was problem number 2 but I don't know why at all),
I think that the save method (assuming that the 'd:' drive exists) will allow the conversion of filters from 2 pads: aux2 aux.
Tim wrote about 3 pads - which filter is it?
Edit:
Version 2.0 has been removed due to detected bugs
Reported bugs have been fixed in version 2.1 #55
Tue Nov 21, 2023 4:56 am
MareroQ wrote:I'm looking for a Bump-map tester on Linux (included in version 2.1) - my Ubuntu doesn't work (temporarily?) after updating.
Traceback (most recent call last):
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 741, in response
dialog.res = run_script(params)
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 362, in run_script
return apply(function, params)
File "/home/xxx/.config/GIMP/2.10/plug-ins/gegl-python-fu & gegl_graph.py", line 1865, in gegl_bump_map
pdb.file_png_save(image, save, xchange, xchange, 1, 1, 1, 0, 0, 1, 0, run_mode=RUN_NONINTERACTIVE)
RuntimeError: Datei »/usr/image_1.png« konnte nicht zum Schreiben geöffnet werden: Keine Berechtigung
Tue Nov 21, 2023 5:48 am
Tue Nov 21, 2023 6:49 am
Tue Nov 21, 2023 8:57 am
Could you try with the tmp folder (replace "/usr/image_1.png" twice with "/tmp/image_1.png")
Wed Nov 22, 2023 12:49 am
Wed Nov 22, 2023 11:03 am
#-------------------------------------Beaver-----------------------------------------------------
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",
"Auto Author",
"Auto Author",
"Auto Generated Dated",
"<Image>/GEGL as Python/gegl-glossy-balloon...", #Menu path
"*",
[
(PF_FLOAT, "gaus","gaus (default:6.0, 0.5..20.0):", 6.0),
(PF_FLOAT, "hue","hue (default:0, -180..180.0):", 0),
(PF_FLOAT, "lightness","lightness (default:-7, -15.0..15.0):", -7)
(PF_FLOAT, "opacityall","opacityall (default:0.0, 1.0..5.0):", 3.0)
],
[],
gegl_glossy_balloon)
#---------------------------------------------------------------------------------------------
Wed Nov 22, 2023 1:38 pm
(PF_FLOAT, "lightness","lightness (default:-7, -15.0..15.0):", -7)
Wed Nov 22, 2023 5:24 pm
Wed Nov 22, 2023 5:29 pm
MareroQ wrote:@Beaver.
If you add a comma (missing) after the line:
- Code:
(PF_FLOAT, "lightness","lightness (default:-7, -15.0..15.0):", -7)
everything works (but why without PF_COLOR?)
Wed Nov 22, 2023 8:47 pm
def gegl_custom_bevel(image, layer, opacity,blendmode,azimuth,elevation,depth,size,alphapercentile,gaus,box,mcb):
if type==0:
blendmode= "Hardlight"
if type==1:
blendmode= "Multiply"
if type==2:
blendmode= "ColorDodge"
if type==3:
blendmode= "Plus"
if type==4 :
blendmode= "Darken"
if type==5 :
blendmode= "Lighten"
if type==6:
gegl_graph_string="lb:script-custom-bevel opacity=%f blendmode=%f azimuth=%f elevation=%f depth=%f size=%f alphapercentile=%f gaus=%f box=%f mcb=%f" % (opacity, blendmode, 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",
"Auto Author",
"Auto Author",
"Auto Generated Dated",
"<Image>/GEGL as Python/gegl-glossy-balloon...", #Menu path
"*",
[
(PF_FLOAT, "opacity","opacity (default:1.0, 3.5 10.0):", 3.5),
(PF_OPTION, "blendmode", "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","size (default:1, 0 15):", 1),
(PF_FLOAT, "alphapercentile","alphapercentile (default:68, 0 100):", 68),
(PF_FLOAT, "gaus","gaus (default:2, 0 9):", 2),
(PF_FLOAT, "box","box (default:0, 0 6):", 0),
(PF_FLOAT, "mcb","mcb (default:0, 0 6):", 1),
],
[],
gegl_custom_bevel)
Wed Nov 22, 2023 9:47 pm
def gegl_custom_bevel(image, layer, opacity,blendmode,azimuth,elevation,depth,size,alphapercentile,gaus,box,mcb):
if blendmode==1:
type= "Hardlight"
if blendmode==2:
type= "Multiply"
if blendmode==3:
type= "ColorDodge"
if blendmode==4:
type= "Plus"
if blendmode==5:
type= "Darken"
if blendmode==6:
type= "Lighten"
gegl_graph_string="lb:script-custom-bevel opacity=%f blendmode=%f azimuth=%f elevation=%f depth=%f size=%f alphapercentile=%f gaus=%f box=%f mcb=%f" % (opacity, blendmode, 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",
"Auto Author",
"Auto Author",
"Auto Generated Dated",
"<Image>/GEGL as Python/gegl-custom-bevel...", #Menu path
"*",
[
(PF_FLOAT, "opacity","opacity (default:1.0, 3.5 10.0):", 3.5),
(PF_OPTION, "blendmode", "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","size (default:1, 0 15):", 1),
(PF_FLOAT, "alphapercentile","alphapercentile (default:68, 0 100):", 68),
(PF_FLOAT, "gaus","gaus (default:2, 0 9):", 2),
(PF_FLOAT, "box","box (default:0, 0 6):", 0),
(PF_FLOAT, "mcb","mcb (default:0, 0 6):", 1),
],
[],
gegl_custom_bevel)
Wed Nov 22, 2023 9:49 pm
Wed Nov 22, 2023 9:52 pm
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, type, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb)
pdb.python_fu_gegl_graph(image, layer, gegl_graph_string)
Wed Nov 22, 2023 10:59 pm
Wed Nov 22, 2023 11:06 pm
def gegl_custom_bevel(image, layer, opacity, blend_mode,azimuth,elevation,depth,size,alphapercentile,gaus,box,mcb):
if blend_mode==0:
blendmode= "Hardlight"
if blend_mode==1:
blendmode= "Multiply"
if blend_mode==2:
blendmode= "ColorDodge"
if blend_mode==3:
blendmode= "Plus"
if blend_mode==4:
blendmode= "Darken"
if blend_mode==5:
blendmode= "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",
"Auto Author",
"Auto Author",
"Auto Generated Dated",
"<Image>/GEGL as Python/gegl-custom-bevel...", #Menu path
"*",
[
(PF_FLOAT, "opacity","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","size (default:1, 0 15):", 1),
(PF_FLOAT, "alphapercentile","alphapercentile (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)
Wed Nov 22, 2023 11:20 pm
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, blendmode, azimuth, elevation, depth, size, alphapercentile, gaus, box, mcb)
mystring = "My age is %f and my name is %s" % (10,"Tin")
Wed Nov 22, 2023 11:30 pm
Thu Nov 23, 2023 12:31 am
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",
"Auto Author",
"Auto Author",
"Auto Generated Dated",
"<Image>/GEGL as Python/gegl-custom-bevel...", #Menu path
"*",
[
(PF_FLOAT, "opacity","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","size (default:1, 0 15):", 1),
(PF_FLOAT, "alphapercentile","alphapercentile (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)
Thu Nov 23, 2023 12:37 am