Python VIewer State how to access cache_previous_parms?

   585   1   0
User Avatar
Member
19 posts
Joined: May 2018
Offline
When binding handle in a Viewer State, I have set cache_previous_parms to True, how can I read those previous parms back in to do something?


cache_previous_parms

If True, the handle retains a record of previous values. This can be useful if you want your code to calculate deltas as the user moves the handle, for example to know how fast the user is dragging the handle.

Precisely what I need is to calculate the delta.
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
The previous parm values are stored in the "prev_parms" entry of the kwargs dictionary passed to onHandleToState

https://www.sidefx.com/docs/houdini19.5/hom/state_handles.html#dynamic-handles [www.sidefx.com]
Edited by mabelzile - July 16, 2023 10:03:49
  • Quick Links