-
Attaching null script that jumps null above new parent, then…..
Hi everyone,
Need some help in finishing my script. I have a script that when I select multiple layers and run the script. It will bind all layers to the null. But now trying to have the parenting null jump above the last selected layer, and match the layers duration. I made a test one separate from my working script. I get this error: “Unable to call “setParentWithJump” because of parameter 1. 3 is not of the correct type. Here is the code so far:
if (comp instanceof CompItem){
props = comp.selectedProperties;
var layNum = comp.selectedLayers[0].index; // number of designated chosesn layer
var selLay = comp.layer(layNum); // actual layer object with the proper index.
var inLay = comp.layer(layNum).inPoint;
var outLay = comp.layer(layNum).outPoint;
var inOutlay = Math.abs(inLay - outLay);
var newNull = comp.layers.addNull([inOutlay]).moveBefore(selLay);
$.sleep(1000)
comp.layer(layNum).setParentWithJump(layNum -1);