Problem summary
When a user sets the value of a key in a mapper widget with Python, if they decide to get the value before executing any UI updates in the Parameters tab, the value will return the key instead of the value.
The function should always return the chosen key's value.
Customer reported version
katana.2.6v4
Customer reported platform
CentOS 7
Steps to reproduce:
Create a Group node and set its edit flag.
In the Parameters tab, choose Edit User Parameters from the wrench menu.
Add a Toolbar user parameter.
Change the parameter's widget type by choosing Widget Type > Mapping Popup Menu from the parameter's Edit Parameter tool button menu.
Open the parameter's widget options by choosing Widget Options from the parameter's Edit Parameter tool button menu.
In the widget options dialog, under Popup Options, create more than one string key-value pair. (If you only create one entry, you won't be able to switch to another item in the combo box.)
In a Python tab, execute the following line of code:
The UI should show an error red exclamation mark with the key name if it is set via the key. It should still return the value the parameter was set with (no secret validation and conversion logic).
Actual behavior
The value returned is one of the keys in the mapping, until the UI parameter is manually adjusted.
Workaround
Unknown.
Reproduced by support
This bug has been reproduced in:
Katana2.6v4 - Windows 7 - CentOS 6.9
Katana2.6v1 - Windows 7 - CentOS 6.9
Katana2.5v7 - Windows 7 - CentOS 6.9
Katana2.5v1 - Windows 7 - CentOS 6.9
Katana2.1v6 - CentOS 6.9
Katana2.1v1 - CentOS 6.9
Earliest version tested
This issue appears to be in all versions of the product.