ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Script to set a Keyframe at current time

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Walter Soyka
Re: Script to set a Keyframe at current time
on Nov 2, 2017 at 4:54:53 pm

Try this:

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];
currentLayer.effect("HandShape")("Slider").setValueAtTime(MyComp.time,myValue = 5);
};
}else{
alert("At least one layer must be selected");
};


Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]