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

Access / Change Fill Effect Color from ExtendScript

New Here ,
Jun 20, 2016 Jun 20, 2016

Hey all,

This may be a pretty simple answer but I'm new to scripting, and I have a layer with the effect "Fill" and I would like to change the color value in my script.  Am I not accessing the effect correctly or I am putting in the wrong value?

app.project.item("Controls").layers("Colors").effect("Fill")(3) == '#ffffff';

So the comp is called "Controls", it has a solid inside it called "Colors" and the effect is "Fill".  I am trying to change it to white.

Thanks in advance!

TOPICS
Scripting
4.8K
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

Contributor , Jun 24, 2016 Jun 24, 2016

as far as I know, you always have to convert your hex values to rgb for extendScript.

where layer(1) is your solid and [1,1,1] is any RGB value (0-1 range) you want  --

app.project.activeItem.layer(1).property('Contents').property(3).property('Color').setValue([1,1,1]);

Translate
Contributor ,
Jun 24, 2016 Jun 24, 2016

as far as I know, you always have to convert your hex values to rgb for extendScript.

where layer(1) is your solid and [1,1,1] is any RGB value (0-1 range) you want  --

app.project.activeItem.layer(1).property('Contents').property(3).property('Color').setValue([1,1,1]);

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
New Here ,
Jun 24, 2016 Jun 24, 2016
LATEST

Cool, the RGB and the 'setValue' were the things I needed!  Thanks!

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