Hi Guys,
Is there a way to test for certain if a script is running inside the After Effects UI?
I am currently testing whether $.fileName contains "Scripts/ScriptUI Panels". It's pretty likely to work, but a user could of course run a script from this location using File->Run Script.
Is there a more robust method?
Thanks.
Ben.
Test if running with After Effects UI
Moderator: Paul Tuersley
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Do you mean test if the script is running in After Effects, or test if it's running as a dockable panel?
For the second you could use something like:
For the second you could use something like:
Code: Select all
if (myPal instanceof Panel) {
Thanks, Paul. That did the trick.Paul Tuersley wrote:Do you mean test if the script is running in After Effects, or test if it's running as a dockable panel?
For the second you could use something like:Code: Select all
if (myPal instanceof Panel) {
-Ben.