0

The Setup

- PreComp1
-- PreCompLayer1
--- simpleRectangleLayer

- Main Timeline
-- layer1
--- [PreComp1]
-- layer2
--- [PreComp1]

Question

Using only scripting is it possible to modify the inside of a single precomp instance? eg. change the color of layer1.PreComp1.simpleRectangleLayer

2

Scripting can do anything you can do with the UI. This isn't something you can do with the UI, so no, you can't do it with scripting. If you change the colour of precomp1.layer1.simpleRectangleLayer then it changes for all instances of precomp1. That's how precomps work.

You'd have to make a script that would do the same thing you'd have to do with the UI—duplicate precomp1 to make precomp2, change the colour of the layer and replace the source of layer2 to precomp2. I did make a script that does this kinda. It lets you duplicate a layer and make a duplicate of its source so that it can be changed. Available (free, open source) here (caveat: there are some bugs I've never found the time to iron out).

  • That's cool, thanks! I also figured out that I can use a hue/saturation effect on the precomp to make the background color change. Since the stroke is black it doesn't change at all. – Jacksonkr Dec 12 '18 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.