Is there any way to rename the layers in gimp? Preferably if there was some way to rename only visible and/or linked layers.
I know there is the plugin under Filters-Animation-Rename Layers....
But this filter is for animation, and only renames the name of the Prefix, determines the Delay and allows whether or not to include "Replace" in the layer name.
I'd like to be able to rename the layers indexed by adding a prefix of my choice (not just 'Frame').
Something like the Export All Layers plugin (ofn-export-layers), but without having to export the layers (Renaming them directly while editing).
(03-23-2022, 06:24 PM)Krikor Wrote: ....Preferably if there was some way to rename only visible and/or linked layers. I'd like to be able to rename the layers indexed by adding a prefix of my choice (not just 'Frame').
I do not know of anything like that. Only this old plugin - anitools.py - which will rename all the layers , visible or not visible.
I use it with a blank name and it just numbers the layers, 0 to nnn
Run it again and it can add a suffix. It is old, so not clever when it comes to layer groups.
Your question makes a good request for one of the coding guys. Maybe one will make such a script.
anitools.zip attached, unzip and put in the plug-ins folder. Find it in the Tools menu
(03-23-2022, 07:41 PM)rich2005 Wrote: I do not know of anything like that. Only this old plugin - anitools.py - which will rename all the layers , visible or not visible.
I use it with a blank name and it just numbers the layers, 0 to nnn
Run it again and it can add a suffix. It is old, so not clever when it comes to layer groups.
Your question makes a good request for one of the coding guys. Maybe one will make such a script.
anitools.zip attached, unzip and put in the plug-ins folder. Find it in the Tools menu
In the group, only the group name was renamed, the inner layers of this group did not have their names changed.
But having multiple groups and needing to rename multiple layers both inside and outside of groups, it would be critical for the plugin to allow us to select which layers we want to rename.
Something like: Head 01, Head 02, ..., Head 25; Eyes 01, Eyes 02, ..., Eyes 14; Hair 01, ..., Hair 12; etc.
But the plugin in other cases will be very useful.
Hello Krikor
I must be not understand something here , when I need to change the name of a layer or group or layer within a group I go to the Layers dialog box choose the item ( layer or group or layer within a group ) right click and select Edit Layer Attributes there "layer name" can be changed inc six or seven other layer properties,
ATM I using an older version of GIMP 2.10.12 not on rolling releases anymore, gone for a static distro. nice and slow,
thou that method did work with the newer Gimp I was using rolling distro,
Have I read your question wrong ?
Regards
Redrawn
03-24-2022, 12:48 PM (This post was last modified: 03-24-2022, 01:35 PM by Krikor.)
(03-24-2022, 09:02 AM)Redraw Wrote: Hello Krikor
I must be not understand something here , when I need to change the name of a layer or group or layer within a group I go to the Layers dialog box choose the item ( layer or group or layer within a group ) right click and select Edit Layer Attributes there "layer name" can be changed inc six or seven other layer properties,
ATM I using an older version of GIMP 2.10.12 not on rolling releases anymore, gone for a static distro. nice and slow,
thou that method did work with the newer Gimp I was using rolling distro,
Have I read your question wrong ?
Regards
Redrawn
Hello Redraw,
Your understanding is correct when it comes to renaming layers. But the point is to try to avoid renaming one by one when you have hundreds of layers that need to be renamed.
I often create a new layer by copying a previous layer, thereby generating layer names like Layer #1, Layer #2, ..., Layer #15, etc. Or, Layer name Copy #1, ..., Layer name copy #8.
At some point it is necessary to organize the names of the layers, but renaming them one by one is very boring and time consuming. Hence the need for a plugin that works in this routine.
It does use visible layers and layer groups. A little specific, might be useful for layer groups.
search-replace.py zipped and attached
This script (search-replace.py) is very close to fulfilling the wishes I expressed in post #1 of this topic.
I made visible only the layers I wanted to rename.
I asked him to rename only the visible layers.
He did that.
I chose the prefix 'Left' to be used, which should generate layers named Left 0, Left 1, Left 2, etc.
But the result was something strange (see image)
I also noticed that the ideal would be if the plugin could show us the existing layer groups and then allow us to choose which or which of them we would like to rename the layers (visible or indexed) - This would avoid having to redo all the selection of which layers would be or not visible with every rename.
(03-24-2022, 09:23 AM)rich2005 Wrote: edit: Ah.. it has a credit to Ofnuts
Hummm really? Could you be revealing a secret profile of ofnuts without realizing it?
03-24-2022, 07:21 PM (This post was last modified: 03-24-2022, 07:25 PM by PixLab.)
I use the bates' layers attributes scm (I modified it just a bit)
It renames with auto increment, Layer ➤ Multi-Layer Tools ➤ Edit Multiple Layers Attributes... It renames layers and the groups' names but NOT inside a group
(03-24-2022, 07:21 PM)PixLab Wrote: I use the bates' layers attributes scm (I modified it just a bit)
It renames with auto increment, Layer ➤ Multi-Layer Tools ➤ Edit Multiple Layers Attributes... It renames layers and the groups' names but NOT inside a group
If it can help
Ohh .scm, I love being able to install scripts without having to restart Gimp later.
I really enjoyed this script!
While it doesn't fulfill all my dreams (see post #1), it's a versatile tool.
It considers the groups as a single layer, so if there are 2 layers, a group with 10 inner layers and another 5 layers (in that order from bottom to top) it will work as if there were 8 layers (2+1+5).
It allows layers to be linked after being renamed.
This makes it easier to group the layers again after renaming.
How I proceeded in my initial test:
1- I ungrouped the layers of a certain group;
2- Knowing in which interval the ungrouped layers were, I provided these indices to the script (Start at which layer? / End at which layer?);
3- I checked the option to link the layers;
4- After renaming, I used another filter to group the linked layers. (restoring the initial status quo)
A small discomfort in using this script is in terms of counting the layers so that we can give the script the correct instruction on from what point to what point to rename the desired layers.
But at the moment, among the options I had, it proved to be the best option.
03-25-2022, 03:12 PM (This post was last modified: 03-25-2022, 03:21 PM by Krikor.)
(03-25-2022, 11:55 AM)rich2005 Wrote:
Quote:Ohh .scm, I love being able to install scripts without having to restart Gimp later
Have you tried ofnuts resources manager ?
Yea! Once I learned how to use it, I don't give up on it. A must for every user of this plugin.
But I don't use it for plugins and scripts, and the reason is that I like to see these filters in your menus, it helps me to memorize the existence of these filters and not ostracize them.
(03-25-2022, 11:55 AM)rich2005 Wrote:
Quote:How I proceeded in my initial test:
I think I have just replicated your procedure
FWIW 3 minutes video
[video][/video]
Yes, my procedure was practically the one shown in the video, but I used another script for that; the one provided by PixLab in post #7.
I don't have this rename-layers.scm script. Could you please indicate where I can download it or make it available?
I noticed that with rename-layers.scmthere is no need to count the positions of the layers to tell the script which layers to rename, just make them visible (as is done with bates-layers-attributes.scm).
It also seems to me to have some versatility in the way we can rename layers. I would like to test it.
Watching the video, I even thought it was strange that you indicated search-replace.py in post #5 but didn't make any indication about this script (rename-layers.scm).