Skip to main content
Participating Frequently
June 29, 2017
Question

Layer OutPoint doesn't update correctly when source is changed.

  • June 29, 2017
  • 2 replies
  • 717 views

I am using a script to change the source of my layers and different source files have different lengths.

In the composition I am using an automatic volume fade-in fade-out with the following expression:

if (time< (this_layer.in_point  +0.5))               { (1.0 - ((time-this_layer.in_point)/.5)) * [-32.0,-32.0];  }

else if (time> (this_layer.out_point - 0.5))         { ( (time-(this_layer.out_point-.5))/.5)  * [-32.0,-32.0];  }

else { [0.0, 0.0] }

g (for a .5 second fade at the beginning and the end of the layer ). However, when I replace the footage with a different one by script, the OutPoint is not updated and therefore the expression doesn't produce the desired fade-out at the end of the layer.

When I reload the project/purge the cache, or close and reopen AE the outPoint is not changed and holds an incorrect value.

ONLY when I grab the end and extend or shorten the layer a couple of frames, the value gets updated correctly and the fade is perfect.

The inPoint, ie the Fade-In works nicely. I've tried other expressions from the forum, same problem.

Could anybody give me a pointer how I can get around this issue?

Thanks in advance.

yp

This topic has been closed for replies.

2 replies

hall123456
Known Participant
February 10, 2023

This is still a bug! where .outPoint is not respected.

ShiveringCactus
Community Expert
Community Expert
February 11, 2023

Are you sure it's a bug?  I've been using Dan Ebberts expression for years without an issue:

fadetime = 0.2;
st = thisLayer.startTime;
ed = thisLayer.outPoint;
if (time > st+fadetime) {
	linear(time,ed-fadetime,ed,100,0);
} else {
	linear(time,st,st+fadetime,0,100);
}

 Or is it only a bug with scripts?

And these days would Responsive Design - Time solve the problem more elegantly?

Henrique -- TMMW
Inspiring
June 29, 2017

Hi yp

You could use your script to update the outpoint too.

Just use the  ".duration" of the item you imported to set the outpoint of the layer in

the composition. Does that make sense?

Cheers

Henrique

Henrique \ TMMWClips Exporter | Text Replacer | Selector for Premiere Pro | Thumbs Up
yogiparAuthor
Participating Frequently
July 19, 2017

Hi Henrique,

source.duration worked miracles! Thank you very much for the tip.

cheers,

yp