Copy link to clipboard
Copied
I am working on an ae script (jsx format) and would like to apply an exponential scale on a layer (same than in keyframe assistant). What is the command to use ?
Thanks !
This seems to work:
var myComp = app.project.activeItem;
var myLayer = myComp.layer(1);
for (var i = 1; i <= myComp.numLayers; i++){
myComp.layer(i).selected = false;
}
var myProp = myLayer.property("Scale");
myProp.setSelectedAtKey(1,true);
myProp.setSelectedAtKey(2,true);
app.executeCommand(app.findMenuCommandId("Exponential Scale"));
Copy link to clipboard
Copied
Once you set up the appropriate context (with just the scale keyframes selected) you could try:
app.executeCommand(app.findMenuCommandId("Exponential Scale"));
Copy link to clipboard
Copied
Why would you even bother looking up the command? You can just as easily simply implement a Math.pow() or Math.exp() in your own code.
Mylenium
Copy link to clipboard
Copied
And what formula would you then use for, eg, de-scale from 3.4 to 2.2 ? Thanks
Copy link to clipboard
Copied
This seems to work:
var myComp = app.project.activeItem;
var myLayer = myComp.layer(1);
for (var i = 1; i <= myComp.numLayers; i++){
myComp.layer(i).selected = false;
}
var myProp = myLayer.property("Scale");
myProp.setSelectedAtKey(1,true);
myProp.setSelectedAtKey(2,true);
app.executeCommand(app.findMenuCommandId("Exponential Scale"));
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more