script-fu - paste a layer in an alpha mask

497 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

Finally found the Procedures:

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