Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Time remap multiple keyframe between markers

$
0
0

Hello to all!

First of all, just want to apologize for my basic English. I will try to explain as clearly as I can.

I have a complex animation layer, which is precompose in another comp which I want to run this animation with markers. If the animation is comprised of two key frames is no problem. You can control the animation of a number of ways, such as using valueAtTime() or linear() ease() function.But when more than two keyframes need to allocate between the two markers is not so easy problem to solve. I tried to change a little Dan Ebberts'(by the way, thanks to him for all!) expression, but still did not work.

 

n = 0;
m = thisComp.marker;if (m.numKeys > 0){  n = m.nearestKey(time).index;  if (m.key(n).time > time) n--;} if (n==1){
mStart = m.key(n).time
mDelta = ((m.key(n+1).time - mStart)/numKeys)for(i = 1; i <= numKeys-1; i++){  kVal1 = valueAtTime(key(i).time)  kVal2 = valueAtTime(key(i+1).time)  linear(time, mStart+(mDelta*i), mStart+(mDelta*(i+1)), kVal1, kVal2);   }}else{0}

 

Image for illustration

expFaill.jpg

 

If anyone can find a desire to understand problemme guide me in the right direction. Thanks in advance.


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>