on Dec 1, 2019 at 11:06:17 pm Last Edited By Lenny Mason on Dec 2, 2019 at 1:40:28 am
I posted another question that is related to this subject today, but I felt like this question needed a seperate post. I'm working on a 'script' to add grain to objects. So far I've write the following expression:
So, the shadow color is linked to a checkbox. If you turn the checkbox on, you can pick your own color. If you turn the checkbox off, the color will be adjusted to the fill color of a Color Overlay effect. This works fine, but I'd rather NOT use a color overlay. I'd rather make the color adjust to the original fill color of the layer, so the fill color that belongs to its content.
Obviously, I could change the code to:
c = content("Rectangle 1").content("Fill 1").color
But, that would mean that the shape has to be a rectangle. Is there another way to target the contents' Fill color?
If you want to use your new line for any shape(not just a rectangle), just use and index instead of the name. Something like:
c = content(1).content("Fill 1").color
If you want to find out exactly what index that is, I suggest installing "GimmePropPath" script form redefinery.com. Actually, if you want to continue doing scripting, you should definitely install that script.
Here's a link for a collection that contains GimmePropPath and a bunch of other really cool scripts. http://www.redefinery.com/ae/rd_scripts/