I tried to find solution for this error in the Adobe Forum & Google too, but it didn't help in following situation.
I am getting the error mentioned in the Question for different scenarios.
1: When Position attribute is separated for the Layer, it throws that error. If I disable the "Separate Dimensions" for Layer, it won't throw the error anymore.
2: It also throw the same error for Audio files with .wav format.
It throws error at following line:
layer.transform.position.setValue([layerPos[0] - moveX, layerPos[1] - moveY, layerPos[2]]);
Following is the supporting code for reference.
varmoveX= (oldCompWidth-newWidth) /2;
varmoveY= (oldCompHeight-newHeight) /2;
varlayerPos=layer.transform.position.value;
if (!layer.parent) {
try {
//code
layer.transform.position.setValue([layerPos[0] -moveX, layerPos[1] -moveY, layerPos[2]]);
} catch (x_x) {
$.writeln([
x_x.message,
x_x.line,
$.stack,
layer.name,
i,
].join("\n"));
} finally {
//code
}
}
Highly appreciate if anyone can give some insight on this. Thank you.
[Moved to After Effects to After Effects Scripting. MOD]