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

Script Assert - Dynamic Parameters are not found #563

Closed
jbojbo opened this issue Feb 20, 2021 · 4 comments
Closed

Script Assert - Dynamic Parameters are not found #563

jbojbo opened this issue Feb 20, 2021 · 4 comments

Comments

@jbojbo
Copy link

jbojbo commented Feb 20, 2021

I always get the following error-message:

The following parameters used in the script were NOT found on the JSON "parameters" object of your script asset file:///c:/hello.jsx
            t, t
        Please set defaults in your JSX script (see documentation) or copy the following placeholder JSON code snippet and replace the values with your own:
            "parameters" : [
                {
                    "key" : "t",
                    "value" : null
                }
                {
                    "key" : "t",
                    "value" : null
                }
            ]
        Remember to always use a fallback default value for any use of the NX object to have the ability to run this script on After Effects directly. Example:            const dogName = NX && NX.get("doggo") || "Doggo";

my json:

{
    "assets":[
        {
            "src":"file:///c:/hello.jsx",
            "type":"script",
            "parameters":[
                {
                    "type":"string",
                    "key":"compName",
                    "value":"Captain Sparkles"
                },
                {
                    "type":"string",
                    "key":"layerOne",
                    "value":"Captain layer"
                },
                {
                    "type":"string",
                    "key":"title",
                    "value":"Captain title"
                }
            ]
        }
    ]
}

my jsx:

const a = NX.get("layerOne")

function Fiona(compName, layerName, title,solidTitle) {
    var newComp = app.project.items.addComp(compName, 1920, 1080, 1, 10, 25);
    var newLayerSo = newComp.layers.addSolid([100, 100, 0], 'Distortion', 600, 600, 1.0);
    var newLayer = newComp.layers.addText(title);
}
app.beginUndoGroup("code")
Fiona("compName" , "layerName", NX.get("title"),"")
app.endUndoGroup 

I know that this is not the best example, but what i really don't understand is,
that no matter what key i wanted to get. It always tells me that i should insert 't'.

And if i really add 't' as a key to my json, the error-message is gone.
So for some reason the parser is always looking for a 't'.

Tested with the latest version of nexrender-cli.

@jbojbo
Copy link
Author

jbojbo commented Feb 21, 2021

important info: but the video gets rendered anyway.

@brassel
Copy link
Contributor

brassel commented Feb 23, 2021

Yes, I second that! It drives me nuts as well! Until finding time to fix it, our scripts do also have parameter "t" everywhere...
Might be your step into contributing, @jbojbo, what do you think? :o)

@inlife
Copy link
Owner

inlife commented Mar 8, 2021

Hey, @dukuo, I would really appreciate your thoughts on this one as well! Maybe you could help us understand what might be going wrong here.

@stale
Copy link

stale bot commented May 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

3 participants