1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[AE]グラフエディターの動きを他のプロパティーにリンクしたい時

Last updated at Posted at 2020-05-15

時々あるよね!?

例えばスケールにキーフレームを設定して、グラフエディターで速度いじった後に、他のレイヤーも全く同じ表現したいけど、値が違うから難しい時。。
そんな時はみんな、目視でグラフに近い感じで合わせていると思うけど、そんな事はもうしないで大丈夫!
私が作ったエクスプレッション使ってみて!
これで解決!!

グラフエディタの動きを同じにするエクスプレッション

まず説明すると
targeに基となるキーフレームを打ったプロパティに設定する。
setValに初期の値
プロパティのバリューに最終的な値を入力

これだけでOKです。
肝心なエクスプレッションはこちら

target = thisComp.layer("Animation").effect("AKey")("スライダー");
setVal = 500;

function t (t,a,b){
	target = t;
	tempa = a;
	tempb = b;
	a = Math.abs(tempa-tempb);
	result = Math.abs(target-tempa);
	return result/a*1
}

t = t(target,target.key(1),target.key(3));
linear(t,setVal,value)	

スケールなどの二次元の場合はlength()使えばOK!

function t (t,a,b){
    target = length(t);
    tempa = length(a);
    tempb = length(b);
    a = Math.abs(tempa-tempb);
    result = Math.abs(target-tempa);
    return result/a*1
}

このエクスプレッションの面白いとこ

要はキーフレームの動きを0~1に変換しているだけです。
それをlinear()メソッド使って表現しているだけ

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?