Created attachment 119555 [details] Illustrated wish I'd be fantastic if layers could be tagged (similar to the tags on brushes). This way we could allow for plugins to act (i.e. do stuff) on specific layers with specific tags assigned to them. Tags should be user-facing (maybe via the "Layer Properties" dialog) - giving both users and plugins the opportunity to assign, read and delete tags). My specific use-case would be to be able to assign, via tags, what layers should be switched between visible/invisible when I click a button in my plugin. E.g. "All layers with tag: 'alien' should be hidden when I click this button" This will enable artists to work more efficient on objects that overlap. I've tried to illustrate in the attachment. I'd really like a plugin to be able to identify all layers with "{alien}" in the name and for example switch it's visibility or turn an effect on/off etc. I hope this could be done without contaminating the layer names. (also see my suggestion in https://bugs.kde.org/show_bug.cgi?id=406763 regarding layer name contamination)
Right now the closest thing you can do to tagging is add a color to a specific layer. You could select and filter a layer by color which would give you a similar, though a bit ambiguous, result to work from. Does working with scripting layer colors work? We probably need to make sure that works first before we would add an additional layer of tagging with words
I believe it does work with using colors. But in the versions I've tried scripting from (4.0 - 4.1.x) There's a few shortcomings of using colors for "tags": 1. They mess with layer organisation (I currently use colors for fast recognizing/pin pointing/navigation or as an indicator of special export) 2. No use or hard to use if you're colorblind (if I understand color blindness correctly) 3. Limited pallette == limited "tags" (can I choose my own colors + add them?) 4. Words make more sense to humans as categories, I believe 5. The colors could change values for some reason between versions - rendering previous color "tags" unusable So yes, layer colors could be used - but has some drawbacks as I see it. Also if special syntax in the layer names become popular we could end up with some plugins that dictates how you name your layers etc. so also preventing bad habits.
alright. I guess we can leave this as a wishlist if a developer wants to pick this up.
I've made a user land plugin to simulate the behaviour via search strings in layer names: https://github.com/Larpon/krita-bulk-actions
I recall larpon saying he was also okay with getting access to the unique IDs of a layer(which Krita does have but aren't exposed to the python api), is this correct or a seperate concern?
Well, maybe the IDs are good enough - but I'm looking for way to identify layers between file loads. Are the layer IDs unique across reloads?
Can you please explain in detail what is the difference between this bug and bug 406763 ? Or more precisely, do you want it to be one system (with both functionalities explained here and in the other wish report: both mass actions on layers depending on those 'tags', and scripting-compatible assigning 'tags' to various objects, including layers) or two separate ones? @boud - are you sure it belongs to the Tagging component? Since layers are not resources, the tagging system we have now don't really seem compatible. (And the same question is about the assignedness of this wish report).
@Tymond yes of course. I guess this could be implemented as a plugin easily if we had functionality similar to GIMP's parasites. So via parasites on layers we could indeed have tag data stored in these parasites. Parasites is probably a bad name. It should probably be called meta- or simply, user data. But the concept is to allow plugin authors to store and retrieve (at least string) data on each layer which is saved with the project file. It would allow for plugins to store and operate on data across krita sessions, which a layer tagging solution would require. Right now I am personally resorting to base64 encoding in group layer names to store my data along with the document (krita-bulk-actions). Now if there was an official layer tag functionality in krita, plugins could adhere to that API and base functionality off of that. Thus operating on tags already available or sat by the user. If an official layer tagging API was available it could be used by other krita functionality to let the user target specific (tagged) layers to run operations on instead of having to manually select the same X layers everytime you need to apply a filter, color adjust, select from, copy from etc. I'm sure it could be used for much more. Right now I'm using my own plugin to switch multiple layers visibility and also to set opacity for multiple layers. I'm also using it to set the document in different "states" one state is often "export" where one button push allows me to set all the layer values and filters I want on before exporting. I have a similar "working" state set I can switch on and off, and also a "sketch/note" state that shows indications, notes or specific selections for certain areas.
The common thing all this functionality ( I speak of in the above ) relies on, is tags I right now have to put in special characters in the layer names and store settings for in group layer names. You can see how in my krita-bulk-action plugin on github.
The class that is meant to allow adding any kind of metadata to images and nodes in Krita is called KisAnnotation. But the need for doing that hasn't been great enough that anyone has felt the need to implement support for working with annotations properly.
Setting to unassigned, since these are wishes that I don't have time to work on.