ID 278383 - Exceptions when using the attributeName widget type for a string parameter

Follow

Problem summary:

The attributeName widget type is not currently exposed with a corresponding widget type menu item in the UI. Nevertheless, it can be used for parameter hints, e.g. via NodegraphAPI scripting.

When using it for a string parameter, and displaying the parameter's widget in the UI, exceptions are raised.

Steps to reproduce:

  1. Create a Group node and set its edit flag.
  2. Edit the user parameters of the Group node, and add a string parameter.
  3. Set a hint string on the new user string parameter using the Python tab: NodegraphAPI.GetNode('Group').getParameter('user.newParameter').setHintString('{"widget": "attributeName"}')

Expected behaviour:

The parameter's hint string is updated, and no exception is raised.

Actual behaviour:

The parameter's hint string is updated, and an exception is raised with a traceback similar to the following:


A TypeError occurred in "FormWidget.py": setLocked() takes exactly 2 arguments (3 given)
Traceback (most recent call last):
  File "bin/python/UI4/software_python/QT4FormWidgets/v0/ValuePolicy.py", line 365, in _HandleQueuedChanges
  File "bin/software_python/Utils/v5/WeakMethod.py", line 37, in __call__
  File "bin/python/UI4/Widgets/SortablePanel.py", line 210, in valueChangedEvent
  File "bin/python/UI4/Widgets/SortablePanel.py", line 301, in setLocked
  File "bin/python/UI4/software_python/QT4FormWidgets/v0/FormWidget.py", line 1267, in setLocked
TypeError: setLocked() takes exactly 2 arguments (3 given)

Other exceptions may be raised for example from event handlers.

Workaround:

No known workaround.

Reproduced versions/platforms:

  • Katana 1.0v1/Linux

Customer version/platform:

Not supplied.

    We're sorry to hear that

    Please tell us why