Hello,
i was wondering if its possible to create a script or something that when executed would set a keyframe at the current time for the currently selected/highlighted property (selected in timeline or in effects controls)
Obviously the idea is to then hotkey that script and be able to quickly set keyframes for any property without having to always mouseclick the keyframe button or fake value change to trigger autokey whenever dealing with keyframing properties that dont have inbuilt hotkeys for it like pos/rot/scale/opacity do.
Unless iam missing something (i went thru the hotkey config file and couldnt find anything relevant), this would greatly speed up any more complex keyframing, cant believe its not already part of ae by now
Set keyframe at current time for highlighted property?
Moderator: byronnash
-
- Posts: 320
- Joined: June 26th, 2004, 10:01 am
- Location: Folsom, CA
- Contact:
Something like this should work:
Dan
Code: Select all
var myComp = app.project.activeItem;
if (myComp && (myComp instanceof CompItem)){
var myProps = myComp.selectedProperties;
if (myProps.length > 0){
for (var i = 0; i < myProps.length; i++){
if (myProps[i].canVaryOverTime){
myProps[i].addKey(myComp.time);
}
}
}else{
alert("No selected properties.");
}
}else{
alert ("No comp selected.");
}
Dan