-
Trouble scripting Injecting expression on “Rotate”
Hello friends,
i’m trying to simply my workflow…so i tried to create a script to inject a expression on Rotation property of selected layers (not just only one)Unfortunately i’m very bad at this, and i frequently get lost in expressions reference guides 🤣
Can please some good soul help me?
The best i could do:
(function () {
if(app.project.activeItem == null || !(app.project.activeItem instanceof CompItem)) {
alert(“please select a valid item”);
return false;
}
var myComposition = app.project.activeItem;
var myLayer = myComposition.layer[0];
myLayer.property(“ADBE Transform Group”).property(“ADBE Rotate”).expression = ‘value – parent.transform.rotation’;
})();
My plan is to use this script at KBar
Thanks in advance