Answered
What is wrong with my script
if (app.project.activeItem instanceof CompItem) {
var comp = app.project.activeItem;
var selectedLayer = comp.selectedLayers[0];
if (selectedLayer) {
// Check if the layer has effects
if (selectedLayer.property("ADBE Effect Parade").numProperties > 0) {
var effectGroup = selectedLayer.property("ADBE Effect Parade");
var lastEffect = effectGroup.property(effectGroup.numProperties);
// Check if the last effect has checkboxes
if (lastEffect.numProperties > 0) {
var checkbox1 = lastEffect.property("Uniform"); // Change to the actual name
var checkbox2 = lastEffect.property("Individual"); // Change to the actual name
// Add expressions to the checkboxes
if (checkbox1 !== null) {
checkbox1.expression = 'value;';
}
if (checkbox2 !== null) {
checkbox2.expression = 'value;';
}
}
}
}
}
It gives me the error "cannot set expression or expressionEnabled on this property"
I am trying to add expression to the checkboxes of the last effect on the selected layer, you can manually add expressions to the checkbox but when I try to add it using script it doesnt work
I am trying to add expression to the checkboxes of the last effect on the selected layer, you can manually add expressions to the checkbox but when I try to add it using script it doesnt work
