RESOLVED:Bound parameter par.val not referencing the actual current value

When trying to get a value of a bound parameter the par.val does not seem to reference the actual current value but still reference the last set constant value. One can get the correct current value by float(par). However settings the value of a bound parameter by par.val = 1 does work but does not update the parameters par.val, just the one of the bind head.

I have encountered the issue whilst building UI Elements that can be changed via the scroll wheel and therefore attached a demo project that should demonstrate my issue. Simply scroll while the mouse hovers over the containers and see what happens.

The par.val of the head of the bind chain is updated correctly, which I guess is expected because that parameter is still in constant mode.

This issue is in both 2023.12370 and the experimental build 2025.30060 for me, running MacOS.

Let me know your opinion on whether this should be expected as par.val is the constant value of a parameter or how one should access the current value of a bound parameter the correct way.

par bind val.toe (5.9 KB)

Try using:

par.eval()

as par.val, par.expr etc only return local settings for the parameter,
while the eval() takes everything into consideration to produce a final result.

For more info see:

Cheers

1 Like

Well, I’m a little bit embarrassed. I don’t know how I spend probably two hours on this without trying eval(), seems so obvious now.

Thanks a lot for pointing it out! And sorry for making a thread on something this obvious :sweat_smile:

To be fair the difference between .val and .eval() is unfortunately pretty close name wise.
We considered .constant but felt that wasn’t very descriptive.
It’s all good feedback!
Thanks,
-Rob