Photoshop: Would be good if duping layers respected Clipping Mask state

  • 6
  • Idea
  • Updated 8 years ago
  • (Edited)
Duplicating a layer in the middle of a stack of clipped layers creates a new layer that's not part of the clipped stack. It creates a new stack with everything above it clipped.

1. "Gradient Fill" is duplicated using command-J.
2. "Shape" is now clipped to "Gradient Fill", instead of all the layers being clipped to "Color".

I'd expect a duped layer to remain part of the same clipping stack.
Photo of Marc Edwards

Marc Edwards

  • 130 Posts
  • 22 Reply Likes
  • happy

Posted 9 years ago

  • 6
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
JustDupeIt2 will keep the clipping mask state. It will create two history states, but I could wrap them in a single "Just Dupe It" state if that would be more helpful :-)
It doesn't do anything to fix any problems Photoshop may have with duping multiple clipped layers at once.

var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
var idDplc = charIDToTypeID( "Dplc" );
var desc172 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref3 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref3.putEnumerated( idLyr, idOrdn, idTrgt );
desc172.putReference( idnull, ref3 );
var idVrsn = charIDToTypeID( "Vrsn" );
desc172.putInteger( idVrsn, 5 );
executeAction( idDplc, desc172, DialogModes.NO );
Photo of Marc Edwards

Marc Edwards

  • 130 Posts
  • 22 Reply Likes
Thanks again David. That'll certainly help some of us until this gets resolved.
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
Excellent request Marc! The work around here is copy-paste, but I agree - Adobe should look into this. ;)