Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution error from After Effects #28

Open
JRammos29 opened this issue Jun 24, 2021 · 2 comments
Open

Execution error from After Effects #28

JRammos29 opened this issue Jun 24, 2021 · 2 comments

Comments

@JRammos29
Copy link

JRammos29 commented Jun 24, 2021

Hi,
Thanks for this package. It's very useful.

I'm developing an AE Extension and it's working normally when I put the project in the extension folder without converting the .jsx files to .jsxbin.

When I convert to .jsxbin (and renaming the files to .jsx), I can execute the .jsxbin from the VSCode (with Adobe Script Runner), it is executed properly.
But when I try to execute the same .jsxbin scripts from within the After Effects 2021 - Version 18.2 (with CSInterface), they don't work.

For instance, in the code below I can execute via VSCode, but when I try to execute the jsxbin from After Effects, the alert("Hostscript.jsx"); is showed up, and I get an "null is not an object" error from the line var ROOT_DIR = File($.fileName).parent.parent.fsName; and the application breaks.

UPDATE: Seems that $.fileName is returning a number instead of a string path for File() and hence returning a null object. But I don't understand why this occurs only from AE and not from VS Code.

Any clues on what can be the problem?

alert("Hostscript.jsx");

function message(msg){
    var ROOT_DIR = File($.fileName).parent.parent.fsName;
    alert(msg + " - " + ROOT_DIR);
    // alert(msg);
}
message("message");
@runegan
Copy link
Owner

runegan commented Aug 18, 2021

Hi! Sorry for late reply! Have you figured this out?
I'm guessing there is something about the context which the script is run. I don't have any experience with extensions, maybe they execute the script differently that how the scripts are normally run?

@JRammos29
Copy link
Author

Hi.
I already tried different ways of convert to jsxbin but none of them worked.
And I think that there's no difference between the execution, there are extensions using jsxbin.
I still can't figure out what it's missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants