Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

How do I check the interpolation type of a keyframe?

$
0
0

So in my code, I run a check to see what type of interpolation a keyframe has.

Then later I want to use an if statement to check to see if the interpolation was linear or not, and if it isn't I want to run a certain line.

 

Here's my code right now:

"lays" is my variable for selectedLayers btw

 

                   var opaTime=lays[0].opacity.keyTime(1);

                   var opaValue=lays[0].opacity.keyValue(1);

                   var opaEaseIn=lays[0].opacity.keyInTemporalEase(1);

                   var opaEaseOut=lays[0].opacity.keyOutTemporalEase(1);

                   var opaLinInCheck=lays[0].opacity.keyInInterpolationType(1);

                   var opaLinOutCheck=lays[0].opacity.keyOutInterpolationType(1);

                 

                   opaAdd.setValueAtTime(opaTime+frameSet,opaValue);                 

                   if(!opaLinInCheck==KeyframeInterpolationType.LINEAR && !opaLinOutCheck==KeyframeInterpolationType.LINEAR)

                  { opaAdd.setTemporalEaseAtKey(1, opaEaseIn, opaEaseOut);}

 

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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