Greetings all, I have a SOP subnet and I want to promote some parameters from the nodes within. A number of those parameters are group selection fields - some for primitives, some for points. When I open the Parameter interface and drop and drag a group field into the 'exisiting parameters' column, I get a Type = String parameter. On accepting that, and trying out the promoted parameter by using the 'select group arrow' at the end of the entry field I get the following errors:
'NoneType'object has no attribute 'eval'
On clicking the show details button I get:
Traceback (most recent call last):
File "Parameter Scripted Action", line 4, in <module>
AttributeError: 'NoneType' object has no attribute 'eval'
I can type in the 'group element' number string in the field - but I really could do with the selection arrow working for visual selection in the scene view.
Can anyone educate me on what I should be doing to make this parameter promotion work successfully? With thanks...
The solution - thanks to Silvina at SideFX support:
This button runs a python script. You can see the script it runs in the Edit Parameter Dialog interface for that parameter in the Tags list under the tag script_action. The easiest way to see the full script is to edit the field in an external editor by hitting Alt+e since it's typically a multi-line script. The script on the promoted parameter is copied from the original parameter. In this case, the script is trying to evaluate the ordered parameter, which hasn't been promoted. There are a couple of ways to fix the issue.
The simplest is usually to promote the other parameters referenced by any such scripts as well, making them invisible if they serve no other purpose on the promoted node. This is the easiest way to ensure the script is running similarly to how it does on the original node.
An alternative is to directly modify the code causing the error.
In general, when promoting any parameters with such script buttons, it's worthwhile to examine this copied script to see if any changes may be necessary.