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

Extendscript fadeIn and fadeout image

Participant ,
Apr 07, 2022 Apr 07, 2022

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...

TOPICS
Error or problem , How to , SDK

Views

132

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

correct answers 1 Correct answer

Participant , Apr 07, 2022 Apr 07, 2022
setOpacity(logo_agent.inPoint.seconds+duration-2,100);

adding duration to inPoint solved problem 😃

Votes

Translate

Translate
Participant ,
Apr 07, 2022 Apr 07, 2022

Copy link to clipboard

Copied

setOpacity(logo_agent.inPoint.seconds+duration-2,100);

adding duration to inPoint solved problem 😃

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
Adobe Employee ,
Apr 07, 2022 Apr 07, 2022

Copy link to clipboard

Copied

LATEST

I think you're running into PPro's insistence that such changes happen on frame boundaries. 

 

 

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