Expression fade in/out with marker

New Here ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

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

Views

67

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

LATEST

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

 

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

 

and so on.

 

Mylenium

Likes

Translate

Translate

Report

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