Skip to content

Execution error from After Effects #28

@ghost

Description

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");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions