Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn3-layer-tiles
#1
First shot at the Gimp3 conversion of ofn-layer-tiles

Some difference with the Gimpv2 version (most notably works with multi-selected layers) so make sure you read the doc.

See here.

Enjoy.
Reply
#2
Hi, tried using the ofn3-layer-tiles plugin yesterday and ran into issues with the tool.

After selecting the tool and entering the relevant config data (2 columns, 2 rows, keep in place, ...) I am getting an error message:
   

Traceback:
Quote:Traceback (most recent call last):
  File "/home/#######/system/gimp_plugins/ofn3-layer-tiles/gimphelpers.py", line 111, in wrapped
    result=implementation(procedure, run_mode, image, drawables, config, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/#######/system/gimp_plugins/ofn3-layer-tiles/ofn3-layer-tiles.py", line 209, in layerToTilesRC
    layerToTiles(image,layer,pattern,tilesDataRC(layer,rows,columns),rowsFirst,disposition)
  File "/home/#######/system/gimp_plugins/ofn3-layer-tiles/ofn3-layer-tiles.py", line 187, in layerToTiles
    image.insert_layer(tile, layer.get_parent(),layer.get_position())
                                                ^^^^^^^^^^^^^^^^^^
AttributeError: 'Layer' object has no attribute 'get_position'. Did you mean: 'get_lock_position'?



gimp: 3.0.2
operating system: Linux Mint 21.3

In case I can add other information, don't hesitate to ask
Reply
#3
Any work arounds or fixes? Is this an issue of GIMP?
Reply
#4
Bug already reported... and fixed a month ago, but I forgot to upload the fix.

Please download and try again.
Reply
#5
Thank you very much and thank you for your work done.
Reply
#6
One question as I'm encountering this right now:

Opening an image named 20250506_082148.jpg results in a layer named 20250506_082148.jpg.

   

Using the tool to split this image into a 2x2 tile image results in the following layer names:
- 20250506_082148.jpg-00-00
- 20250506_082148.jpg-00-01
- 20250506_082148.jpg-01-00
- 20250506_082148.jpg-01-01

   
   

Somehow the file extension is part of the layer name and this makes it difficult to export the layers.
This worked fine before, I'm not sure when the change regarding layer naming was introduced by gimp (I assume something changed there)

Unfortunately I can't downgrade gimp right now to check if this was different before.
Reply
#7
I wrote this LayerNamer plug-in which will fix the problem in a jiffy. You can follow this link to GimpChat:
LayerNamer
Reply
#8
(05-08-2025, 10:17 AM)gasMask Wrote: I wrote this LayerNamer plug-in which will fix the problem in a jiffy. You can follow this link to GimpChat:
LayerNamer

Thank you for your answer, I also can do this using batcher and rename layers.
Reply
#9
Updated the script, the format pattern now also accepts {layerRoot} and {layerExt} specifiers.
Reply


Forum Jump: