Menu token bug?

   2404   3   2
User Avatar
Member
899 posts
Joined: 2月 2016
Offline
Support page seems offline at the moment, I will try later. Meanwhile I report this potential bug here, for whom it might concern.

Let's suppose you have a digital asset with a menu parm having the “Use Menu Item Token as Value” toggle checked.
If you drop down on the network an instance of the digital asset and leave unchanged the menu, the menu would return the item index, and not the token value. As soon as you select any item of the menu, the menu updates to the correct value.

This can potentially lead to broken setups, when ideed the user doesn't touch the menu at all.

A fix that I'm using is to force to set a value for the menu in the onCreated event handler script of the Digital Asset.
But that's not ideal when you deal with multiple setups.

Please refer to the attached file to check the behavior.
Could you reproduce it? I'm on Hou 17.0.416

thanks
Edited by Andr - 2019年3月10日 06:27:42

Attachments:
menuTokenBug.hiplc (65.6 KB)

User Avatar
Member
899 posts
Joined: 2月 2016
Offline
It turns out that the menu is reading the “default value” (what a surprise), so it naturally comes initialized with the default value, regardless of how it shows itself in the parameter tab when a new instance is created in the network.

So when you setup a menu, you have to remember to always set the default value accordingly to the token value you want to show.
Otherwise this can lead to confusion where the user sees a value in the parameter tab, but it's actually returned a different one (0 by default).
Edited by Andr - 2019年3月10日 06:56:38
User Avatar
Member
71 posts
Joined: 6月 2008
Offline
It looks like it still wasn't fixed. Using Houdini 19.0.720.
Alexey Mazurenko
User Avatar
Member
899 posts
Joined: 2月 2016
Offline
archie
It looks like it still wasn't fixed. Using Houdini 19.0.720.


Hey, I believe it was not a bug, as mentioned in the second post: when you use custom tokens as value, you need to remember to set the proper default value for the parameter .
Edited by Andr - 2023年10月5日 06:16:58
  • Quick Links