Here's a newbie question about non-interactive plug-in calls:
I'm writing a (C) plug-in in which I intend to call another plug-in
non-interactively prior to doing my own processing. I copy the active
layer, and since the images I'm dealing with all have an alpha channel I
make sure I'm dealing with the image background (rather than the alpha
mask); I then grab the drawable and image IDs from the scratch layer,
and then call a plug-in non-interactively.
I know my drawable is good, as I've succeeded in doing all the desired
processing after the plug-in call. In every plug-in that I've tried,
though, GIMP_PDB_EXECUTION_ERROR is returned from the plug-in call (I've
checked the plug-ins against the image to make sure that they work on
the image before I try
the call).
Here's the skeleton of my code around the non-interactive call:
activeLayer = gimp_image_get_active_layer(image);
workingLayer = gimp_layer_copy(activeLayer);
add_OK = gimp_image_add_layer(image, workingLayer, -1);
if((gimp_layer_get_edit_mask(workingLayer)))
setMaskOK = gimp_layer_set_edig_mask(workingLayer, 0);
bg_drawable = gimp_drawable_get(workingLayer);
imageID = gimp_drawable_image(bg_drawable-id);
// Call the desired plug-in -- returns GIMP_PDB_EXECUTION_ERROR
return_vals = gimp_run_procedure(plug-in-c-astretch,
nreturn_vals,
GIMP_PDB_INT32,
GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, imageID,
GIMP_PDB_DRAWABLE,
bg_drawable-id,
GIMP_PDB_END);
Any insight you'd be able to lend on this problem would be greatly
appreciated!
Thanks,
Cindy Huyser
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer