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

Select filtered layer in main layer tree

Engaged ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

When I use the layer filter (that search bar at the top of the layer palette), select a layer there and then switch that filter OFF again, that layer is not selected/active in the main layer tree. Is there a way to make that happen?

TOPICS
Windows

Views

2.6K

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
Adobe
Community Expert ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

Did you select the Layer (before desctivating the filtered display)? 

Could you please post screenshots with the pertinent Panels (Toolbar, Layers, Options Bar, …) visible? 

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
Engaged ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

I've checked and again and the problem seems to be a bit different. The layer actually IS selected. But when they are in a closed group, you can't see that in the main tree. So I have to slightly alter my question ...

How is is possible, that the selected layer becomes VISIBLE in the main tree. So basically the parent group should be espanded and the layer should be visible. It's something similar to the Windows Explorer where a directory tree is expanded once you select a folder in the file window.

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
Community Expert ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

Thinking out loud, this could be scripted.

 

Edit: I wanted to do this using the unique layer ID, however, it appears that the layer content filter messes this up?

 

So I had to resort to using the less-than-ideal layer/group name value (which only works consistently as expected if there are unique layer/group names). 

 

Script 1 of 2:

 

#target photoshop

// Script 1 of 2

try {
    if (activeDocument.activeLayer.parent.typename === "LayerSet") {
        $.setenv(theGroup_5c4e7860 = activeDocument.activeLayer.parent.name);
        $.setenv(theLayer_7e8fb92a = activeDocument.activeLayer.name);
    } else {
        alert("The selected layer isn't in a layer group!");
    }
} catch (e) { }

 

 

 

Script 2 of 2:

 

#target photoshop

// Script 2 of 2

try {
    activeDocument.activeLayer = activeDocument.layers[theGroup_5c4e7860];
    // Expand active group by jazz_y
    var g = (ad = activeDocument).activeLayer;
    if (g.typename == 'LayerSet' && g.layers.length) ad.activeLayer = g.layers[0];
    ad.activeLayer = g;
    activeDocument.activeLayer = activeDocument.layerSets[theGroup_5c4e7860].layers[theLayer_7e8fb92a];
} catch (e) {}

 

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

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
Community Expert ,
Dec 04, 2022 Dec 04, 2022

Copy link to clipboard

Copied

Here it is in a single script.

 

Run the script to set the target group and layer.

 

Run the script a second time while holding down the alt/opt key modifier to expand the target group and select the target layer.

 

/*
https://community.adobe.com/t5/photoshop-ecosystem-discussions/select-filtered-layer-in-main-layer-tree/td-p/13393503
v1.0, 5th December 2022, Stephen Marsh
*/

#target photoshop

if (documents.length > 0) {

    // Step 2 - Hold down alt/opt to expand the group and select the layer
    if (ScriptUI.environment.keyboardState.altKey) {
        try {
            activeDocument.activeLayer = activeDocument.layers[theGroup_5c4e7860];
            // Expand active group by jazz_y
            var g = (ad = activeDocument).activeLayer;
            if (g.typename == 'LayerSet' && g.layers.length) ad.activeLayer = g.layers[0];
            ad.activeLayer = g;
            activeDocument.activeLayer = activeDocument.layerSets[theGroup_5c4e7860].layers[theLayer_7e8fb92a];
        } catch (e) { }
        
    // Step 1 - Set the target group and layer
    } else {
        try {
            if (activeDocument.activeLayer.parent.typename === "LayerSet") {
                $.setenv(theGroup_5c4e7860 = activeDocument.activeLayer.parent.name);
                $.setenv(theLayer_7e8fb92a = activeDocument.activeLayer.name);
            } else {
                alert("The selected layer isn't in a layer group!");
            }
        } catch (e) {}
    }
    
} else {
    alert("No doc open!");
}

 

 

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
Engaged ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

Thanks for the suggestion and your time. But I was wondering if there was an option that would do that automatically. Running a script every time I need that should not be the solution. I'll post yet another feature request. 

Adobe - please take a break from putting AI-nonsense into to program and do some catch up on more basic functionality.

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
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

I'm obviously not aware of a native feature (or have forgotten it if there is one).

 

Fortunately, or unfortunately, depending on your view - scripting starts where Adobe finished.

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
Engaged ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

I know. I wrote scripts and extensions myself. But there's a place for scripts and one for core features. Not everything should be offloaded to scripts. Scripts should be there to speed up processes not to serve as workarounds for missing features. Thanks anyway - I submitted this issue as an "idea". That's all one can do.

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
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

Exactly and I agree 100%

There are many things that are considered a no brainer for a small set of users while the majority never think that there could be more, or they remain silent and don't post idea/feature requests or spend the time to vote on them.

 

My pet peeve is not having the ability to an "opposite" function. If there is a native feature for say "collapse all groups" then there should also be a native option for the opposite/reverse "expand all groups".

 

If a "positive" feature exists, surely a corresponding "negative" feature should also generally exist as well.

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
Engaged ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

LATEST

Absolutely. Some things just make sense. When I select a layer in the filter and can't see it in the unfiltered tree afterwards - makes no sense. But it's that situation where decision makers just move on to new "fancy" stuff and leave the base layer behind. You contstantly have to revisiting basic operations and improve on them. Don't get me started on the brush editor. Anyway - thanks again. 

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
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

For anybody interested in this feature, the idea/feature request post can be found in the following link for your vote:

 

https://community.adobe.com/t5/photoshop-ecosystem-ideas/updating-main-layer-tree-when-selecting-a-f...

 

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