Creating a script to add control sliders based on selected properties, but get rid of duplicants.
{
var control=app.project.item(findIndex()).layer(1);
for (var i=0; i<x.length; i++)
{
var propsName=x.name;
if(x.canSetExpression)
{
var customMax=app.project.item(findIndex()).layer(1).effect.addProperty("ADBE Slider Control");
customMax.name="Inner "+propsName+" Value";
control.effect("Inner "+propsName+" Value").property("Slider").setValue(100);
var customMin=app.project.item(findIndex()).layer(1).effect.addProperty("ADBE Slider Control");
customMin.name="Outer "+propsName+" Value";
}
}
}
Above is the script I have right now, and it's purpose is to add slider controls to my control layer based on the currently selected properties. (x is acting as the selected properties here). The only issue I have, is I only want one set of sliders to control the same property in every layer, but this script creates individual sliders for each layer. So basically I need a way to filter through the property name to make sure it hasn't already been made.