Jump to content
Sign in to follow this  
Atom

Write To A Parameter Using VEX?

Recommended Posts

HI All,

I know how to read a parameter using vex via the ch("my_parameter) function.
How do I write a result back to that parameter inside a vex snippet?

For instance this does seem to be valid vex code, it does not throw an error but it also does not work.

ch("my_parameter") = 1;
Edited by Atom

Share this post


Link to post
Share on other sites

you can't write to a parameter with VEX at the moment

you would have to store your value in attribute and then reference it in parameter using detail(), prim(), point() or vertex() expression

Share this post


Link to post
Share on other sites

What is actually odd is that I just watched Peter Quint do this in his latest crowd tutorial video. He was updating the existing force value with a *= not a direct assign. However, when I tried to do this with a parameter that I had added to the interface, as you mention, it does not work.

post-12295-0-89363900-1442329071_thumb.p

Share this post


Link to post
Share on other sites
Guest mantragora

If you look inside of popSteerWanderDOP => noise_force => local_noise, you will see that there is a snippetVOP with expression referencing VexPression field. The force value is modified after it's set in UI.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×