Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
automate layer movement
#11
Why don't you use my ofn-tiles script that does everything in one go, without needing to position guides? At worst you have to crop/move your layer image so that the cut area starts in the top left corner of the canvas.
Reply
#12
(02-28-2024, 01:32 AM)Ofnuts Wrote: Why don't you use my ofn-tiles script that does everything in one go, without needing to position guides? At worst you have to crop/move your layer image so that the cut area starts in  the top left corner of the canvas.

I just followed what another user told me!
I try this one too.
What is the required input of this plugin? It cuts square tiles? So how do I know where it cuts those without guides?
Because my input image must be cut at certain positions and those must be correct or it destroys things...
Reply
#13
(02-27-2024, 05:19 PM)gimpygirl Wrote: Thanks a lot!
I think a new hobby has started! Heart
  •  Are there website that provide free scripts/plugins for GIMP (like a collection of scripts people made and share)? Or does this not exist?

Try this one to get you started with python scripting for GIMP 2.10:
https://www.youtube.com/watch?v=cPQRxZo9...LV08wxdnWt-

It's a series of 8 well explained videos to get the basics.
Reply
#14
(02-28-2024, 05:33 AM)gimpygirl Wrote:
(02-28-2024, 01:32 AM)Ofnuts Wrote: Why don't you use my ofn-tiles script that does everything in one go, without needing to position guides? At worst you have to crop/move your layer image so that the cut area starts in  the top left corner of the canvas.

I just followed what another user told me!
I try this one too.
What is the required input of this plugin? It cuts square tiles? So how do I know where it cuts those without guides?
Because my input image must be cut at certain positions and those must be correct or it destroys things...

It works from either the tile size (height/width) or the number of tiles (rows/columns).

But it assumes you want to start at (0,0) so you first have to crop the image to the exact part that will be split.
Reply
#15
Thanks! Also working great.
However I have a small request.
When using the default name for the saved tiles: when I go to file explorer the names of the files prevent me from selecting adjacent files quickly that are located next to each other in the source image (because file explorer sorts them by file name and the order in which the tiles were in the source image is lost). I need to copy paste images that were next to each other quickly. See the screenshot: I need to copy paste the tile files a -> z, A -> Z and 0 -> 9 and therefore the file names must be using numbers.
So I want them to have numbers: 0.png, 1.png, 2.png ... and 0 is at the left of 1, and 2 is at the right of 1 (located in the source image).

See example of source image

Next screenshot of file explorer: the written tile files and you can see I can't select adjacent files anymore since they are scattered everywhere because of the file name (they are sorted by file name)

When I use the first screenshot, I get an error (2nd screenshot).

Can you adjust the plugin so I can use numUp0 and the plugin writes 0, 1, 2, ... according to the order in which the tiles are in the source image? From left the right (columns) and top to bottom (rows).
I would be SUPER happy with this!!! Heart Heart Heart


Attached Files Thumbnail(s)
       
Image(s)
       
Reply
#16
Numbering layers is why I used the guillotine plugin. There are several scripts that will rename layers. It is very common for animations. This one is a script-fu and goes in the scripts folder. Registers in Tools menu.

   

Sorry about that since we seem to be on a fonts kick Wink  Zoom in and check the settings used.
Remember to start on the bottom layer 
edit: oops, forgot to add the script.


Attached Files
.zip   rename-layers.zip (Size: 1.86 KB / Downloads: 103)
Reply
#17
(02-28-2024, 07:13 PM)rich2005 Wrote: Numbering layers is why I used the guillotine plugin. There are several scripts that will rename layers. It is very common for animations. This one is a script-fu and goes in the scripts folder. Registers in Tools menu.



Sorry about that since we seem to be on a fonts kick Wink  Zoom in and check the settings used.
Remember to start on the bottom layer 
edit: oops, forgot to add the script.

Hi

Sorry but when using ofn-tiles no layers are made and the files are written directly to disk. So this script I can't use in combination with ofn-tiles

Can I ask where you download all these scripts?
Reply
#18
(02-28-2024, 06:05 PM)gimpygirl Wrote: When I use the first screenshot, I get an error (2nd screenshot).
numUp0 is the index of  a layer in the stack? There are no such layers in ofn-tiles.

(02-28-2024, 06:05 PM)gimpygirl Wrote: Can you adjust the plugin so I can use numUp0 and the plugin writes 0, 1, 2, ... according to the order in which the tiles are in the source image? From left the right (columns) and top to bottom (rows).
I would be SUPER happy with this!!! Heart Heart Heart

In the HTML which is in the ZIP:

   

When I tell you noone reads the docs  Angel
Reply
#19
(02-29-2024, 12:42 AM)Ofnuts Wrote:
(02-28-2024, 06:05 PM)gimpygirl Wrote: When I use the first screenshot, I get an error (2nd screenshot).
numUp0 is the index of  a layer in the stack? There are no such layers in ofn-tiles.

Is there a naming convention for the file names specified by GIMP (like numUp0 , ...) or is each developer just using something there?
Reply
#20
(02-29-2024, 01:09 AM).?gimpygirl Wrote:
(02-29-2024, 12:42 AM)Ofnuts Wrote:
(02-28-2024, 06:05 PM)gimpygirl Wrote: When I use the first screenshot, I get an error (2nd screenshot).
numUp0 is the index of  a layer in the stack? There are no such layers in ofn-tiles.

Is there a naming convention for the file names specified by GIMP (like numUp0 , ...) or is each developer just using something there?

This is just my specially crafted pattern-formatting parameter names. I try to keep them consistent between the scripts, but it's also for me (and allows me to borrow code between scripts).
Reply


Forum Jump: