Free Function Friday Ep.32 – getKeysBasic

April 29th 2016 08:00:25am

Welcome to Free Function Friday. This short function is handy for basic copying of property keyframes. As part of the testing code section in the tutorial, I will show you quickly how to use this function to gather all the keyframes from a property and paste them onto another matching layer property. Basic is the key word here, we will not be getting in depth about the various keyframe easing options or the hold and roving options either. That requires much more time to discuss. This will give you a starting platform to mess with in the meantime.

You can view episode 15 of the After Effects ExtendScript Training series for thte advanced keyframe information.

Source Code:

function getKeysBasic(prop){
	var keyTimes = new Array();
	var keyVals = new Array();
	var keysLen = prop.numKeys;
	for(var k=1; k<=keysLen; k++){
		keyTimes.push(prop.keyTime(k));
		keyVals.push(prop.keyValue(k));
	}
	return [keyTimes, keyVals];
}
Checkout more:
Houdini Mardini Medieval
Expression Shorts Random Words Cycle
After Effects ExtendScript Training: Ep. 15 part 2
Null Swapper After Effects Script
X-Particles Rippling Particle Radius