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

Apply Expression: crash if using $value #296

Open
rodlie opened this issue Nov 1, 2024 · 1 comment
Open

Apply Expression: crash if using $value #296

rodlie opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working expressions help wanted Extra attention is needed svg export

Comments

@rodlie
Copy link
Member

rodlie commented Nov 1, 2024

If an expression uses the $value binding, Friction will crash if "Apply Expression" is applied. This issue also affects "Preview SVG" and "Export SVG" as they use "Apply Expression" during export. This does not affect video/image renders.

I assume something in the code tries to read value while generating value and we end up with a crash.

@pgilfernandez
Copy link

Could this workaround be easy to code while you find a real fix for it?:

Before exporting, you could read the "Bindings" and if $value exists you could get the name of the variable, delete that line and create a constant in "Calculate" with the variable name you took from "Bindings" and add manually the value it had at the moment of export...

Does it makes sense? is is possible and easy to code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working expressions help wanted Extra attention is needed svg export
Projects
None yet
Development

No branches or pull requests

2 participants