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

d.putBoolean( s2t("makeVisible" ), false ); The layer is not hidden?

Community Beginner ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

There is a piece of code that selects a layer:

.....

r.putName( s2t( "layer" ), "My layer" );
d.putReference( c2t( "null" ),r );

d.putBoolean( s2t("makeVisible" ), false );

.....
Why does d.putBoolean( s2t("makeVisible" ), false ); not hide the layer.
If I write:
d.putBoolean( s2t("makeVisible" ), true );
The layer from invisible becomes visible.
If I write:

d.putBoolean( s2t("makeVisible" ), false );
The layer is not hidden?
Could this be a feature of my version of Photoshop, or am I misunderstanding something?

TOPICS
Actions and scripting

Views

1.1K

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 ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

Edit: It is called »makeVisible«, so if the Layer is already visible it would seem reasonable to have no effect either way. 

 

Selecting a Layer is simply not intended to hide it, to hide a Layer one need not select it. 

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 Beginner ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

Thank you. I thought if you can apply the true, then it makes sense that you can try on a false. 

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 ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

But that only makes a difference if the Layer is currently hidden. 

If you want to hide a Layer there is no need to select it. 

 

What is the workflow in which this needs to be included? 

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 Beginner ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

LATEST
This is for theory at the moment. For practice, I found a code through the listener that hides and shows the desired layer.
It's interesting to understand the processes that I don't understand.

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