Hi Fabio,

>  I'm wondering how do I know which is the reference to the background
>  layer of a image that I've just opened. I think that my error is
>  occurring when I try to pass the drawable references to the
>  gimp-edit-copy/paste functions. I simple passed "0" (I don't know any
>  reference, so I thought that "0" would refer to first layer in the
>  stack), but it's not working...

Register the function like:
    "<Image>/Script-Fu/Selection/Split An Image"
    "description ..."
    "author ...."
    "RGB* GRAY*"
    SF-IMAGE "Image" 0
    SF-DRAWABLE "Drawable" 0
    more parameters ....

and define it as:

(define (script-fu-.... image drawable ... more parameters)

Then you get a reference to the active layer, called drawable ...
You simple pass 'drawable' to all the functions then. Was this 
your problem ?


Reply via email to