Gimp-Forum.net
What does a layer's "tattoo" mean? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: What does a layer's "tattoo" mean? (/Thread-What-does-a-layer-s-tattoo-mean)



What does a layer's "tattoo" mean? - ChameleonScales - 02-08-2021

in the python-fu api, there is this "get-layer-by-tattoo" command.
I found no information on the internet about what that "tattoo" is.
Could anyone clarify?

PS: forgot to add this thread inside the "Scripting questions" subcategory. In don't know if I can move it there myself.


RE: What does a layer's "tattoo" mean? - rich2005 - 02-08-2021

maybe check in

https://developer.gimp.org/api/2.0/libgimp/libgimp-gimpitem.html which says

A tattoo is a unique and permanent identifier attached to a item that can be used to uniquely identify a item within an image even between sessions.


RE: What does a layer's "tattoo" mean? - ChameleonScales - 02-08-2021

Thank you!
Glad I asked because it's exactly what I was hoping it would be!
I feel like "id" or "uid" (Unique Identifier) would be a more intuitive name for this. What do you think?
Anyway, at least I know now.


RE: What does a layer's "tattoo" mean? - Ofnuts - 02-08-2021

(02-08-2021, 04:11 PM)ChameleonScales Wrote: Thank you!
Glad I asked because it's exactly what I was hoping it would be!
I feel like "id" or "uid" (Unique Identifier) would be a more intuitive name for this. What do you think?
Anyway, at least I know now.

There are already IDs in Gimp, but they identify items across loaded images (you won't have two layers/channels/items with the same ID, even if you duplicate the image). And uf you load the image the IDs will likely be different.

By contrast, the "tattoo" is not unique in Gimp, it is unique within an image, and is saved with the image, so if the image is loaded again, you reuse the tattoo to retrieve that same item (how the tattoo is transmitted is another matter).


RE: What does a layer's "tattoo" mean? - ChameleonScales - 02-08-2021

I see. Still, I haven't seen tattoo being used for that kind of identifier in other software, though I might be wrong.
for example it could've been iid for image-wide identifier and just id for the other. Anyway, no issue there as long as the names are documented.