ID 587599 - The NodegraphAPI.Util.GetAllConnectedInputs() function skips over the contents of a ShadingGroup if the port names of the node match

Follow

Problem summary
NodegraphAPI.Util.GetAllConnectedInputs() does not take into account that the names of input and output ports of ShadingGroup/LiveShadingGroup nodes may match and so if they do, it will always evaluate that the connected port links to a ShadingGroups/LiveShadingGroup input port even if it actually connects to the nodes output port. This means the result of functions like NodegraphAPI.Util.GetAllContributingNodes() and NodegraphAPI.Util.DeleteNonContributingNodes() do not include the node contents of ShadingGroup/LiveShadingGroup nodes if the port names match.
 
Customer reported version
Katana 4.5v6
 
Customer reported platform
CentOS 7
 
Steps to reproduce
 
1) Navigate to the Node Graph tab and create a NetworkMaterialCreate node.

2) Enter the NetworkMaterialCreate node and then create a ShadingGroup node.

3) Enter the ShadingGroup node and then create a Dot node.
 
4) Connect the input and output ports of the Dot node to the ShadingGroups respective terminal ports.
 
5) Rename both the Input and Output terminal ports so that they match.
 
6) Exit the ShadingGroup context and then connect the ShadingGroup nodes output port to an available NetworkMaterialCreate terminal port, such as usdSurface.
 
7) Exit the NetworkMaterialCreate context, and then select the NetworkMaterialCreate node.
 
8) In the Python tab, run NodegraphAPI.Util.GetAllContributingNodes().
 
Expected behaviour
The returned list of nodes includes the Dot node
 
Actual behaviour
The returned list of nodes does not include the Dot node.
 
Workaround
Ensure the input and output ports of a ShadingGroup or LiveShadingGroup node do not match.
 
Reproduced by support
This bug has been reproduced in:
Katana 7.0v4 - Windows 10, Rocky 9
Katana 6.5v4 - Windows 10, CentOS 7
Katana 6.0v5 - Windows 10, CentOS 7
Katana 4.5v6 - Windows 10, CentOS 7
Katana 4.0v8 - Windows 10, CentOS 7
Katana 3.6v5 - Windows 10, CentOS 7
 
Earliest version tested
Katana 3.6v5 - This issue appears to be in all tested versions of the product

    We're sorry to hear that

    Please tell us why