Search code examples
gimpscript-fu

script-fu - paste a layer in an alpha mask


I'm looking for a procedure to make the same thing I usually do manually in Gimp:

  • Copy a layer
  • Select alpha mask of another layer
  • Paste

I've already made great researches in the Procedure Browser but I couldn't find anything.


Solution

  • Finally found the Procedures:

    (gimp-edit-copy layer)                                                                
    (define floating-sel (car (gimp-edit-paste mask TRUE)))                                    
    (gimp-floating-sel-anchor floating-sel)