Layer Control Output
Copy link to clipboard
Copied
Hi,
with the recent update 16.1 they added a new Expressions Editor which is great but it looks like the also updated some of the syntax again.
With the Layer Control it used to give a error when there was nothing selected. So I added a try catch statement to get an output when nothing was selected. This no longer works. When you select nothing there will be no error.
I use a text layer to ouput the content of the Layer Control. In the legacy engine it gave you [OBJECTLAYER] but now it gives you the name of the selected layer. But with none selected it gives you an empty text layer. I tried to get the output with 0, false and "" but nothing works.
Does anybody know what the ouptut of a Layer Control set to None is now?
Kind regards
Christian
Copy link to clipboard
Copied
I found a fix, but I don't know if it is the correct way to code this.
Instead of
var inputLayer = effect("Box Controls")("Parent Layer");
I need to add name at the end
var inputLayer = effect("Box Controls")("Parent Layer").name;
So it still outputs an error and the old try/catch statement still works.
But I'm still interested how it would work properly or what other methods i can use instead of name.

