Script to apply expression to all "Color" properties on selected layer

What type of scripts do you need?

Moderator: byronnash

Post Reply
Posts: 4
Joined: February 28th, 2017, 4:04 am

January 19th, 2018, 10:23 am

Dear masterminds,

i am currently creating a template to be reused by a small collective of motion designers. I need a small script that will apply a specified expression to any "Color" Property on the selected shape layer - so basically it would have to iterate through all of the properties and find the "Color" ones and then apply the expression to it.

Is this generally possible? Is there any direction you can point me to? 

Thank you so much in advance

Kind regards

User avatar
Posts: 4
Joined: August 16th, 2019, 10:53 am

August 28th, 2019, 11:05 am


If you only want to apply it to a stroke or fill property color you can use a function that search the exact Match Name ( "ADBE Vector Stroke Color" for stroke and "ADBE Vector Fill Color" for fill).

But if you want to apply the expression to another color property you can use that same function so you can get all "Color" properties (I do not recommend this because maybe you have a custom property or property group named "Color" and you can get a error).

I think is better to make an Array of Match Names color properties and then apply the expression to it. It's pretty simple that way.
Post Reply