Copy link to clipboard
Copied
Hi!
I don't know if this is possible but I would need to gather this data:

I need to gather those 4 gradient points values. Is that possible?
#target aftereffects
{
var theComp = app.project.activeItem;
var theLayer = theComp.selectedLayers[0];
alert(theLayer.layerStyle.gradientOverlay.colors);
}
This exists, but I don't know which one the next step would be. I need to get inside colors, but "value" gives me an error. How could I do it?
Scripts can read property values only if their propertyValueType is not PropertyValueType.CUSTOM or PropertyValueType.NO_VALUE.
For these exceptionnal types, there is no javascript object designed to hold the actual value.
If you inspect a CUSTOM / NO_VALUE property in the estk data browser, you see: value = null, but if you try to access the value by script (myProp.value), you get an error.
Gradients fall in the wrong category (propertyValueType is : PropertyValueType.NO_VALUE.).
Xavier
Copy link to clipboard
Copied
Scripts can read property values only if their propertyValueType is not PropertyValueType.CUSTOM or PropertyValueType.NO_VALUE.
For these exceptionnal types, there is no javascript object designed to hold the actual value.
If you inspect a CUSTOM / NO_VALUE property in the estk data browser, you see: value = null, but if you try to access the value by script (myProp.value), you get an error.
Gradients fall in the wrong category (propertyValueType is : PropertyValueType.NO_VALUE.).
Xavier
Copy link to clipboard
Copied
So there is no way... such a pity ![]()
Thanks Xavier!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more