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

Is there an expression for dynamically changing the startpoint of a layer relative to a keyframe?

Explorer ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

Hello,

 

I have an audio layer that I'd like to start at the same time as the first keyframe of a mask path titled "Mask 1" on a layer titled "Mask Movement". However, the position in time of the keyframes of the mask path are set to change based on the outpoint of a different layer using the following expression:

target = thisComp.layer("Target Layer");
targetMask = target.mask("Particular Path").maskPath;
targetMask

 

In case it helps, the purpose of the audio layer automatically changing its start position is because I'm creating multiple renders that have varying timings, so it would help to automate the process.

 

Thank you!

 

TOPICS
Expressions , How to , Scripting

Views

231

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

Community Expert , Mar 03, 2023 Mar 03, 2023

Enable time remapping for your audio layer and then apply this time remapping expression:

t = thisComp.layer("Mask Movement").mask("Mask 1").maskPath.key(1).time;
valueAtTime(time - t)

Votes

Translate

Translate
Community Expert ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

LATEST

Enable time remapping for your audio layer and then apply this time remapping expression:

t = thisComp.layer("Mask Movement").mask("Mask 1").maskPath.key(1).time;
valueAtTime(time - t)

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