Copy link to clipboard
Copied
I need simply fadein logo on start and fadeout at end
seq.videoTracks[5].insertClip(logo_agent_media,5);
var logo_agent = seq.videoTracks[5].clips[(seq.videoTracks[5].clips.numItems - 1)]
end = new Time();
end.seconds = 172;
logo_agent.end = end;
function setOpacity(time,val) {
prop = logo_agent.components[0].properties[0];
prop.setTimeVarying(true);
prop.addKey(time);
prop.setValueAtKey(time,val,true);
}
if i set time to logo_agent.start.seconds:
setOpacity(logo_agent.start.seconds,0);
setOpacity(logo_agent.start.seconds+2,100);
that doesn't not work for some reason, so i've tried inPoint
setOpacity(logo_agent.inPoint.seconds,0);
setOpacity(logo_agent.inPoint.seconds+2,100);
Works well, but it's not exaclty +2 seconds (2.38)
logo_agent.inPoint.seconds = 3599.971375
logo_agent.outPoint.seconds = 3604.93466666667
That looks like not a seconds actualy, but in documentation it says that this should be seconds...
Okay, that's not a big deal, 2.38 instead of 2, but how now to make fade out at the end?
setOpacity(logo_agent.end.seconds-2,100);
that doesn't work, looks like i need somehow to use inPoint value and add somehow it's duration, but how i can calculate that since it's not a seconds...
setOpacity(logo_agent.inPoint.seconds+duration-2,100);
adding duration to inPoint solved problem 😃
Copy link to clipboard
Copied
setOpacity(logo_agent.inPoint.seconds+duration-2,100);
adding duration to inPoint solved problem 😃
Copy link to clipboard
Copied
I think you're running into PPro's insistence that such changes happen on frame boundaries.