Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m excited to hear back!

Photoshop: Link / unlink Layer/Vector mask to multiple Layers.

Link or Unlink ALL Layer or Vector Masks in a file.

Common Scenario:

when Transforming a Layer with a Layer Mask unlinked, only content of the Layer is being Transformed and the content of a layer/Vector mask remains unchanged.
If unintended, this could cause a headache.

Often the Transformation is performed on many layers placed in multiple Layer Groups. It is easy to overlook unlinked Layer or Vector Mask.

Fix and prevention:

Trying to match the Layer/Vector mask to already modified Layer or go back in History.

Preventively, one must scroll through all Layers in a File to locate unlinked Layer or Vector masks and link them manually.

The suggested function would quickly solve this and help to increase productivity.

Please correct me if this function or easy workaround already exist.

Thanks!
4 people like
this idea
+1
Reply
  • Jeffrey Tranberry (Chief Customer Advocate) June 02, 2011 16:59
    This workflow might be solved with a script (If there are any enterprising script writers out there)
    • view 2 more comments
    • I agree with roman. You can read the case in which the need for this arises in my comment below. Either the feature or a solution to the root problem would be welcome!
    • Jeffrey Tranberry (Chief Customer Advocate) June 16, 2011 22:21
      Yup. I appreciate your workflow description as well. Even though your suggested implementations were different it seemed like you guys were trying to solve similar workflow problems so I grouped them together to better garner support.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Have a way to link or unlink all layers in a group to their masks with the click of button.

    The need for this arises out of layers moving independent of their masks when you move a group. I have yet to find a use-case where I've wanted to move layers in a group but NOT their masks as well. Could you please make moving a group move everthing inside it including masks even if they are not linked! Or perhaps temporarily show them as linked during the move.

    This reply was created from a merged topic originally titled
    Link masks while moving Layers / Link-Unlink all layers in a group button.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • I’m frustrated
    I agree with everyone here,
    I run into this problem every time, when working on complicated files with more then 300 layers, it's very exhausting to link or unlink layers one by one.

    you can add an "unlock for all links" (or lock) toggle button next to the layer lock icon.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • I was going to post this under being a bug. Is there a reason it's not posted there?
    This is the way it works in AfterEffects. As the definition of a group, shouldn't everything in it move/scale when you move an object's parent? It sounds a whole lot like someone just plain messed up.

    I can see how you might want an object, occasionally, to have a mask that is completely separate from the movement of all it's parents, but that is more likely rare. In AE you can choose an object to be a mask, then link that object to it's Actual parent layer, then move everything as a group, etc. Not so much in photoshop. I really wish they would get all of those software developers together so I don't have to constantly run back and forth. If they knew how I use their software they would probably laugh at how many loops I have to jump through in order to do what Could be a simple task.
    ooops, little rant there.

    anyway, this belongs in the bug section. If I don't see a response soon I might post it there as well.
    • view 11 more comments
    • Right, but without any explaining other than "you don't always want them linked," it's difficult to imagine why.
      It's good to know it's not being ignored, but with what you were saying it's hard to believe you are understanding the need, so will most likely not come up with the best solution for everyone. That's why I wanted to know how others were using the feature.
      Of course, since I have a "lack of experience," I wouldn't be expected to know enough about user interaction with the software to be useful. :/
    • Chris - did you read my comment? What are your thoughts on it?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • 1
    This should unlink all user/vector masks when run, if run with the shift key pressed all user/vector masks will be linked.
    Photoshop CS5 or better....

    #target photoshop
    main();
    function main(){
    if(!documents.length) return;
    var maskedLayers = getNamesPlusIDs();
    if (ScriptUI.environment.keyboardState.shiftKey){
    for(var a in maskedLayers){
    var isUserMask =false;
    if(maskedLayers[a][2] == 'true') isUserMask = true;
    linkUnlinkMask(Number(maskedLayers[a][0]),true,isUserMask);
    }
    }else{
    for(var a in maskedLayers){
    var isUserMask =false;
    if(maskedLayers[a][2] == 'true') isUserMask = true;
    linkUnlinkMask(Number(maskedLayers[a][0]),false,isUserMask);
    }
    }
    };
    function linkUnlinkMask(ID,link,userMask) {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putIdentifier(charIDToTypeID('Lyr '), ID);
    desc.putReference( charIDToTypeID('null'), ref );
    var desc2 = new ActionDescriptor();
    if(userMask){
    desc2.putBoolean( charIDToTypeID('Usrs'), link);
    }else{
    desc2.putBoolean( stringIDToTypeID('vectorMaskLinked'), link );
    }
    desc.putObject( charIDToTypeID('T '), charIDToTypeID('Lyr '), desc2 );
    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    function getNamesPlusIDs(){
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
    var Names=[];
    try{
    activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
    for(i;i<count;i++){
    if(i == 0) continue;
    ref = new ActionReference();
    ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
    var desc = executeActionGet(ref);
    var layerName = desc.getString(charIDToTypeID( 'Nm ' ));
    var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
    if(layerName.match(/^<
    #target photoshop
    main();
    function main(){
    if(!documents.length) return;
    var maskedLayers = getNamesPlusIDs();
    if (ScriptUI.environment.keyboardState.shiftKey){
    for(var a in maskedLayers){
    var isUserMask =false;
    if(maskedLayers[a][2] == 'true') isUserMask = true;
    linkUnlinkMask(Number(maskedLayers[a][0]),true,isUserMask);
    }
    }else{
    for(var a in maskedLayers){
    var isUserMask =false;
    if(maskedLayers[a][2] == 'true') isUserMask = true;
    linkUnlinkMask(Number(maskedLayers[a][0]),false,isUserMask);
    }
    }
    };
    function linkUnlinkMask(ID,link,userMask) {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putIdentifier(charIDToTypeID('Lyr '), ID);
    desc.putReference( charIDToTypeID('null'), ref );
    var desc2 = new ActionDescriptor();
    if(userMask){
    desc2.putBoolean( charIDToTypeID('Usrs'), link);
    }else{
    desc2.putBoolean( stringIDToTypeID('vectorMaskLinked'), link );
    }
    desc.putObject( charIDToTypeID('T '), charIDToTypeID('Lyr '), desc2 );
    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    function getNamesPlusIDs(){
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
    var Names=[];
    try{
    activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
    for(i;i
    • I think what we were looking for was a way to transform multiple layers and masks without changing the structure. If half my masks are linked, and half are not, this script would still require you to go through 1 by 1 and find the layers needing linked masks after you have translated them.

      The script would first need to record the current state of each layer. Change all to linked, then when the translation is complete, change all layers back to their original states.
    • I have had a look and found it could be done for user masks but not for vector masks as the 'vectorMaskLinked' key can be set but not read, unless Jeffery knows different?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned