2

I'm trying to make an action that makes a change, then moves up a layer, making it visible in the process. However, when I use the Alt + ] or Alt + [ shortcuts, it only cycles visible layers. When I look at the actions that I've recorded, I can see that it says "Without Make Visible." I don't see a way of changing that, nor can I find the shortcut in the menu.

Any ideas short of scripting this out manually?

(using Windows 10, Photoshop CC 2017)

0

Command/Ctrl+, (Comma) toggles the slected layer's visibility by default. (off and on for highlighted layer)

Add the Option/Alt key and it toggles the visibility of all other layers to on. Command/Ctrl+Option/Alt+,

Add the Option/Alt and the Shift key and it toggles the visibility of all other layers to off. Command/Ctrl+Option/Alt+Shift+,

If that isn't working for you, check Edit > Keyboard Shortcuts and scroll down to Layers and look for the Hide Layer item to ensure the shortcut is still assigned. You may need to reset the keyboard shortcuts to the default set in the upper right corner of the Edit Keyboard Shortcuts window.

| improve this answer | |
  • I might be able to make this work with some clever use of toggling all other layers, but what I was hoping to find is a way to specifically set the "Without Make Visible" to "With Make Visible" or whatever the opposite is. Surely that option exists, or why would they have it specified at all? – jemtan990 May 17 '18 at 11:48
  • You can easily re-record your own action and not use Adobe's default action. – Scott Nov 13 '18 at 17:14
  • The issue is that I can't use a command to select a layer that is not already visible. I could record myself clicking it, but then I will get a recorded action of "select Layer x," not "select next layer up." Unless you're referring to some other method? – jemtan990 Nov 14 '18 at 15:32
0

If you want to show just the current selected Layer, go to: Menu >> Layers >> Show Layer.

But, if you want to show all Layers, use: alt + ctrl + A to select all Layers. Now go to: Menu>> Layers >> Hide Layers then Menu>> Layers >> Show Layers. it's a good pratice you rename the Layer before you do this, to be able to select it back.

All these two precess will be recorded by the action.

| improve this answer | |
  • Hey, thanks for looking at this, but that still doesn't address my issue. I'm trying to make an action that will move up one layer (which is not visible), and then make that layer visible. I can't because the action is only moving up to the next visible layer. I can't use the "Show Layer" command unless I manually click on that layer, which defeats the purpose. – jemtan990 Jul 17 '18 at 23:39
  • Unfortunately you cannot do it. – LeoNas Jul 18 '18 at 1:08
0

Before recording your action, ensure that the active layer is hidden. Then, start your recorded action with the step “show current layer” (by ticking the visibility box of the active layer, as usual).

