Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move Selection by given number of pixels
#5
(08-01-2020, 08:13 PM)Roy Tuesday Wrote: I'm using Gimp to do spritesheets, and I'd love a way to move a selection by a given number of pixels along an axis; E.G. 256px to the right on the x-axis. I can't do this visually, because the layers have transparency, the selections I'm working with don't line up the same way with the guides. The resolution is too high to just spam the arrow keys. I haven't found anything obvious in the documentation or the various tool options in Gimp.

My current workaround is to fill a rectangular selection around the sprite with cyan and line it up visually, but that's really clunky. Surely there's a better way?

The function gimp-item-transform-translate was added in GIMP 2.10. This function takes an ITEM and two FLOATs - x offset and y offset. A simple Script-Fu script with two parameters to specify the offset and then call the above function would be one answer.

If the movement was always the same you could set this as the default values of the parameters. If you if you had a defined set of movements you could code them as drop-down values - either for x and y independently or a single box that gave the x/y offsets.
Reply


Messages In This Thread
RE: Move Selection by given number of pixels - by programmer_ceds - 08-03-2020, 10:08 PM

Forum Jump: