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

How to quickly replace a mask

Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

I have hundreds of pictures to color.

Repeat the mask operation for each picture I think there's no way to quickly replace the script to achieve I changed the layer name to1

TOPICS
Actions and scripting

Views

922

Translate

Translate

Report

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

correct answers 1 Correct answer

LEGEND , Aug 14, 2018 Aug 14, 2018

function sTT(v) {return stringIDToTypeID(v)}

function slct(v) {

     (ref = new ActionReference()).putIndex(sTT('layer'), v);

     (dsc = new ActionDescriptor()).putReference(sTT('null'), ref)

     executeAction(sTT('select'), dsc, DialogModes.NO)

}

function chnl() {

     (ref1 = new ActionReference()).putProperty(sTT('channel'), sTT('selection'));

     (dsc = new ActionDescriptor()).putReference(sTT('null'), ref1), dsc.putBoolean(sTT('invert'), true);

     (ref2 = new ActionReference()).putEnumerated(sT

...

Votes

Translate

Translate
Adobe
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

1.gif

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

forum.php?mod=viewthread&tid=8281&pid=111562&page=1&extra=#pid111562

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

081536n2rmysz88cy58yar.gif

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

I'm just trying to replace all 1 with a script implementation.

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

Because I have hundreds of pictures to do this.

Alt replacement Too slow

Who can help me write this script, thank you very much.

Votes

Translate

Translate

Report

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
LEGEND ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

function sTT(v) {return stringIDToTypeID(v)}

function slct(v) {

     (ref = new ActionReference()).putIndex(sTT('layer'), v);

     (dsc = new ActionDescriptor()).putReference(sTT('null'), ref)

     executeAction(sTT('select'), dsc, DialogModes.NO)

}

function chnl() {

     (ref1 = new ActionReference()).putProperty(sTT('channel'), sTT('selection'));

     (dsc = new ActionDescriptor()).putReference(sTT('null'), ref1), dsc.putBoolean(sTT('invert'), true);

     (ref2 = new ActionReference()).putEnumerated(sTT('channel'), sTT('ordinal'), sTT('targetEnum'))

     dsc.putReference(sTT('to'), ref2), executeAction(sTT('set'), dsc, DialogModes.NO)

}

for(i = 2; i < 6;) slct(i++), i > 3 ? executeAction(sTT('delete')): chnl()

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

This is a good finish I want

The script tried very well. Is the principle of replacing multiple layers up?

I want to have an immature idea of selecting multiple layers to replace the selected lowermost layer to all selected layers.

I think this can be enough to deal with multiple layers. If this is not the case, it is already very good.

Kukurykus is the best scripting expert I have ever seen. He is very enthusiastic.

Votes

Translate

Translate

Report

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
LEGEND ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

I don't know what you mean by replacing multiple layers. For now if you want to replace content of adjustement layers over first adjuststement layer to its content you have to do it one by one, so the way you do it in Ps manually. It's how that script works. You can't select all layers and replace their contetnt at once or else you mean something else that I can't imagine? Perhaps you mean you want to select only certain adjustement layers manually (or still by script), so not all like in your example to run script then which is going to replace their content one by one to content of bottom adjustement one?

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

If you want to replace more than 3 layers, then how should you modify the script?

Votes

Translate

Translate

Report

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
LEGEND ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

If you know exact number of adjustement layers then you change 6 to higher number, where 6 is for 4 layers. If not, then:

$.level = 0; try{for(i = 2;;) slct(i++), i > 3 ? executeAction(sTT('delete')) : chnl()}catch(err){}

Votes

Translate

Translate

Report

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
Explorer ,
Aug 14, 2018 Aug 14, 2018

Copy link to clipboard

Copied

Thank you, thank you very much, I understand a little bit.

It works very well

Thanks again Kukurykus

Votes

Translate

Translate

Report

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
Explorer ,
Aug 15, 2018 Aug 15, 2018

Copy link to clipboard

Copied

Are there any good tutorial videos or books on learning PS scripts?

Please know the seniors please give pointers

Votes

Translate

Translate

Report

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
LEGEND ,
Aug 15, 2018 Aug 15, 2018

Copy link to clipboard

Copied

LATEST

There are no tutorials, and for sure no good tutorials. No single videos even with basic stuff. You can learn from other codes.

Votes

Translate

Translate

Report

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