Hey Sam. Here's a small script that does what you need.
To make it work, you'll have to select bunch of compositions in project panel first, since there's no way to get open comps in AE, and there can only be one active composition.
Anyways, hope this helps.
Feel free to change first free parameters to your needs. Cheers..
(function() {
/*. MODIFY THESE VALUES. */
var targetLayerIndex = 10;
var targetProperty = "opacity"; // anchorPoint, position, scale, rotation, opacity
var value = 80;
// Get selected compositions
var selectedComps = getSelectedComps();
if (!selectedComps) {
// Abort if no compositions are selected
return alert('Please select some compositions');
}
app.beginUndoGroup("Set Value");
var composition, layer, property;
for (var i = 0, il = selectedComps.length; i < il; i++) {
composition = selectedComps;
if (composition.numLayers < targetLayerIndex) {
// Target index exceeds number of layers in composition
continue;
}
property = composition.layer(targetLayerIndex)[targetProperty];
if (!property) {
// Target layer does nt have requested property
alert('Undefined property "' + targetProperty + '"');
}
if (property.numKeys > 0) {
// If property contains keyframes, new value will be set at current composition time
property.setValueAtTime(composition.time, value);
} else {
property.setValue(value);
}
}
app.endUndoGroup();
function getSelectedComps() {
var compositions = [];
var selection = app.project.selection;
for (var i = 0, il = selection.length; i < il; i++) {
if (selection instanceof CompItem) {
compositions.push(selection);
}
}
if (compositions.length === 0) {
return null;
}
return compositions;
}
})();