Saving Visible or Selected layer names to clipboard or file

Hi scriptspot

Was looking for help figuring out this script. Im usually a macro recorder but have lately been attempting to figure out how to make my own with very mixed success.

Anyway here is what I am looking to create

So I have a list of layers and I need the names of them. I only need the layer names for the visible layers but I could always select them if that makes it easier. These dont need to be sorted alphabetically but that also could be useful.

Hoping to format it like example below with quotes around layer names:

"another_layer"
"environment_pieces"
"part_01"
"part_02"

 

Thanks for all the valuable information I have gotten from this community thus far.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

I am not sure what exactly do you want, but try this:

(
	for n = 1 to layerManager.count - 1 do
	(
		format "n: %   : % \n" n ("\""+(layermanager.getlayer n).name+"\"")
	)
)
KingGankins's picture

Thanks it was really close to

Thanks it was really close to what I needed so after a bit of adjustment it is working great!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.