Skip to main content
Inspiring
February 26, 2023
Question

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

  • February 26, 2023
  • 1 reply
  • 1342 views

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?

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
February 26, 2023

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. 

Inspiring
February 26, 2023

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

c.pfaffenbichler
Community Expert
Community Expert
February 27, 2023

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?