ofnuts wrote:
lylejk wrote:
RobA has a similar script-fu for filling in a pattern; slow but I like the result. Other then a no selection, if you use your python plugin, the perimeter of the selection get's chopped off brushs as all selection fills do. Wondering if you can do this plugin like RobAs; pythons much faster then Script-fu. Below for recent reference.
http://gimpchat.com/viewtopic.php?f=11&t=530The difference is not Python vs Scheme because both scripts spend most of their time in Gimp's bowels. Rob's script could bracket the code in undo-freeze/thaw. At least that's what made mine run a lot faster.
@lylejk - Unfortunately ofnuts is correct in that the main performance hit I get is because of the pixel sampling (as far as I know, sampling a drawable is slow, both in scheme and python). his script should be a little faster as he uses the histogram function to access the percentage covered for the entire image, which my script can'r do as it is varying the density based on the source map rather than being the same density over the entire image.
If you need a fixed density, his is definitely the one to use as it will be faster.
@offnuts - My experimenting with undo freeze/thaw has shown to me it should only be used on a new image, not the user's working image, as it borks u pthe undo history completely. I have made a few other scripts where I create a new image (never displayed) and copy of the desires source layers, freeze the undo stack on that image and process. This really improves performance. In the case of this script, I wanted to have the visible feedback of the script working so the fill appropriateness could be judged easier and the script aborted if necessary, rather than having to wait a (still) long time with the work being done in a hidden image. I should test and see the performance improvement though - it might be worth it.
Ideally, I should just write a C plugin and be done with it.
-Rob A>