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

Set inPoint with expression?

Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Hi,

Is there some way to set the in and out points of a layer in an expression?

thisLayer.inPoint seems to be read-only...

Thanks,

S

TOPICS
Expressions

Views

800

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
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

No, expressions can't change anything except the value of the property hosting the expression. Depending on what you're trying to do, you might be able to do it with time remapping and/or opacity expressions.

Scripting has access to in and out points (not sure if that helps).

Dan

Votes

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
Community Beginner ,
Jan 23, 2024 Jan 23, 2024

Copy link to clipboard

Copied

You may try to timeremap the layer and then implement a keyframe delay which you could control then via expression?

Votes

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
Community Expert ,
Jan 23, 2024 Jan 23, 2024

Copy link to clipboard

Copied

Expressions cannot control any property that does not have a stopwatch to set a keyframe.

 

You can use time and a simple if statement to animate opacity. If you want a layer to become visible at 60 frames into the timeline, you can use something like this:

 

t = time;
st = framesToTime(60);
if (t < st)
	0;
else
	100;

 

I use layer in and out points all the time to automate animations. This expression will do a 15-frame fade starting at the in point of a layer and then start a 60-frame fade out just before the layer ends. 

 

t = time - inPoint;
dur = outPoint - inPoint;
frmsIn = framesToTime(15);
frmsOut = framesToTime(60);

fadeIn = linear(t, 0, frmsIn, 0, 100);
fadeOut = linear(t, dur - frmsOut, dur, 0, -100);
fadeIn + fadeOut;

 

Maybe those ideas will give you some ideas of how to automate things and save time.

Votes

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
Enthusiast ,
Jan 23, 2024 Jan 23, 2024

Copy link to clipboard

Copied

LATEST

Or using 2 markers:

m1 = marker.key(1).time;
m2 = marker.key(2).time;

time >= m1 && time <= m2 ? 100 : 0

screenshot.png

 

 

Votes

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