RSS/Atom feed Twitter
Site is read-only, email is disabled

Gimp 2.4 Script-fu problem

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Gimp 2.4 Script-fu problem John Coppens 03 Jan 00:09
  Gimp 2.4 Script-fu problem Pere Pujal i Carabantes 03 Jan 18:40
   Gimp 2.4 Script-fu problem John Coppens 04 Jan 01:02
  Gimp 2.4 Script-fu problem Sven Neumann 03 Jan 19:55
John Coppens
2008-01-03 00:09:10 UTC (about 17 years ago)

Gimp 2.4 Script-fu problem

Hello people.

I just compiled and installed Gimp 2.4.3, and it seems to be working fine. Except that the two scripts I once made didn't work anymore. I believe I succeeded in correcting the differences for TinyScheme, but in one of the scripts there seems to be a different bahaviour with the layers.

The script is supposed to add a title on a selected place, and worked fine under 2.2.x. Now, the text appears as a new layer, but the color isn't right, the layer seems blocked (cannot select another layer)while it's still floating, the combination mode (addition/subtraction) is not respected and the command in the script to flatten the image is not executed.

No errors appear, but something did go wrong...

I've attached the script, as it is quite short. Is there some text documenting which, if any, changes were made to the procedures in the PDB? Something like the migration page for TinyScheme?

John

Pere Pujal i Carabantes
2008-01-03 18:40:04 UTC (about 17 years ago)

Gimp 2.4 Script-fu problem

On Wed, 2008-01-02 at 21:09 -0200, John Coppens wrote:

The script is supposed to add a title on a selected place, and worked fine under 2.2.x. Now, the text appears as a new layer, but the color isn't right, the layer seems blocked (cannot select another layer)while it's still floating, the combination mode (addition/subtraction) is not respected and the command in the script to flatten the image is not executed.

No errors appear, but something did go wrong...

I guess your problem comes from the commands in the declarations statement of the let*

[SNIP]

(let* ( (width (car (gimp-drawable-width drawable)))

[SNIP]

(text-x (cond ((= just 0) xmargin) ; left ((= just 1) (/ (- width fwidth) 2)) ; middle ((= just 2) (- width xmargin fwidth)) ; right )
)

) ;; closing the declarations here.

(gimp-image-undo-group-start image)

(gimp-context-set-foreground color) (define layer (car (gimp-text-fontname image drawable ;; ^^^^^^ added a define as layer has comed out of declarations. text-x text-y text 0 1 fontsize POINTS fontname) )
)
(gimp-layer-set-mode layer
(cond ((= mode 0) NORMAL-MODE) ((= mode 1) ADDITION-MODE) ((= mode 2) SUBTRACT-MODE) )
)
(gimp-layer-set-opacity layer alpha) (gimp-image-flatten image)

(gimp-image-undo-group-end image) (gimp-displays-flush)
) ;; ) closing the let* here.
)

Sven Neumann
2008-01-03 19:55:09 UTC (about 17 years ago)

Gimp 2.4 Script-fu problem

On Wed, 2008-01-02 at 21:09 -0200, John Coppens wrote:

Hello people.

I just compiled and installed Gimp 2.4.3, and it seems to be working fine. Except that the two scripts I once made didn't work anymore. I believe I succeeded in correcting the differences for TinyScheme, but in one of the scripts there seems to be a different bahaviour with the layers.

Did you follow the advices given in http://gimp.org/docs/script-fu-update.html ?

Sven

John Coppens
2008-01-04 01:02:02 UTC (about 17 years ago)

Gimp 2.4 Script-fu problem

On Thu, 03 Jan 2008 18:40:04 +0100 Pere Pujal i Carabantes wrote:

The script is supposed to add a title on a selected place, and worked fine under 2.2.x. Now, the text appears as a new layer, but the color isn't right, the layer seems blocked (cannot select another layer) while it's still floating, the combination mode (addition/subtraction) is not respected and the command in the script to flatten the image is not executed.

No errors appear, but something did go wrong...

I guess your problem comes from the commands in the declarations statement of the let*

Yes - Thanks Pere! Is there a reference o tutorial for TinyScheme somewhere? I didn't find any docs at the site.

Thanka again, John