It is currently Sat Jun 20, 2026 4:42 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Layer Namer, a Gimp 3 Plug-in
PostPosted: Sun Nov 24, 2024 8:23 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Hi,
There was some interest in this forum about renaming a Gimp image layer, so I wrote a plug-in to do just that.

This is a copy of the Read Me.txt:
Quote:
With Layer Namer, you can quickly find and replace a character string in each layer's name of an image. Both layer group and the normal Gimp layer are renamed when a match is found.

The plug-in won't do the following:
1. It won't leave an empty layer name after a find/replace operation. If the layer name reduces to empty, then the operation is skipped for the given layer.

2. It won't run unless there is a value in the Find widget.


Here what the default dialog looks like in English:
Attachment:
File comment: Find and replace but nothing too fancy.
default dialog.png
default dialog.png [ 8.18 KiB | Viewed 3958 times ]


Here's what it can do:
Attachment:
File comment: The layer names are changed.
before and after.png
before and after.png [ 81.25 KiB | Viewed 3958 times ]


This is Layer Namer v1:
Attachment:
File comment: Has a 'Read Me.txt' with installation instruction.
LayerNamer v1.zip [3.43 KiB]
Downloaded 148 times

_________________
Charles


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Sun Nov 24, 2024 11:16 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
This one sets the dialog title, and fixes a documentation over-sight.
Attachment:
File comment: Fix window title and documentation.
LayerNamer 1.01.zip [3.46 KiB]
Downloaded 87 times

_________________
Charles


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Nov 26, 2024 9:38 am  (#3) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16037
Is there a way to say replace many layers at once like asmall, bsmall, csmall - - - to a.png, b.png, c.png?
One of the software i use to create my Custom Fonts doesn't allow the same name lettering in a folder. like A.png and a.png. This would help me out greatly to create small letters within my custom fonts that a create.
Possibly allowing to change the characters "small.png" to .png in the entire opened image layers.
I hope i have made this as clear as possible.

Otherwise i can create them as asmall.png thru zsmall.png, and rename them within GIMP but it takes forever. Just trying to simplify things. Thanks a bunch for the new Gimp-3.0 plug-in!

EDIT-
Actually this probably already will do that. If i name my letters asmall and change small to .png?

FIND: small.png
REPLACE: .png
Will that work? Or will it just find all layers with small in the name and rename them all .png? :lol

_________________
Image


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Nov 26, 2024 10:14 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 2012
This plugin is very innovative. I hope to try it soon...


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Nov 26, 2024 10:55 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Rod wrote:
Is there a way to say replace many layers at once like asmall, bsmall, csmall - - - to a.png, b.png, c.png?

Yes, try:
FIND: small
REPLACE: .png

Layer Namer changes are undo-able. The Find string matches are case-sensitive.

_________________
Charles


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 18, 2024 8:40 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Hi,
I made a few improvements to Layer Namer. There's are new Preview and Undo buttons, and a Regex option. Here is a before and after example:
Attachment:
before and after 1.png
before and after 1.png [ 105.83 KiB | Viewed 3668 times ]

Attachment:
File comment: Improve the previous version.
LayerNamer 1.1.zip [47.47 KiB]
Downloaded 104 times

_________________
Charles


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 18, 2024 9:55 am  (#7) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
Looks interesting. The day will come when I might need this.
Thanks for the plug-in


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Thu Dec 19, 2024 3:32 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Happy holidays,
I've made a couple of fixes to 1.1.


Attachments:
File comment: Fix and improve the previous version.
LayerNamer 1.11.zip [45.91 KiB]
Downloaded 110 times

_________________
Charles
Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Dec 02, 2025 7:38 am  (#9) 
Offline
New Member

Joined: Dec 02, 2025
Posts: 4
Sadly didn't work for me. See attachment. Shame - looked like just what I needed
Maybe a Gimp3 update broke it?


Attachments:
Screenshot 2025-12-02 123447.png
Screenshot 2025-12-02 123447.png [ 162.15 KiB | Viewed 1866 times ]
Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Dec 02, 2025 10:35 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
Hi,
I am sad too that the plug-in won't install. Layer Namer (LN) is written in Python, so LN is referred to as a plug-in. As such and for a successful load, LN's folder must be nested in one of the Plug-in Folders found in the Preferences dialog.
Attachment:
File comment: I find plug-ins are easier to manage when I keep in a custom folder.
plug-in-folders.png
plug-in-folders.png [ 42.58 KiB | Viewed 1838 times ]


This is the latest version. I've tested it on Gimp 3.0.6 revision 1 and Windows 10.


Attachments:
File comment: minor update
LayerNamer 1.12.zip [47.23 KiB]
Downloaded 52 times

_________________
Charles
Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Dec 02, 2025 12:46 pm  (#11) 
Offline
New Member

Joined: Dec 02, 2025
Posts: 4
Yeah - solved it. For some reason it doesn't register when installed to AppData/Roaming, but works fine in AppData/Local. Thanks for this - great plugin.

I modified it a bit to include being able to just rename visible layers or selected layers. Find attached if of any use.

Image


Attachments:
LayerNamer 1.11+.zip [48.59 KiB]
Downloaded 52 times
Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Tue Dec 02, 2025 5:07 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
I'm glad that you've solved the problem. I'll have to include your thoughtful changes in a future update.
Cheers,

_________________
Charles


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 03, 2025 3:02 am  (#13) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
stigzler wrote:
Sadly didn't work for me. See attachment. Shame - looked like just what I needed
Maybe a Gimp3 update broke it?


That's because (according to your screenshot) you installed in the scripts folder, not in plug-ins.
Python files go into a plug-ins folder.


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 03, 2025 3:52 am  (#14) 
Offline
New Member

Joined: Dec 02, 2025
Posts: 4
quietreader wrote:
That's because (according to your screenshot) you installed in the scripts folder, not in plug-ins.
Python files go into a plug-ins folder.


Good catch.


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 03, 2025 3:53 am  (#15) 
Offline
New Member

Joined: Dec 02, 2025
Posts: 4
gasMask wrote:
I'm glad that you've solved the problem. I'll have to include your thoughtful changes in a future update.
Cheers,

Have you thought about putting it on github? Others would be able to add to it then for your review.


Top
 Post subject: Re: Layer Namer, a Gimp 3 Plug-in
PostPosted: Wed Dec 03, 2025 12:06 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 280
Location: Lake Havasu City, Arizona, USA
stigzler wrote:
Have you thought about putting it on github? Others would be able to add to it then for your review.

I'm pretty much inexperienced with GitHub. I use it's repository functionality, where my user namei is gummycowboy, to store zip files, but its full capability seems daunting to me. For now, I'm putting this on my to-do list, "Try creating a code repository with one of my plug-ins.". Thanks for the suggestion, it's a good idea.
Cheers,

_________________
Charles


Top
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group