Poll: what do you think?
good idea
present behavior is better
present behavior is flawed, but this isn't the solution
[Show Results]
Post Reply 

automatic names of duplicated layer: proposed alternate algorithm

Jul 24, 2012, 17:24
Post: #1
automatic names of duplicated layer: proposed alternate algorithm
It's a common practice when building layers to duplicate existing layers as a start. Additionally, it is good practice that layer names be meaningful.

Suppose I start with the following layer: layer 1

If I duplicate that layer, it seems reasonable I'd get: layer 2. Instead I get: layer 1 copy

Then if I duplicate again I get: layer 1 copy#1, even though this is copy #2.

I propose the following:
  1. An option be available whereby user is queried for name of any layer which is to be generated. This is easier than having to edit automatically generated layer names.
  2. If automatic layer names are to be generated, code first checks if previous layer name ends in a sequence of digits. If yes, then these digits are incremented as an integer until a unique layer name is generated
  3. If the layer name does not end in a sequence of digits, then "#1" is appended to the layer name, and the "1" incremented until a unique name is generated.

So with this algorithm:
  • layer 1 would become layer 2 for a first copy, then layer 3 for a second copy, etc.
  • background would become background#2 for a first copy, then background#3 for a second copy, etc.

The problem with using "copy" in the layer name is that it is probably only in the substantial minority of cases that the newly generated layer is destined to be a true copy, so the automatically generated layer name is very likely inappropriate. Better is to use a simpler, shorter name which applies in a greater fraction of the applications.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparent Layer Changing To Black instead of White after Export JustAmanda123 2 3,646 Jul 28, 2018 17:06
Last Post: abajan
  Changing names on things in Gimp? colorizing 1 492 Feb 17, 2018 04:34
Last Post: ythgilb
  New layer color... btraven 0 476 Oct 2, 2014 00:47
Last Post: btraven
  Dragged Layer Dropping Issues darkikuto18 3 623 Sep 29, 2014 07:56
Last Post: fluffybunny2
  Get rid of the "new layer dialogue"? 3dDave 2 658 Sep 20, 2014 20:34
Last Post: 3dDave

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS