Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does a layer's "tattoo" mean?
#1
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.
Reply
#2
maybe check in

https://developer.gimp.org/api/2.0/libgi...pitem.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.
Reply
#3
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.
Reply
#4
(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).
Reply
#5
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.
Reply


Forum Jump: