Create text layer from filename
-
Would it be possible to use a SINGLE COLUMN from Google Sheets and to feed both an IMAGE SOURCE and TEXT LAYER.
For example…
“HELLO.png” is linked by Templater Settings to both an IMAGE LAYER and a TEXT LAYER
The TEXT LAYER would have to be able to strip out the “.png” to just become “HELLO”
Any help would be super appreciated!
-
@unclemonty Just replying to myself because I think I’ve worked it out.
The TEXT LAYER needs the following expression on the Source Text to remove the last 4 characters of the file extention…
x = text.sourceText.length-4
text.sourceText.substr(0,x) -
It seems like you’ve already found a solution, but I wanted to chime in and say that it should, theoretically, be possible to map the same value to both a footage and text layer simultaneously. In this case, the footage layer should be swapped out, and the text layer should be replaced with the filename present in the cell.
As you noted, you’d need to use an expression to strip out any subfolder information or file extensions, but from a theoretical standpoint, it should work.
If you have any other questions or run into any problems, let us know, and we’ll do whatever we can to get you up and running.
Thanks!