Use this expression to make a child layer inherit its opacity from its parent layer while retaining its own editability. It simplifies the control of opacity in complex layer hierarchies, and it’s typically applied to the Opacity property.
(hasParent) ? (parent.opacity/100) * value : value;
Pro tip: Go to AEJuice Pack Manager – Expressions Pack to apply this expression in 1 click. Here are direct links for the latest plugin version: Windows / macOS