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

Layer Control Output

Explorer ,
Apr 03, 2019 Apr 03, 2019

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

244
Translate
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
Explorer ,
Apr 03, 2019 Apr 03, 2019
LATEST

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.

Translate
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