AE Moving layer error 'Can not “set value” with this property
In AE I'm getting the error 'Can not “set value” with this property, because the property or a parent property is hidden.'
When trying to move a layer like this:
var theComp = app.project.activeItem;
for (var i = 1; i <= theComp.numLayers; i++) {
var curLayer = theComp.layer(i)
if (!curLayer.parent) {
var layerPos = curLayer.transform.position.value;
$.writeln("pos: ")
$.writeln(layerPos[0] + ", " + layerPos[1] + ", " + layerPos[2])
var moveX = 285
var moveY = 239
curLayer.transform.xPosition.setValue(layerPos[0] - moveX);
}
}I am getting the same error as in https://community.adobe.com/t5/after-effects/after-effects-error-can-not-set-value-with-this-property-because-the-property-or-a-parent-property/td-p/10560938
even though it seems like I am using the solution from that answer.
Any idea what I might be missing?
