Skip to main content
Participant
October 7, 2025
Open for Voting

Make Layer Filter (Color/Kind/Name) recordable in Actions

  • October 7, 2025
  • 2 replies
  • 83 views

I frequently need to show/hide layers based on the Layer Filter. Today this workflow cannot be automated:

  • Actions do not record the Layer Filter state (Color/Kind/Name).

  • Scripting (DOM/Action Manager) does not provide a reliable way to read a layer’s label color or to set/read the Layer Filter programmatically.

    • Tried stringIDToTypeID('color'), charIDToTypeID('Clr '), and variants like layerSheetColor / sheetColor; many builds return nothing, so a script can’t detect that a layer is “Green”.


This would drastically speed large design/retouch pipelines (hundreds of layers). Typical need:

Thank you!

 

2 replies

Stephen Marsh
Community Expert
Community Expert
October 7, 2025

@Solesea_art 

 

You can use the following code to isolate by the layer color label:

 

 
Related topics:
 
 
 
 
 
 
var ref = new ActionReference();
ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
var desc = executeActionGet(ref);
var theLabelColID = desc.getEnumerationValue(stringIDToTypeID('color'));

// "none", "red", "orange", "yellowColor", "grain", "blue", "violet", "gray" - New in 2024: "magenta", "seafoam", "indigo", "fuchsia"
if (theLabelColID === stringIDToTypeID("red")) {
    alert("The active layer has a red label!");
} else {
    alert("The active layer does not have a red label!");
}
Stephen Marsh
Community Expert
Community Expert
October 7, 2025

I second the feature request idea and have voted!