Duplicate Layer with layer name + 1? - BUG REPORT
Duplicate Layer with layer name + 1? - BUG REPORT
So I have a shortcut assigned for duplicating a layer and structure and renaming the layer and it looks like this in the Configure Keyboard Shortcuts Panel:
My Layer Preset Manager is set like this:
And it kinda works, it duplicates the structure (with instances empty) and adds a new layer with the same name. But what I would really like, is if it added the new layer with an incremental number. For example my layer is named "Sketch 01", I press my shortcut key and TVP adds a layer named "Sketch 02". I press the shortcut key again, "Sketch 03", etc into oblivion.
(Or for that matter: "Sketch" > shortcut key > "Sketch 01" > shortcut key > "Sketch 02", etc into oblivion)
This should be possible, shouldn't it...? If so, the the big question is... But how??
Does anybody have any advice?
My Layer Preset Manager is set like this:
And it kinda works, it duplicates the structure (with instances empty) and adds a new layer with the same name. But what I would really like, is if it added the new layer with an incremental number. For example my layer is named "Sketch 01", I press my shortcut key and TVP adds a layer named "Sketch 02". I press the shortcut key again, "Sketch 03", etc into oblivion.
(Or for that matter: "Sketch" > shortcut key > "Sketch 01" > shortcut key > "Sketch 02", etc into oblivion)
This should be possible, shouldn't it...? If so, the the big question is... But how??
Does anybody have any advice?
Last edited by Sewie on 17 Feb 2018, 10:01, edited 1 time in total.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Re: Duplicate Layer with layer name + 1?
I use an action
0 Key:Layer:Duplicate Instances
1 Embedded George Script
2 End
And the george script is:
tv_LayerCurrentID
curID = result
tv_LayerInfo curID
PARSE result layerDisplay layerPosition layerOpacity layerName layerType layerStart layerEnd layerPrelighttable layerPostlighttable layerSelection
newName = layerName"_COL"
tv_LayerRename curID newName
It duplicates a layer, clears the instances and adds "_COL" to the name of the layer. I use it to make new layers for coloring.
MyLayer
MyLayer_COL
MyLayer_COL_COL
...
I think, I've found the script somewhere here in the forum. It don't gives incremental numbers, but adds something to the name. So, maybe it helps a bit to find a way to get incremental numbers.
0 Key:Layer:Duplicate Instances
1 Embedded George Script
2 End
And the george script is:
tv_LayerCurrentID
curID = result
tv_LayerInfo curID
PARSE result layerDisplay layerPosition layerOpacity layerName layerType layerStart layerEnd layerPrelighttable layerPostlighttable layerSelection
newName = layerName"_COL"
tv_LayerRename curID newName
It duplicates a layer, clears the instances and adds "_COL" to the name of the layer. I use it to make new layers for coloring.
MyLayer
MyLayer_COL
MyLayer_COL_COL
...
I think, I've found the script somewhere here in the forum. It don't gives incremental numbers, but adds something to the name. So, maybe it helps a bit to find a way to get incremental numbers.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Re: Duplicate Layer with layer name + 1?
I tried this and I think there's something wrong.
%cln %i should (in my logic) give out
sketch 0
sketch 1
sketch 2
...
But instead it gives
sketch 0
sketch 0 0
sketch 0 0 0
Sewie, is this also what happens with your setup?
%cln %i should (in my logic) give out
sketch 0
sketch 1
sketch 2
...
But instead it gives
sketch 0
sketch 0 0
sketch 0 0 0
Sewie, is this also what happens with your setup?
Windows 10 (64 bit), 8gb ram, intel i5 10400f. TVpaint 11.7
Re: Duplicate Layer with layer name + 1?
Yes, it is weird.
When I press "Create Layer" in the Layer Preset Manager it adds the zeros, but when I press the shortcut key it just adds a new layer with the same exact name and structure. It didn't do that before I opened it... Also, I can't seem to add a shortcut through the Layer Preset Manager.
What is happening...?
When I press "Create Layer" in the Layer Preset Manager it adds the zeros, but when I press the shortcut key it just adds a new layer with the same exact name and structure. It didn't do that before I opened it... Also, I can't seem to add a shortcut through the Layer Preset Manager.
What is happening...?
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Re: Duplicate Layer with layer name + 1?
I think you must remove the blank between %cln and %i.
What I get is:
existing Layername becomes
Layername_0
subsequent, new Layername becomes
Layername_1
Layername_2
etc.
Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Re: Duplicate Layer with layer name + 1?
It doesn't work for me, Sven.
I get:
Layername (original layer)
subsequent, new Layername becomes
Layername0
Layername00
Layername000
etc.
Also, I can't seem to assign a shortcut key through the layer preset manager.
I get:
Layername (original layer)
subsequent, new Layername becomes
Layername0
Layername00
Layername000
etc.
Also, I can't seem to assign a shortcut key through the layer preset manager.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Re: Duplicate Layer with layer name + 1?
Sewie, you are right, I tested it again trying numerous variations and, indeed, it doesn't work as advertised. Too bad, it promises to be very useful...
Wait a minute, try this:
%cln_%i
the underscore parser must be essential... nope, underscore isn't necessary, works with a space: %cln %i
In the end, I think you MUST always go back and re-select the ORIGINAL layer, then the increment seems to work...
Sven
Wait a minute, try this:
%cln_%i
the underscore parser must be essential... nope, underscore isn't necessary, works with a space: %cln %i
In the end, I think you MUST always go back and re-select the ORIGINAL layer, then the increment seems to work...
Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Re: Duplicate Layer with layer name + 1?
Sven, this does not work for me. I don't know what you've done but if I follow your post I get the strangest results. Perhaps you can add screenshots or something??
Adding an underscore leaves me with.
Layername (original layer)
subsequent, new Layername becomes
Layername_0
Layername_0_0
Layername_0_0_0
I'm going to add that this is a bug in the thread title, perhaps the developers will notice. Because we are running circles here.
Edit;
Wait, I see now what you mean. You have to go back and re-select the original layer before adding a new layer or duplicating, every time. Only then will TVP add an incremental number. I don't see how that is practical in everyday use, so I still think this is a BUG. Either in the software's code or in the team's interpretation of the users workflow.
The problem with not being able to create a shortcut through the Layer Preset Manager remains. (Also a bug I, believe.)
Adding an underscore leaves me with.
Layername (original layer)
subsequent, new Layername becomes
Layername_0
Layername_0_0
Layername_0_0_0
I'm going to add that this is a bug in the thread title, perhaps the developers will notice. Because we are running circles here.
Edit;
Wait, I see now what you mean. You have to go back and re-select the original layer before adding a new layer or duplicating, every time. Only then will TVP add an incremental number. I don't see how that is practical in everyday use, so I still think this is a BUG. Either in the software's code or in the team's interpretation of the users workflow.
The problem with not being able to create a shortcut through the Layer Preset Manager remains. (Also a bug I, believe.)
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Re: Duplicate Layer with layer name + 1? - BUG REPORT
That's it... but I think the complication is in making the duplication routine KNOW that the correct root is used in generating increments.
I never took a close look at the New layer options before. In fact, it took me a while to discover how to edit and delete new-layer-definition rules I'd messed up! Once you understand the rules, it is potentially a very useful function for layer manipulation!
Sven
I never took a close look at the New layer options before. In fact, it took me a while to discover how to edit and delete new-layer-definition rules I'd messed up! Once you understand the rules, it is potentially a very useful function for layer manipulation!
Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Re: Duplicate Layer with layer name + 1? - BUG REPORT
Thanks Sven, I see what you mean.
So if this is what the code does now:
1- takes the original layer name as the root name for the layer to be created.
2- next, the entire list of existing layers is searched to find the HIGHEST existing incremented name.
3- finally, another incremental layer is created using a number ONE HIGHER that the highest existing layer with the same root.
Then the solution would be to replace step 1, and instead take the selected layer as the name for the layer to be created? I'm not a coder but hopefully we are offering the team part of a solution for this particular problem.
So if this is what the code does now:
1- takes the original layer name as the root name for the layer to be created.
2- next, the entire list of existing layers is searched to find the HIGHEST existing incremented name.
3- finally, another incremental layer is created using a number ONE HIGHER that the highest existing layer with the same root.
Then the solution would be to replace step 1, and instead take the selected layer as the name for the layer to be created? I'm not a coder but hopefully we are offering the team part of a solution for this particular problem.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Re: Duplicate Layer with layer name + 1? - BUG REPORT
I know, it's another thing, but it was inspired by this discussion.
It's my first george-script ever and it just covers the base idea of numbering layers. It works fine for my personal use, but it has some limitations. You get an error message, if the last letter of the layers name is not a number. And it will only increase the last number of the name, so after number 19 you'll get 110, 111, ....
Parts of the script are taken from this posting: http://forum.tvpaint.com/viewtopic.php?f=34&t=10294
How to use:
1. The script just gives new layer names. The duplicating of a layer is done by (Key:Layer:Duplicate Instances)
2. The layers name has to have a number as the last letter
It's my first george-script ever and it just covers the base idea of numbering layers. It works fine for my personal use, but it has some limitations. You get an error message, if the last letter of the layers name is not a number. And it will only increase the last number of the name, so after number 19 you'll get 110, 111, ....
Parts of the script are taken from this posting: http://forum.tvpaint.com/viewtopic.php?f=34&t=10294
How to use:
1. The script just gives new layer names. The duplicating of a layer is done by (Key:Layer:Duplicate Instances)
2. The layers name has to have a number as the last letter
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
- Animationriver
- Posts: 258
- Joined: 02 Jul 2017, 09:04
- Location: Moscow
- Contact:
Re: Duplicate Layer with layer name + 1? - BUG REPORT
Big Thanks!!!
www.youtube.com/c/animationriver
MAC OS Sierra 10.12.6 64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.2 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.37-2
MAC OS Sierra 10.12.6 64 bits , MacBook Pro (Retina, 15-inch, Mid 2014)
2.8 GHz Intel Core i7, 16 GB Memory , TVPaint PRO 11.5.2 64bit
NVIDIA GeForce GT 750M 2048 Мb
Wacom Cintiq 27 QHD Touch - Wacom Intuos Pro 5 - driver version 6.3.37-2
Re: Duplicate Layer with layer name + 1? - BUG REPORT
Thanks, Animark.
That will help for now, though I'd much rather see the bugs in the Layer Management Panel fixed without the addition of yet another custom panel. These things have a tendency of multiplying faster than vermin.
That will help for now, though I'd much rather see the bugs in the Layer Management Panel fixed without the addition of yet another custom panel. These things have a tendency of multiplying faster than vermin.
Michael Sewnarain - Website
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
Windows 11/64b Pro - TVP11.7.0 & 11.7.1 - Pro/64b - Cintiq32 Pro - Intel i7-12700K - 64Gb RAM
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Re: Duplicate Layer with layer name + 1? - BUG REPORT
Sewie wrote: ↑17 Feb 2018, 09:59 You have to go back and re-select the original layer before adding a new layer or duplicating, every time. Only then will TVP add an incremental number. I don't see how that is practical in everyday use, so I still think this is a BUG. Either in the software's code or in the team's interpretation of the users workflow.
The problem with not being able to create a shortcut through the Layer Preset Manager remains. (Also a bug I, believe.)
Bump.
The bug reported by Sewie (see his first post above) about the naming/numbering structure in Layer Presets has not been addressed. The scripting tips posted by Svengali and the custom panel posted by Animark present workarounds for the problem , but as Sewie points out , the proliferation of custom panels as workarounds to accomplish what should be built-in to the software can be overwhelming.
Would it be possible to fix this issue with the Layer Presets panel?
Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1