user18258: Is there any shortcut where I can apply a 0% opacity at the beginning of the layer and 100% opacity after 10 frames after the beginning of the layer and can do the reverse as well?

user3161: You can do this with an expression on the Opacity property:
fade = framesToTime(10);
fadeIn = (time - inPoint) / fade;
fadeOut = (outPoint - time) / fade;
if (time < inPoint + fade) { ease(fadeIn, 0, 1) * value }
else if (time > outPoint - fade) { ease(fadeOut, 0, 1) * value }
else { value }

This expression will fade the layer from 0% to 100% Opacity across the first 10 frames, then fade from 100% to 0% on the last 10 frames of the layer. This is based on the layer's in and out points on the timeline.
Full tutorial (starts at 3:08):



Hope this helps!

18258: <p>Is there any shortcut where I can apply a 0% opacity at the beginning of the layer and 100% opacity after 10 frames after the beginning of the layer and can do the reverse as well?</p>
 3161: <p>You can do this with an expression on the Opacity property:</p>

<pre><code>fade = framesToTime(10);
fadeIn = (time - inPoint) / fade;
fadeOut = (outPoint - time) / fade;
if (time &lt; inPoint + fade) { ease(fadeIn, 0, 1) * value }
else if (time &gt; outPoint - fade) { ease(fadeOut, 0, 1) * value }
else { value }
</code></pre>

<p>This expression will fade the layer from 0% to 100% Opacity across the first 10 frames, then fade from 100% to 0% on the last 10 frames of the layer. This is based on the layer's in and out points on the timeline.</p>

<p>Full tutorial (starts at 3:08):</p>

<p><div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/BOPfs49VfLE?start=188"></iframe>
            </div></div></p>

<p>Hope this helps!</p>
