ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Script to set a Keyframe at current time

COW Forums : Adobe After Effects

Respond to this post   •   Return to posts index   •   Read entire thread

Oscar Gomez
Script to set a Keyframe at current time
on Nov 1, 2017 at 11:51:43 pm

Hi all! I need some help creating a script to add a keyframe on a selected layer.

I already have one that works but this only works for position, rotation, scale or opacity. I need this script to add the keyframe on a slider control in the selected layer called HandShape.

Here's the script I got:

var MyComp = app.project.activeItem;
if(MyComp && MyComp.selectedLayers.length > 0){
for(var i = 0 ; i < MyComp.selectedLayers.length; i++){
var currentLayer = MyComp.selectedLayers[i]; = "rotation").setValueAtTime(MyComp.time,myValue = 5);
alert("At least one layer must be selected");

Thanks for taking the time to read this, hopefully someone out there can solve it!

Posts IndexRead Thread 

Current Message Thread:

© 2019 All Rights Reserved