Re: [Gimp-developer] script-fu beginner question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Pimlott (ota-26@xxxxxxxxxxxxxxxxxx) wrote:
> Am I missing something important, or falling afoul of a gimp bug?
> My script is below.  I started the gimp, created a new image, and
> ran my script-fu via the menus.  The resultant image is at
> http://web.pimlott.net/~andrew/tmp/gradient_bug.xcf .
 
[...]
>       (let ((layer (car (gimp-layer-new
>                           image
>                           (car (gimp-image-width image))
>                           (car (gimp-image-height image))
>                           RGBA_IMAGE "new layer" 100 NORMAL))))
>         (gimp-image-add-layer image layer -1)
>         (gimp-blend
>           layer
>           FG-TRANS NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0
>           (+ shadow-left shadow-width) 0
>           shadow-left 0)
>         (cons layer (make-layers (- shadow-left shadow-step))))))

If you create layers from a script they are usually not really
initialized. You have to clear them yourself. If you create
the layers via the UI they get cleared.

> One other question: after my script-fu runs, the layers dialog box
> is not updated, until I go and reselect the image from the
> drop-down.  Is there a way to fix that?

Try calling (gimp-displays-flush) at the end of the script.

Bye,
        Simon

-- 
      Simon.Budig@xxxxxxxxxxx       http://www.home.unix-ag.org/simon/


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux