Ciao a tutti,
come da oggetto, mi servirebbe modificare uno script.
Lo script è "fluttering.scm" che potete vedere a questo indirizzo:
http://pudemo.altervista.org/Parcheggio ... g_flag.scm
Esso genera una animazione tipo "sventolio di bandiera" di cui avrei bisogno, ma a partire da una immagine che è, non una bandiera ma, una striscia con delle scritte.
Il problema è che, lo script mi genera sul lato sinistro l'asta della bandiera, cosa che io non vorrei.
Vorrei che mi generasse il movimento ma senza aggiungere l'asta.
Quali potrebbero essere le istruzioni da inibire nello script, per ottenere questo risultato?
Spero che possiate aiutarmi, comunque grazie in anticipo.
Modifica di uno script
Re: Modifica di uno script
Premetto che non conosco benissimo il linguaggio degli script-fu, però ad occhio vedo alla riga 127:
E alla riga 242:
Tra l'altro pare che ci sia un parametro per regolare lo spessore dell'asta:
Potresti anche provare a mettere quello a 0 e magari ti risolve già il problema.
Codice: Seleziona tutto
;---draw the mast layer---
(define mastlayer (car (gimp-layer-new image width height 1 "mast" 100 0)))
(gimp-layer-add-alpha mastlayer)
(gimp-drawable-fill mastlayer 3)
(gimp-image-add-layer image mastlayer 0)
(gimp-context-set-foreground mastcolorl)
(gimp-context-set-background mastcolorr)
(define (gen-mast-array borderx bordery width height mastlef mastrig)
(let*
((mastarray (cons-array 10 'double)))
(aset mastarray 0 mastlef)
(aset mastarray 1 (* bordery 0.5))
(aset mastarray 2 mastrig)
(aset mastarray 3 (* bordery 0.5))
(aset mastarray 4 mastrig)
(aset mastarray 5 height)
(aset mastarray 6 mastlef)
(aset mastarray 7 height )
(aset mastarray 8 mastlef)
(aset mastarray 9 (* bordery 0.5))
mastarray
)
)
(define mastsel (gen-mast-array borderx bordery width height mastlef mastrig))
(gimp-free-select image
10
mastsel
CHANNEL-OP-REPLACE
0
0
0.0)
(if (>= mthickness 10)
(gimp-edit-blend
mastlayer FG-BG-RGB-MODE NORMAL-MODE GRADIENT-LINEAR
100 0 REPEAT-NONE FALSE FALSE
0 0 FALSE
mastlef (/ height 2) mastrig (/ height 2)
)
)
(gimp-selection-none image)
Codice: Seleziona tutto
;---add the mast---
(define mastcopy (car (gimp-layer-copy mastlayer 1)))
(gimp-image-add-layer image mastcopy -1)
(gimp-image-merge-down image mastcopy 1)
(set! layerindex (+ layerindex 1))
)
Codice: Seleziona tutto
SF-ADJUSTMENT "Thickness of the mast" '(60 5 100 1 10 0 1)