Counting layers in a group - Printable Version

+- (
+-- Forum: GIMP (
+--- Forum: General questions (
+--- Thread: Counting layers in a group (/Thread-Counting-layers-in-a-group)

Counting layers in a group - Akir - 02-14-2018

Hey people,
Is there a way to easily find out how many layers are contained in a layer group? I'm currently working on some files where I'm sorting my layers (up to some 2000 per file) into groups, and now I want to produce some statistics. I thought of deleting all other groups so the title bar gives me the number that I need, but it's a bit clumsy, and I just know I'm going to click "save" instead of "close" one day soon...


RE: Counting layers in a group - rich2005 - 02-14-2018

I dare say someone will come up with a script that does the job. I had a look around but nothing obvious.

Similar principle to the one you are already using, except drag the layer group into the tool bar (wilbur section) to open as a image.


The new image layers minus one for the quantity.


temporary, now close it Wink

RE: Counting layers in a group - Ofnuts - 02-14-2018

My ofn-dump-layer-hierarchy script will dump the hierarchy as a tree to the error console. You can either use the output to count things outside of Gimp, or modify the script to suit your needs.

RE: Counting layers in a group - Akir - 02-14-2018

That is indeed a lot more elegant than my solution, thanks! I can definitely use that until someone comes up with a script. Smile

edit: synchronized posting - thank you too, Ofnuts!