State:New|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:427219|
Problem summary:
Behaviour has changed around the checkDynamicParameters() function, and how and when it needs to be called. It appears it no longer is retained during multiple Python instantiations.
Steps to reproduce:
1. In a new Katana project, copy and paste the following code into the Python tab.
from Katana import NodegraphAPIrootNode = NodegraphAPI.GetRootNode()newNode = NodegraphAPI.CreateNode('ArnoldShadingNode', rootNode)newNode.getParameter('nodeType').setValue('image', 0)newNode.checkDynamicParameters()newNode.getParameter('name').setValue('AAA', 0)newNode.getParameter('parameters.filename.enable').setValue(True, 0)newNode.getParameter('parameters.filename.value').setValue('BBB', 0)newNode.setName('AAA')param = newNode.getParameter('parameters.filename.value')print 'PARAM1: ', param, param.getValue(0)
2. Copy and paste the following code into the Python tab. Make sure to not set the edit flag to the newly created node before pasting the code.
node2 = NodegraphAPI.GetNode('AAA')print 'NAME:', node2.getName()print 'PARAM2:', node2.getParameter('parameters.filename.value').getValue(0) Expected behaviour:
We should get a print out of the expected value: BBB
Actual behaviour:
In Katana 3.1v5, the function node2.getParameter('parameters.filename.value').getValue(0) will return "PARAM2: BBB" without the need of calling node2.checkDynamicParameters()
In Katana 3.5v1, the function node2.getParameter('parameters.filename.value').getValue(0) will return the following error:
File "<string>", line 5, in <module> print 'PARAM2:', node2.getParameter('parameters.filename.value').getValue(0)AttributeError: 'NoneType' object has no attribute 'getValue' Calling node2.checkDynamicParameters() after node2 = NodegraphAPI.GetNode('AAA') or setting the edit flag to the "AAA" ShadingNode fixes this error.
Workaround:
No known workaround.
Tested versions/platforms:
Customer version/platform:
CentOS 7
We're sorry to hear that
Please tell us why