State:New|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:508677|
Problem summary
When exposing parameters in a shading node, invalid characters for the parameter name (such as '&') will be automatically sanitized to an underscore to maintain a valid parameter name.
However, if you use the nameRegExFind and nameRegExReplace, it is possible to enter an invalid character that does not go through the same sanity check, creating an invalid parameter name.
Customer reported version
katana.4.0v5
Customer reported platform
centos7
Steps to reproduce
1) Create a DlShadingNode node and set the shader type to blinn
2) Edit Material Interface Options of the Diffuse parameter and set the Name to "replace_test"
3) Set the nameRegExFind parameter to "replace"
4) Set the nameRegExReplace parameter to "foo & bar"
5) Connect this DlShadingNode to the dlSurface input of a NetworkMaterial to create a material
6) Create and attach a Material node
7) Set the action parameter to ‘create a child material’
8) Set the inheritsFrom parameter to ‘/root/materials/NetworkMaterial’
9) Set key frames on the foo & bar_test parameter
Expected behavior
The blinn parameter is sanitized to "foo _ bar_test"
Actual behavior
The parameter is not sanitized. If you attempt to animate this parameter, the Katana file will become invalid and Katana will be unable to save.
The following error is thrown:
[ERROR python.root]: A RuntimeError occurred in "NodeXmlIO.py": not well-formed (invalid token) Traceback (most recent call last): File "Tabs/NodeGraphTab/NodegraphPanel.py", line 1428, in event File "Tabs/NodeGraphTab/NodegraphPanel.py", line 1479, in __processUnfocusedKeyEvent File "Tabs/NodeGraphTab/NodegraphPanel.py", line 913, in __copy File "NodeXmlIO.py", line 210, in BuildNodesXmlIO File "NodeXmlIO.py", line 794, in _SaveNodeXmlIO RuntimeError: not well-formed (invalid token) We're sorry to hear that
Please tell us why