Hi
I tried to do a setup today where a callback script would do something based on the previous and new value of the parameter. Since evaluating the parameter returns the new value, I come up with a contraption where I have a second hidden parameter which sole job is to track: on callback evaluation, get the previous exposed parameter former value and receive the new value on the last execution of the callback.
This is hacky, not scaling well and while works ok for one parameter as I started to think I might need something similar for multiple parameters I was like… “Hold up”… So…
Is there a proper way the old and new value of a parameter. If not is there another proper way to track the old values that lives in the asset?
Thanks
Pedro
Callbackscript. Know previous value.
1347 2 0- probiner
- Member
- 339 posts
- Joined: June 2013
- Online
- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
- jpparkeramnh
- Member
- 178 posts
- Joined: Jan. 2013
- Offline
Use the cachedUserData method on a node to store intermediate values(or userData if you want it to be saved with the HIP):
https://www.sidefx.com/docs/houdini/hom/nodeuserdata.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/hom/nodeuserdata.html [www.sidefx.com]
-
- Quick Links