It is currently Sat Jul 06, 2024 8:21 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Unbound variable floating-sel Help!
PostPosted: Thu Apr 23, 2020 2:36 pm  (#1) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
This is a question for any experience script-fu coders. I been having an error on the line (gimp-floating-sel-anchor floating-sel) "eval: unbound variable: floating-sel". :gaah Thank you in advanced.

(define (script-fu-create-heart)
    (let* (
        (img  (car (gimp-image-new 500 500 RGB)))
        (layer (car (gimp-layer-new img 500 500 RGB-IMAGE "Background" 100 LAYER-MODE-NORMAL)))
      (theheart (car (gimp-layer-new img 500 500 RGB "Heart" 100 LAYER-MODE-NORMAL)))
      
      
      )


      ;Create the Background
        (gimp-image-undo-disable img)              ; Disable undo during the image creation
        (gimp-image-insert-layer img layer 0 0)
      (gimp-context-set-foreground '(000 000 00))
      (gimp-drawable-fill layer FILL-FOREGROUND)
      
      ;Create the heart layer
      (gimp-image-add-layer img theheart -1)
      (gimp-layer-add-alpha theheart)
      (gimp-drawable-fill theheart FILL-TRANSPARENT)
      
      ;Create the heart image
      (gimp-image-select-ellipse img  2 60 105 385 285)
      (gimp-image-select-rectangle img  1  30  50  440  200)
      (gimp-image-select-ellipse img  0 58 143 385  215)
      (gimp-context-set-foreground '(221 0 0))
      (gimp-drawable-edit-fill theheart FILL-FOREGROUND)
      (gimp-item-transform-rotate theheart  45.00  TRUE   250.50  268.00)
      (gimp-floating-sel-anchor floating-sel)
      
      
      
      
      
      
      

_________________
https://www.deviantart.com/pocholo17
Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Unbound variable floating-sel Help!
PostPosted: Thu Apr 23, 2020 3:06 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 05, 2020
Posts: 41
Hello, :)

I suppose "floating-sel" was in the copy/paste from console.

Replace "floating-sel" by the name of layer you are using in this part of script... probably "theheart".

I'm not sure the procedure used is useful.
What do you want exactly at this moment of script ?

Have fun. :)
@+++

_________________


Top
 Post subject: Re: Unbound variable floating-sel Help!
PostPosted: Thu Apr 23, 2020 3:32 pm  (#3) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
There is a floating selection created by the "Rotate tool" (gimp-item-transform-rotate theheart 45.00 TRUE 250.50 268.00) and I want to anchor or set the floating selection.

_________________
https://www.deviantart.com/pocholo17
Image


Top
 Post subject: Re: Unbound variable floating-sel Help!
PostPosted: Thu Apr 23, 2020 3:48 pm  (#4) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Pocholo wrote:
There is a floating selection created by the "Rotate tool" (gimp-item-transform-rotate theheart 45.00 TRUE 250.50 268.00) and I want to anchor or set the floating selection.


I know the saying "You cannot teach new tricks to an old horse" Thank you for your explanation JimmyMarco. I took a second look and I found what I did wrong. When I created a "selection" on the image and I filled the selection, I forgot to "Select> None". Somehow when I rotated the image without getting rid of the selection, it created a floating selection that I could not got rid off. I manage to do (gimp-selection-none img) and then rotate the image and that worked.

_________________
https://www.deviantart.com/pocholo17
Image


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Error: eval: unbound variable: WHITE-IMAGE-FILL

4

No new posts Floating Island Citadel (RAP)

0

No new posts Attachment(s) Floating layer problem

4



* Login  



Powered by phpBB3 © phpBB Group