ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Opacity based on NULL position NOT working due to parenting

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Billy Woodward
Opacity based on NULL position NOT working due to parenting
on Feb 1, 2019 at 8:43:49 pm

Hey there - ran into a rather unsavory issue while trying to put together a simple MacOS Dock style animation. I have text layers that are parented to a null - that null has an expression affecting it's scale, which in turn drives the text and another layer. My issue is that I'm trying to have the opacity of the text layer be driven separately by the separate 'mouse layer' null - only issue is that it does not work unless I unparent it from the other null. Any ideas?

This is the expression I'm using to drive the opacity

dMax = thisComp.layer("mouse layer").effect("OpacDistMAX")("Slider");
dMin = thisComp.layer("mouse layer").effect("OpacDistMIN")("Slider");
d = length(thisComp.layer("mouse layer").position,position)-parent.position;
ease(d,dMin,dMax,thisComp.layer("mouse layer").effect("OpacityMAX")("Slider"),thisComp.layer("mouse layer").effect("OpacityMIN")("Slider"))


Return to posts index

Dan Ebberts
Re: Opacity based on NULL position NOT working due to parenting
on Feb 2, 2019 at 12:58:26 am

I'm confused. A layer's opacity shouldn't be affected by parenting. There must be something else going on...


Dan



Return to posts index

Emre Anil
Re: Opacity based on NULL position NOT working due to parenting
on Feb 2, 2019 at 11:55:46 pm

Try deleting "-parent.position" at the end of the 3rd row from your expression.

You don't need to subtract the parent's position for the distance because the child's position is always relative to the parent. So if you set child's position to x: 0, y: 0 it's gonna be on top of the parent..


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]