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

Check if layer is visible

Explorer ,
Mar 30, 2016 Mar 30, 2016

Hey,

is there a way to check if a layer is visible at given time? I know about two methods:

.audioActiveAtTime() and .activeAtTime(time), which could be helpful, but rather than checking if layer is enabled I'd like to check if it is visible / hearable (regardless of .enalbed, .audioEnabled state).

Thanks in advance!

TOPICS
Scripting
2.2K
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

correct answers 1 Correct answer

Advocate , Apr 05, 2016 Apr 05, 2016
Translate
Advocate ,
Mar 30, 2016 Mar 30, 2016

You've listed all possibilities. Yet it is still not clear why none of the methods suits your needs.

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
Engaged ,
Mar 30, 2016 Mar 30, 2016

Are you talking about checking the layer property - Opacity ?

Hearable? Checking the audio levels property value but that would depend on each audio file ?

If the layer is inactive at the current time, it's not there - so it can't be hearable or visible at that time.

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
Community Expert ,
Mar 30, 2016 Mar 30, 2016

If "enabled" is not good enough for you, you probably need to think about what you mean exactly with "visible".

You might think a layer is not visible, for example, when it is located somewhere behind the active camera, but it could still cast shadows, be used in effect parameters etc. and hence still have an influence on the resulting image.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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 05, 2016 Apr 05, 2016

Hmmm something that would tell me if a layer is active on TIMELINE at given time would be helpful enough. I need to check which layers are used/visible/hearable at given time.

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
Community Expert ,
Apr 05, 2016 Apr 05, 2016

What is the difference between activeAtTime() and being active on timeline at given time?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Engaged ,
Apr 05, 2016 Apr 05, 2016

reading.!

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
Advocate ,
Apr 05, 2016 Apr 05, 2016
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 07, 2016 Apr 07, 2016

Thanks!! Yes, I think this will be my base for that thing

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 08, 2016 Apr 08, 2016

does activeAtTime() concern main timeline time or parent comp timeline time? If first, is there a way to address main timeline time?

This for example is part of my timeline. I wrote a function, which returns that layer1 is active at given time, which is true. But also it returns, that few layers inside mainComps layer4 are active, which may be true if first part of my question is. Here's what it looks like inside comps starting with main comp:

Zrzut ekranu 2016-04-08 o 10.48.43.png

Zrzut ekranu 2016-04-08 o 10.46.40.png

Zrzut ekranu 2016-04-08 o 10.47.05.png

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 08, 2016 Apr 08, 2016

Zrzut ekranu 2016-04-08 o 11.33.08.png

when I check activeAtTime() of "kalenrzarz1" comp I get true for values 0 to 3.5, above is false. How is that corresponding to this timeline? I dont get it.

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 08, 2016 Apr 08, 2016

Yes, even though marker is set at 7:22 and layers starts at this moment (timeline marker on the picture) comp "kalendarz1".startTime returns 0

Zrzut ekranu 2016-04-08 o 12.32.20.png

Is there a way to address general mainComps timeline instead ?

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
Advocate ,
Apr 08, 2016 Apr 08, 2016

When the CTI (current time indicator) is at the very beginning of the comp, comp.time is 0, independantly of comp.displayStartTime

That's how it works.

Xavier

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 08, 2016 Apr 08, 2016
LATEST

Ok, I've managed to overcome this. While looping I check if curComp.containingComp.name === myMainComp.name, if yes then I create var tempTime = givenTime - parentCompLayerInMainComp.inPoint and check myLayer.activeAtTime(tempTime)

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