ID 550329 - Format objects returned by node.format() cannot be used to set the format knob

Follow

Problem summary:
Format objects returned by node.format() cannot be used to set the format knob
 
Customer reported version:
Nuke 13.2v7
 
Customer reported platform:
Windows 10
 
Steps to reproduce:
1) Launch Nuke and create a CheckerBoard node in the Node Graph.
2) Open the Script Editor window and run the following code: 
format = nuke.toNode("CheckerBoard1").format() nuke.root()["format"].setValue(format)
3) Observe the warning that appears: Root.format format {...} not in named format list

 
Expected behavior:
Using setValue() on the Root format should succeed when passing a Format object returned by node.format().
 
Actual behavior:
Format objects returned by node.format() raise a "format not in named format list" warning when attempting to setValue() on the format knob.
 
Workaround:
Instead of using node.format(), any of the following options should allow the Root format to be set correctly and without a warning, but this only works if the node has a format knob, and the last workaround only works if the format has a name:  
format = nuke.toNode("CheckerBoard1")["format"].value()nuke.root()["format"].setValue(format)#----------------------------------------format = nuke.toNode("CheckerBoard1")["format"].actualValue()nuke.root()["format"].setValue(format)#----------------------------------------formatName = nuke.toNode("CheckerBoard1").format().name()nuke.root()["format"].setValue(formatName)
 
Reproduced by Support in:
Nuke 15.1v3 - Windows 10
Nuke 14.0v5 - Windows 10, CentOS 7
Nuke 14.0v1 - Windows 10
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10, CentOS 7
 
Earliest version tested:
Nuke 10.0v1 - This issue appears to be in all tested versions of the product

    We're sorry to hear that

    Please tell us why