Re: [Gimp-user] gimp_run_procedure() not working



Hi cypher2k12,

On Thu, 05 Jan 2017 22:52:26 +0100
cypher2k12 <forums gimpusers com> wrote:

Hey guys, can somebody please tell me where I am going wrong? I am trying to
use the 'gimp_run_procedure()' function to call the normal map plug-in, but I
can not for the life of me get it to work. It builds without errors. Just
doesn't work in GIMP.

Here is a snippet of the code:

 gint n_return_vals;

  gimp_run_procedure("plug-in-normalmap", &n_return_vals, 
    GIMP_PDB_INT32, 1, 
    GIMP_PDB_IMAGE, param[1].data.d_image, 
    GIMP_PDB_DRAWABLE, param[2].data.d_drawable, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_FLOAT, 0, 

This will likely pass the "0" as an integer instead of a float or double - you
may need to do ((double)0).

Otherwise, see these pages - http://sscce.org/ ;
http://catb.org/~esr/faqs/smart-questions.html ;
https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn.
You may wish to provide the sources for the SSCCE in a public git/etc.
repository or a .zip file or whatever.

Regards,

        Shlomi Fish

    GIMP_PDB_FLOAT, 10, 
    GIMP_PDB_INT32, 0,
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_INT32, 0, 
    GIMP_PDB_FLOAT, 0, 
    GIMP_PDB_DRAWABLE, param[2].data.d_drawable,
    GIMP_PDB_END    
);



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
NSA Factoids - http://www.shlomifish.org/humour/bits/facts/NSA/

E‐mail, web feeds, and doing something productive — choose two.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]