Post Reply 

Problems with gimp-edit-bucket-fill

Apr 6, 2012, 00:31
Post: #1
Problems with gimp-edit-bucket-fill
Hello, I'm having trouble using script-fu and getting gimp-edit-bucket-fill to work. I tried using this call in a script, but it had no effect. Figured I was doing something wrong with layers or selection, as is often the case. But when I try it in the console, it has no effect. Here's what I tried:

1. Upgraded to the latest gimp version (2.6.12) on Windows (Vista Pro SP2).
2. Closed gimp and restarted it.
3. File > New... and then use all defaults except under advanced I set the fill to BG (white).
4. Filters > Script-fu > Console and then Browse to find gimp-edit-bucket-fill.
5. Enter the following in the console:

> (gimp-edit-bucket-fill 1 0 0 100 10 TRUE 0 0)

1 is the drawable, found by trial and error
0 for FG-BUCKET-FILL (should be black)
100 opacity
10 threshold (0 should work too, but just in case)
TRUE for sample-merged (shouldn't matter because I don't have layers)
o o as x and y coordinates (shouldn't matter because new image is all white)

But nothing happens, my image is still white. I tried a lot of other combinations, never any fill as I expect. Other script-fu console commands modify the image, but not this one. The bucket fill tool in the UI works using the mouse as normal. What am I missing?
Find all posts by this user
Quote this message in a reply
Apr 6, 2012, 17:35
Post: #2
RE: Problems with gimp-edit-bucket-fill
You're right, I was getting the wrong drawable. I was just using the first one that didn't give me an error, given that my new image has only [Base Image]. But

> (gimp-image-get-active-drawable 1) ; where 1 is the image, found by trial and error :-)

And then

> (gimp-edit-bucket-fill 2 0 0 100 10 FALSE 1 1)

does work as expected. I swear I'd used gimp-image-get-active-drawable in other attempts, and had the right drawable, but I guess not. In any case, debugging with the script-fu console would be easier if it had built-ins for curImage and curDrawable like a script.

And now I found why the bucket fill wouldn't work in a script: before editing my script (MyBorder.scm), I saved it as MyBorderOriginal.scm. But since it was still in the script folder with .scm extension, gimp was loading both files and the original was overwriting my new one. DOH!

In any case, thanks for your help ofnuts, after 2 days of trying various things, it showed me the right path.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  having trouble doing multiple cuts on gimp gloege 1 17 Today 11:47
Last Post: paynekj
  UFRAW and Gimp 2.8 64-bit mlitty 2 2,775 Mar 13, 2018 04:04
Last Post: ythgilb
  PDN Plug-in for GIMP? snoopy55 9 8,862 Jan 29, 2018 08:23
Last Post: jandd661
  Does gimp have optical filter imitations? godek 1 387 Dec 11, 2017 11:40
Last Post: paynekj
  plugin save for web in Gimp 2.9.6 Dkk 1 402 Oct 19, 2017 09:02
Last Post: paynekj

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS