Copy link to clipboard
Copied
Is it possible to call another function, or refer to another variable, from within the JSX footage file?
For example, I'd like to achieve this:
{
"opacity": 0.5,
"blend":function(x){
return x * WHAT.opacity;
}
"mix": function(x,y) {
return WHAT.blend(x) + WHAT.blend(y);
}
}
Where `WHAT` is what I'm looking for to refer to the other contents of this JSX file.
Copy link to clipboard
Copied
A JSON file is just data. It doesn't evaluate by itself. Of course you could read the relevant parts and have them run via eval() in the expression, but writing those explicit references would likely take more code than just writing the functions natively in the expression editor, so it's kinda moot.
Mylenium
Copy link to clipboard
Copied
I'm referring to the JSX import and call functionality as described here and here
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more