GIMP Chat
http://gimpchat.com/

Help with pdb.plug_in_displace when using python-fu in OS X
http://gimpchat.com/viewtopic.php?f=9&t=18245
Page 1 of 1

Author:  III-V [ Thu Jul 09, 2020 12:43 pm ]
Post subject:  Help with pdb.plug_in_displace when using python-fu in OS X

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=18057

They 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>

Author:  Pocholo [ Thu Jul 09, 2020 1:46 pm ]
Post subject:  Re: Help with pdb.plug_in_displace when using python-fu in OS X

Hi III-V. You won't get any result because the Displace used in the newer version of GIMP is a GELG version and the old Displace plugin won't appear in this new version. So you're stuck with the rest of us until the developers add all the GELG to the GIMP
"Procedure Browser". You might find another 3rd party script and call it out with your script, but then again, users may have or not that added script. Stick around to see if somebody else have a solution or have the old "Displace" plugin.

P.s. Try to upload the whole script so other coders may have a chance to tested.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/