ofnuts wrote:
Use pdb.gimp_layer_set_offsets(layer, offx, offy) (or layer.set_offset(x,y), if your prefer Python's object notation) to move a layer around. This applies to the top left corner of the layer, relative to the top left corner of the canvas. Positive values are down and to the right. Of course you will have to so some arithmetic to compute the adequate values, but this isn't rocket science.
Thanks. That was just what I was looking for.
Now I've put it where I want it, and anchored it, but there's just one little glitch. After I've done so, the part where the floating selection was anchored displays as transparency in the main view window, although it looks right on the layers view. The newly anchored layer doesn't show up until I click on something. I tried some things in my script, like turning the visibility off or on, selecting everything.... making sure nothing is selected...
How do I get it to refresh the view screen before the script ends, so that everything looks the way it's supposed to before exiting the script?