ID 374680 - screenWidth python function will create a zero value result, if created without a connection to a pre-existing node

Follow

Problem summary
When using the screenWidth python function to determine a nodes width, if no previous nodes are selected or created either through python or the GUI, the width will be set incorrectly at '0' when not connected to a node.

Customer reported version
nuke.11.2v4

Customer reported platform
windows10

Steps to reproduce

1) Open a new Nuke script

2) Paste the following code snippet into the Script Editor, this will create a 'Blur' node and 

b=nuke.createNode("Blur") 
b.setName("MrBlur")
b.setSelected(False)
print b.screenWidth()

3) Run the code twice.
Result: When the node is told not to be selected, the screenWidth function will create two unconnected nodes.

4) Alter the code snippet, removing the setSelected(False) function. (This will allow multiple nodes to connect when the script is run several times)
b=nuke.createNode("Blur") 
b.setName("MrBlur")
print b.screenWidth()

5) Run the code twice.
Result: The code will now create two nodes connected, the first one with the '0' value and the second one with the correct value '80' value.

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:
Nuke 11.2v5 - Windows 7 - CentOS 7 - MacOS 10.13.6
Nuke 11.2v1 - Windows 7
Nuke 11.1v1 - Windows 7
Nuke 11.5v1 - Windows 7
Nuke 10.0v1 - Windows 7
Nuke 10.5v1 - Windows 7
Nuke 9.0v1 - Windows 7
Nuke 8.0v1 - Windows 7 - CentOS 7 - MacOS 10.13.6

Earliest version tested
Nuke 8.0v1
- This issue appears to be in all versions of the product

Expected behaviour
When using the screenWidth python function, the result returned should the correct value

Actual behaviour
When using the screenWidth python function, if the node is not connected to an existing node, the screenWidth will default to a zero value.

    We're sorry to hear that

    Please tell us why