-
Extendscript setting Trapcode form property value via script?
Having an issue with trapcode form / setting a value for a specific property via script, and wondering if anyone knows how to resolve. Most of the other properties I can set fine, but this one: (effect is layer.effect(“Form”))
effect.property(“Disperse F2”).setValue(100);
Throws a “This property’s propertyValueType is PropertyValueType.NO_VALUE
Yet others, i.e.
effect.property(“Random Seed F2”).setValue(1234);
works fine
Anyone have an idea how to resolve? Or how I can get the name of the actual property
Also if I select the property directly, and run a function to print the selected property data, i.e. the code below, it prints “Disperse F2 1”, which should be the property I’m targeting, and it’s showing a PropertyValueType.OneD — So I’m quite confusedfunction printSelectedPropertyData(layer) {
var myProps = layer.selectedProperties;
var myProp;
var n;
for (var i = 0; i < myProps.length; i++){
myProp = myProps[i];
if (myProp.propertyType == PropertyType.PROPERTY){
switch(myProp.propertyValueType){
case PropertyValueType.OneD:
n = 1;
break;
case PropertyValueType.TwoD:
case PropertyValueType.TwoD_SPATIAL :
n = 2;
break;
case PropertyValueType.ThreeD:
case PropertyValueType.ThreeD_SPATIAL:
n = 3;
break;
case PropertyValueType.COLOR:
n = 4;
break;
default:
n = 0; // just in case
break;
}
alert (myProp.name + " " + n);
}
}
}