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

Expression fade in/out with marker

New Here ,
May 09, 2022 May 09, 2022

Hello,

 

Can someone help me with changing the expression below, I tried some things but didn't work:

so the expression below is to do a fade in/out on based on markers on the layer itself. Can someone tell me how to customize to fade in/out on another layer?

 

fadeFrames = 30; m = 0; t = time;
if (marker.numKeys > 0) {
m = marker.nearestKey(time).index;
tag = marker.key(m).comment;
if (tag == "In") { t = marker.key(m).time - time }
else if (tag == "Out") { t = time - marker.key(m).time }
linear(t, 0, framesToTime(fadeFrames), value, 0)
} else {
value
}

TOPICS
Expressions
425
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
New Here ,
May 09, 2022 May 09, 2022

to be clear, i want that it is fading in/out based on markers on another layer (for example a null layer)

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
LEGEND ,
May 09, 2022 May 09, 2022
LATEST

You simply reference the other layer using the common established syntax:

 

thisComp.layer("XYZ").marker.key(m).comment

 

and so on.

 

Mylenium

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