Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Script to Make a Mask from Channel without using selection

Participant ,
Aug 24, 2025 Aug 24, 2025

Hello,
I'm working on a script that turns layers into smart objects, but preserves their masks on the smart object.
For that, I need to save the current layer mask as a channel and return its name (done that), delete mask, convert into a smart object, and then recreate the mask from the channel that I saved and that I have its name.
I tried recording an action in which I dragged the channel into the layer which creates the layer mask,  but undoing and running the action again fails. I tried to work with the code I got from that action but I still failed.
Ideally, I'm looking for code that does not load the channel as a selection and then create the mask, but does it directly. Is that possible?

TOPICS
Actions and scripting
110
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Aug 24, 2025 Aug 24, 2025
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 25, 2025 Aug 25, 2025
LATEST

thank you. for some reason I forgot about Apply Image 😆

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines