-
Expression that checks if Effect on another layer is present
I’m trying to create an effect that sets the position of a lens flare to the location of someone’s pupil if you’ve run the Detailed Face Tracker on a layer below – however, I’d like the expression to check whether the Face Tracker effect exists first, and if not, give a different default result.
So I think I need an if/else to check whether that layer has the effect?
I was thinking something like this where the this expression is on the location of a lens flare on a Black Solid, above a layer “SOURCE”. Desired output is the Right Pupil location (which works on its own) if the Source layer has the “detailed Face Tracker” effect applied – but will return [0,0] if no effect is present.
Thank you for your help!
if(thisComp.layer("SOURCE").effect("Face Track Points")("Right Pupil"))==null){[0,0]}else{thisComp.layer("SOURCE").effect("Face Track Points")("Right Pupil")}
– Daniel Hashimoto
\”Action Movie Dad\”