New layer button + ABOVE the current layer
Posted: 09 Sep 2021, 02:44
HELLO!
There is a button. It makes a new clean layer below the current layer.
Question.
Help make a new button. Which makes the new layer ABOVE the current layer.
Please.
This affects the speed of work.
***
// This scripts reads the name of a layer and gives it a new name with a number at the end. If the last letter of the layer name is a number, the scripts increase the number plus one. Even if there are two or more numbers, it increases just the last number. If the last letter of the layer name is not a number, you will get an error message.
//This script is just a basic idea of giving layers new names with incremental numbers. There is a lot to improve! Use it at your own risk!
tv_LayerCurrentID
curID = result
tv_LayerInfo curID
PARSE result layerDisplay layerPosition layerOpacity layerName layerType layerStart layerEnd layerPrelighttable layerPostlighttable layerSelection
NumberOfLetters = LEN(layerName)
CutPosition=NumberOfLetters
LastLetter = CUT(layerName,CutPosition,NumberOfLetters)
NewLastNumber = LastLetter+1
BaseName = CUT(layerName,1,NumberOfLetters-1)
newName = BaseName""NewLastNumber
tv_LayerRename curID newName
There is a button. It makes a new clean layer below the current layer.
Question.
Help make a new button. Which makes the new layer ABOVE the current layer.
Please.
This affects the speed of work.
***
// This scripts reads the name of a layer and gives it a new name with a number at the end. If the last letter of the layer name is a number, the scripts increase the number plus one. Even if there are two or more numbers, it increases just the last number. If the last letter of the layer name is not a number, you will get an error message.
//This script is just a basic idea of giving layers new names with incremental numbers. There is a lot to improve! Use it at your own risk!
tv_LayerCurrentID
curID = result
tv_LayerInfo curID
PARSE result layerDisplay layerPosition layerOpacity layerName layerType layerStart layerEnd layerPrelighttable layerPostlighttable layerSelection
NumberOfLetters = LEN(layerName)
CutPosition=NumberOfLetters
LastLetter = CUT(layerName,CutPosition,NumberOfLetters)
NewLastNumber = LastLetter+1
BaseName = CUT(layerName,1,NumberOfLetters-1)
newName = BaseName""NewLastNumber
tv_LayerRename curID newName