Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Gather a layer style gradient overlay colours data

Participant ,
Dec 18, 2018 Dec 18, 2018

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?

TOPICS
Scripting
735
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Dec 18, 2018 Dec 18, 2018

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

Translate
Advocate ,
Dec 18, 2018 Dec 18, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 18, 2018 Dec 18, 2018
LATEST

So there is no way... such a pity

Thanks Xavier!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines