GIMP - python-fu for pixel art - tileset extractor

Started by froggy77, July 04, 2019, 12:15:46 AM

Previous topic - Next topic
July 04, 2019, 12:15:46 AM Last Edit: July 04, 2019, 09:28:59 AM by froggy77
Hello,

Here is in the attached file a python script to add in GIMP. It is supposed to be useful for pixel artists but also for those who rip game maps.

This one is not a Script-Fu, but a Python-Fu. My first script in Python... :)  This is a beta version, I hope there will be not too many bugs. Please save your work before. Don't hesitate to report bugs.

See attachment file.

What is this kind of script?
It is explained here: https://docs.gimp.org/en/gimp-filters-python-fu.html


Where to copy it?
Unzip the folder before to copy it the right place.There are often two directories. You can find their path in:
"Edit" > "Preferences" > "Folders" > "Plug-Ins"


Some explanations
- It appears in the menu /Filters/pixelart-tileset-extractor of GIMP
- It extracts tiles from a tilemap to build quicker a tileset. This excludes tiles from the existing tileset, if any.

Example:
1 min 20 to extract the tiles from this image of 2560x2048 pixels (this represents 20480 tiles of 16px). Here, there is no existing tileset (so it is the layer's name that appears). If there was a tileset, I should have selected it (in "Tileset:")  and tiles already known would have been excluded from the created tileset ("New tileset").




Thank you. As I said on Discord, don't hesitate to ask if you have questions about the script. There may be things to change, add or improve.

July 06, 2019, 06:41:04 PM #3 Last Edit: July 06, 2019, 07:35:35 PM by wrightmat
I copied the file to my plugins folder, and restarted Gimp, but I don't see anything new in my Filters menu. Is there a step I'm missing?

Ran Gimp in verbose mode, but didn't give much insight. "Unable to run plug-in. Failed to execute child process (No such file or directory)." No line number or routine or anything :(

Nevermind. I was running an old version of Gimp and didn't even realize it until I checked the script comment that said it was tested in 2.10.