Skip to main content
Known Participant
December 20, 2021
解決済み

Change default background layer to original file name

  • December 20, 2021
  • 返信数 3.
  • 2379 ビュー

When I import a file into photoshop, can I have the "background" layer show the PSD file name? 

このトピックへの返信は締め切られました。
解決に役立った回答 Stephen Marsh

Yes it works. The basic script is installed by default with Photoshop. More on Script Events Manager here:

 

https://prepression.blogspot.com/2021/10/photoshop-script-events-manager.html

 

EDIT: Recently discussed in this recent topic thread -

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/script-for-open-as-layer-without-file-extension/m-p/12594732

 

返信数 3

Stephen Marsh
Community Expert
Community Expert
December 20, 2021

A conditional action can check for the Background layer and promote it to a standard layer, it just can't name it after the open document name, a script is required for that. This is one of the "rare" cases where the conditional actions are useful:

 

 

 

ipv1作成者
Known Participant
December 20, 2021

I think this is what I'm looking for 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/renaming-a-layer-with-the-file-name/td-p/10531371

 

Does anyone know if this works for 23.1.0? 

* Inventory: Photoshop v 24.3.0; M1 Mac Mini, Ventura 13.2.1, 1 TB SSD, 16 GB RAM; Wacom Intuos Pro M
Stephen Marsh
Community Expert
Stephen MarshCommunity Expert解決!
Community Expert
December 20, 2021

Yes it works. The basic script is installed by default with Photoshop. More on Script Events Manager here:

 

https://prepression.blogspot.com/2021/10/photoshop-script-events-manager.html

 

EDIT: Recently discussed in this recent topic thread -

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/script-for-open-as-layer-without-file-extension/m-p/12594732

 

ipv1作成者
Known Participant
December 21, 2021

That was perfect! Thanks! Is it possible to add "lock layer" step to the end of that script? 

* Inventory: Photoshop v 24.3.0; M1 Mac Mini, Ventura 13.2.1, 1 TB SSD, 16 GB RAM; Wacom Intuos Pro M
Legend
December 20, 2021

You don't import a file, you just open it. And a background layer can't have a different name or it won't be a background layer. I suppose you could add an empty layer to every file with the filename, but why?

ipv1作成者
Known Participant
December 20, 2021

When I'm compositing, I'd like the background layer to show the original filename similiar to when you load files into a stack. 

 

 

* Inventory: Photoshop v 24.3.0; M1 Mac Mini, Ventura 13.2.1, 1 TB SSD, 16 GB RAM; Wacom Intuos Pro M
JJMack
Community Expert
Community Expert
December 20, 2021

You can convert  a background layer to a normal layer and name it anyway you want.  All PSD do not have a background layer.  The background layer is special bottom layer and one is not required.   You can script the process even make an open event handler. But you need to handle what you want to do when there is no background layer. You will be making all PSD to not have as background layer you will most likely open these also and If you save the PSD with a new file name will you also be renaming the bottom layer. Save even handlers are triggered after the save completes the rename can not be done by  a save even handler the documen may not longer be in Photoshop. The open event handler  can rename a bottom normal layer.  The open event handler would need to be a script so it can use logic to determine what kind of layer the bottom layer is in  a PSD file and be able to retrieve the backing file name and file type,

JJMack