Then add your edits, and close the action with Alt + [ to move to the next layer in the sequence.

Explanation: Luckily, Photoshop considers the “show current layer” property to be transitive and relative, not fixed to the layer on which it happened to have been invoked.

| improve this answer | |
  • Right, but I can't pass to the next layer, because the next layer isn't visible. – jemtan990 Mar 14 '19 at 11:37
  • You're right; my particular action sequence worked for me, but for a completely different reason. See my edited answer. – Asher Reich Mar 20 '19 at 19:33
0

Found this question by chance and figured I'd give it a go no matter how ridiculous it would get... What I came up with is faaaaaaaaaar from ideal, but it works...

Here's the gist of what the script does:

  1. Duplicate the document
  2. Select all layers
  3. Make all layers visibile
  4. Select the starting layer again
  5. Select the next layer now and store its ID
  6. Close the document
  7. In the original document - Select a layer with the same ID

Just in case it's not obvious... This is a pretty expensive process to go through to get the next layer. If the current document is pretty beefy or the computer is not the fastest, it may take a while to run the script. That said, it seemed usable in my tests...

It's a little unclear if OP actually wanted the next layer to be visible or it that was just him thinking that if he could record an action that makes it visible, it would always get selected. This doesn't force the next layer visible, but if you wanted to do it, you could make it visible after its selected:

nextLayer('up');
app.activeDocument.activeLayer.visible = true;

The script (written for PS CC 2019):

// Select Next Layer (invisible or not).jsx
// https://gist.github.com/joonaspaakko/048c9b58ccbb6e6f44c894bf4ce30b68

nextLayer('down');

// direction (↑): "up" or "above"
// direction (↓): "down" or "below"
function nextLayer( direction ) {
  
  var doc = app.activeDocument;
   // Doc duplication is necessary because while the History panel can record visibility change, but for some reason it doesn't do that when the visibility command comes from a script... (AFAIK)
  var tempDoc = doc.duplicate();
  var layer1 = tempDoc.activeLayer;
  
  // Turn background layer into a normal layer
  var lastLayer = tempDoc.layers[ tempDoc.layers.length-1 ];
  function cTID(s) { return app.charIDToTypeID(s); };
  function sTID(s) { return app.stringIDToTypeID(s); };
  var layer1ID = activeLayerID();
  tempDoc.activeLayer = lastLayer;
  var bgLayerExists = lastLayer.isBackgroundLayer;
  if ( bgLayerExists ) { lastLayer.isBackgroundLayer = false; }
  try { selectLayerByID( layer1ID ); } catch(e) {}
  // Select all layers
  var desc23 = new ActionDescriptor();
  var ref5 = new ActionReference();
  ref5.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );
  desc23.putReference( cTID('null'), ref5 );
  executeAction( sTID('selectAllLayers'), desc23, DialogModes.NO );
  // Make active layers visible
  var desc209 = new ActionDescriptor();
  var list93 = new ActionList();
  var ref129 = new ActionReference();
  ref129.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );
  list93.putReference( ref129 );
  desc209.putList( cTID('null'), list93 );
  executeAction( cTID('Shw '), desc209, DialogModes.NO );
  // Reselect the starting layer
  if ( bgLayerExists ) { lastLayer.isBackgroundLayer = true; }
  selectLayerByID( layer1ID );
  // Select next layer
  try { snl( direction ); } catch(e) {}
  // Store the layer
  var nextLayer = activeLayerID();
  tempDoc.close( SaveOptions.DONOTSAVECHANGES );
  // Try to select the next layer using its ID
  try {
    selectLayerByID( nextLayer );
  }
  // If it fails, well assume it did so because it was a background layer... and use another method for selecting that.
  catch(e) {
    var desc299 = new ActionDescriptor();
        var ref187 = new ActionReference();
        ref187.putName( cTID('Lyr '), "Background" );
    desc299.putReference( cTID('null'), ref187 );
    desc299.putBoolean( cTID('MkVs'), false );
        var list138 = new ActionList();
        list138.putInteger( 1 );
    desc299.putList( cTID('LyrI'), list138 );
    executeAction( cTID('slct'), desc299, DialogModes.NO );
  }
  
  function snl( direction ) {
    
    var select;
    if ( direction == 'up' || direction == 'above' ) {
      select = cTID('Frwr');
    }
    else if ( direction == 'down' || direction == 'below' ) {
      select = cTID('Bckw');
    }
    
    var desc67 = new ActionDescriptor();
    var ref41 = new ActionReference();
    ref41.putEnumerated( cTID('Lyr '), cTID('Ordn'), select );
    desc67.putReference( cTID('null'), ref41 );
    desc67.putBoolean( cTID('MkVs'), false );
    var list17 = new ActionList();
    list17.putInteger( 5 );
    desc67.putList( cTID('LyrI'), list17 );
    executeAction( cTID('slct'), desc67, DialogModes.NO );
  }
  
  function activeLayerID() {
      var ref = new ActionReference();
      ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "LyrI" ));
      ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    return executeActionGet(ref).getInteger( stringIDToTypeID( "layerID" ) );
  }
  
  function selectLayerByID(id, add){
     add = (add == undefined) ? add = false : add;
     var ref = new ActionReference();
     ref.putIdentifier(cTID('Lyr '), id);
     var desc = new ActionDescriptor();
     desc.putReference(cTID('null'), ref);
     if(add){
        desc.putEnumerated(sTID('selectionModifier'), sTID('selectionModifierType'), sTID('addToSelection'));
     }
     desc.putBoolean(cTID('MkVs'), false);
     executeAction(cTID('slct'), desc, DialogModes.NO);
  }
  
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.