You are here

How to do Edit->Fade in script-fu

I'm trying to find out how to do the edit->fade on the last manipulation done in script-fu. I can't find the appropriate function for it. Can someone tell me what it's called? I'm trying to do something like

(plug-in-hsv-noise TRUE theImage inLayer 1 0 0 255)
(gimp-edit-fade DARKEN-ONLY-MODE 85)

but there is no gimp-edit-fade function...

Forums: 

I believe the fade command effectively blends the filtered drawable with the original version that is stored in the undo history. Scripts do not have access to the undo history per se and so you must process your image by creating a copy, filtering the copy, and blending the copy back with the original.

For your example, you would want to do something not entirely unlike:

(set! tmp-layer (car (gimp-layer-copy inLayer TRUE)))
(gimp-image-add-layer theImage tmp-layer -1)
(plug-in-hsv-noise TRUE theImage tmp-layer 1 0 0 255)
(gimp-layer-set-mode tmp-layer DARKEN-ONLY-MODE)
(gimp-layer-set-opacity tmp-layer 85)
(gimp-image-merge-down theImage tmp-layer EXPAND-AS-NECESSARY)

Thanks, I was thinking that it would have to be done like this, just wanted to check if there was some fade function, but I guess not. Manually works fine :)

Subscribe to Comments for "How to do Edit->Fade in script-fu"