ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Why $.evalFile("./filename") does not work inside a function?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrei Popa
Why $.evalFile("./filename") does not work inside a function?
on Mar 27, 2018 at 1:34:37 pm

I have solved this problem by using new File($.fileName).parent + "/filename". But still wondering why it does work in the main part of the script, but not inside the onClick() function of one of my GUI button. Shouldn't the Dollar ($) object be global?

My Envato portfolio.

Return to posts index

Scott McGee
Re: Why $.evalFile("./filename") does not work inside a function?
on Mar 28, 2018 at 7:57:19 am

I have this issue when writing eval functions in After Effects.

wl = loc + city + "/weatherdata" + thisComp.layer(index+num).name.toLowerCase() +".txt";
wl += "/";

This is how I use it in after effects. I don't know if it's the same in extendscript as I've never had the needed to try it.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved