12-16-2020, 11:32 AM
(12-16-2020, 07:30 AM)Ofnuts Wrote: Strange. Python seems utterly confused. Can you:Okay, here it is according to your instructions:
1) Close Gimp, and restart it
2) Image>New
3) Add a couple of brushstrokes on the Backrgound layer
4) Start the Python console (Filters>Python-Fu>Console)
5) Copy/paste this code in the console (line by line)
Code:
image=gimp.image_list()[0]
layer=image.active_layer
pdb.gimp_drawable_desaturate(layer,DESATURATE_LUMINANCE)
pdb.plug_in_gauss_rle2(image,layer,0.,0.)
mask=pdb.gimp_channel_new_from_component(image, CHANNEL_GRAY,'Engraving Mask')
image.add_channel(mask)
And if there is an error on a line, report the line?
Btw what exact version of Gimp are you running?
Code:
GIMP 2.10.21 Python Console
Python 2.7.18 (default, Apr 20 2020, 16:57:11) [GCC 9.3.0 64 bit (AMD64)]
➤> image=gimp.image_list()[0]
➤> layer=image.active_layer
➤> pdb.gimp_drawable_desaturate(layer,DESATURATE_LUMINANCE)
➤> pdb.plug_in_gauss_rle2(image,layer,0.,0.)
Traceback (most recent call last):
File "<input>", line 1, in <module>
RuntimeError: calling error
➤> mask=pdb.gimp_channel_new_from_component(image, CHANNEL_GRAY,'Engraving Mask')
➤> image.add_channel(mask)
➤>
error:
Traceback (most recent call last):
File "<input>", line 1, in <module>
RuntimeError: calling error