Skip to main content
Participating Frequently
September 7, 2023
Answered

Making precomps that have distinct children that inherit parts of the original parent

  • September 7, 2023
  • 1 reply
  • 219 views

Hi there,

 

I'm wondering if you can make a precomp – let's say a rectangle - that has many children that are also rectangles with the same height and width. I want to be able to change the color of these children independently (or add masks on top of whichever ones I choose), so that each child looks distinct from all of the other children. The catch is that if I want to change a property of the parent, like its width, I want all of the children to update accordingly WITHOUT changing their individual colors and masks. 

 

Is this possible?

 

Thanks!

Matt 

This topic has been closed for replies.
Correct answer Rick Gerard

If you have a Shapes 1 comp and a duplicate of it called Shape 2 (a duplicated pre-comp) in the Project Panel, each one of those is unique. Changing the color of layers on some of the layers in Shapes 1 comp will not change the colors in Shapes 2 comp. If you have another comp called Rectangle Colors in the Project Panel, and that comp has been added to Shapes 1 and Shapes 2 as a nested comp (a pre-comp), then changing the colors in the Rectangle Colors comp will change the colors in both. 

 

If you need to get more complex than that, you can use an expression that looks something like this.

comp("Rectangle 1 Comp").layer("Controllers Null").effect("Color Control")("Color")

 

Probably the best place to start figuring out what controls what and how to link their properties is the Composition/Composition Flowchart (Shift + Ctrl/Cmnd + F11) . Just expand the flow chart and look for the layers you want to be common, then nest select them and put them in a separate comp that you can nest in the copies of your main comp.

 

Did you follow that? 

 

1 reply

Rick GerardCommunity ExpertCorrect answer
Community Expert
September 7, 2023

If you have a Shapes 1 comp and a duplicate of it called Shape 2 (a duplicated pre-comp) in the Project Panel, each one of those is unique. Changing the color of layers on some of the layers in Shapes 1 comp will not change the colors in Shapes 2 comp. If you have another comp called Rectangle Colors in the Project Panel, and that comp has been added to Shapes 1 and Shapes 2 as a nested comp (a pre-comp), then changing the colors in the Rectangle Colors comp will change the colors in both. 

 

If you need to get more complex than that, you can use an expression that looks something like this.

comp("Rectangle 1 Comp").layer("Controllers Null").effect("Color Control")("Color")

 

Probably the best place to start figuring out what controls what and how to link their properties is the Composition/Composition Flowchart (Shift + Ctrl/Cmnd + F11) . Just expand the flow chart and look for the layers you want to be common, then nest select them and put them in a separate comp that you can nest in the copies of your main comp.

 

Did you follow that? 

 

mrossi206Author
Participating Frequently
September 7, 2023

Yes, that makes sense, thank you!