State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:304333|TargetRelease:2.6v5|
Problem summary:
When working with widget hints on parameter policies for which no specific hints are specified, hint dictionaries are seemingly shared between different instances: a change in one of them may affect a different parameter policy. This is undesirable, and can be an issue in actual production code.
This issue boils down to an internal function named _getStaticAttrHintsForIncomingSceneQuery() that is affected by this bug in several types of nodes:
Steps to reproduce:
materialNode = NodegraphAPI.CreateNode('Material', NodegraphAPI.GetRootNode())
attrPath = 'someAttrName'
print(materialNode._getStaticAttrHintsForIncomingSceneQuery(attrPath))
materialNode._getStaticAttrHintsForIncomingSceneQuery(attrPath)['no longer empty'] = 'oh!'
print(materialNode._getStaticAttrHintsForIncomingSceneQuery(attrPath)) Expected behaviour:
In both cases, empty dictionaries should be printed.
Actual behaviour:
In the first case, an empty dictionary is printed.
In the second case, a modified dictionary is printed, with contents according to the modification in the fourth line of code.
When running the code again, in the first case, the modified dictionary is printed as well.
Workaround:
A policy wrapper can be created for a given parameter policy, and that wrapper's hints can be modified instead of the ones of the original policy.
Reproduced versions/platforms:
Customer version/platform:
Not supplied.
We're sorry to hear that
Please tell us why