Hello everyone,
This is my first post here. I am needing help with pdb.plug_in_displace when using
python-fu in OS X. The plugin simply does not appear to be working. The
python plug-in I wrote executes, creates images and drawables, and saves and deletes images in a folder. I can do operations such as flip the image, but I can not seem to displace the image.
There was another person with this issue, as seen in:
http://gimpchat.com/viewtopic.php?f=9&t=18057They solved the issue by rolling back to an older version. I also tried this but it did not seem to help, as I could not get the script to execute in the older version. I don't know why.
Currently, I am running OS X 10.15.3 Catalina. I don't think this matters for GIMP. The OS X GIMP version is 2.10.14. 2.10.18 has not been released yet. I have included a code snippet if you can have a look. "image" is the file that I want to use the filter on, "disp_im" is the displacement map (depth-map image), "amount_x" and "amount_y" are defined as floats. Please help if you have a chance. Thanks!
<snip...>
image = pdb.gimp_file_load(filename,filename)
drawable = pdb.gimp_image_get_active_layer(image)
disp_im = pdb.gimp_file_load(fileD,fileD)
disp_drawable = pdb.gimp_image_get_active_layer(disp_im)
pdb.plug_in_displace(image, drawable, amount_x, amount_y, 1, 1, disp_drawable, disp_drawable, 2)
pdb.gimp_file_save(image, drawable, filename, filename)
pdb.gimp_image_delete(image)
pdb.gimp_image_delete(disp_im)
<...snip>