On 06/09/2010 21:34, Sven Neumann wrote:
> On Mon, 2010-09-06 at 20:59 +0200, Ofnuts wrote:
>> I'm working on my first Gimp plugin in python, and most things work, but
>> I can't seem to make a bucket-fill into the selection.
>> My code currently does:
>> res=pdb.gimp_edit_bucket_fill_full(drawable,FG_BUCKET_FILL,NORMAL_MODE,0,0,True,False,SELECT_CRITERION_COMPOSITE,0,0)
> You are using opacity=0. The fill does of course not have any effect
> then.
> Are you certain that you actually want to bucket-fill at all? Since you
> are using a selection, it seems likely that you actually want to fill
> that selection. Then you can use layer.fill() instead.

layer.fill() fills the whole layer. But you got me thinking and I found 
gimp_edit_fill(drawable,fill_type) that covers it. So the script works 
now. For the record, it "wraps" a bit map around the selection:


Besides the obvious double rainbow generation, I intend to use it to 
generate complex ridges around arbitrary object shapes for bump-mapping.

Anyone knows if something like this been done before (in other words, am 
I reinventing the wheel)? I couldn't find anything like it in the plugin 

If not, although it works, I'm not too pleased with its performance. 
would it be ok for me to post the code here so that the gurus can lead 
me towards better ways to achieve the same result?

Many thanks for the help so far

Gimp-developer mailing list

Reply via email to