ID 372911 - [Python] Node.metadata() returns no values when View is switched

Follow

Problem summary
Within a stereo Nuke setup, if you use the 'node.metadata()' function while viewing a view other than 'Main', metadata is coming from the next view.

This can be reproduced by setting up a stereo scene and calling ' node.metadata() ' while in the right view.

Customer reported version
11.2__11.2v4

Customer reported platform
suse

Steps to reproduce

1) Open Nuke, setup a basic stereo scene ( With a Stereo Read node )

2) Within your Script Editor, copy and execute the following:
node = nuke.toNode('Read1')print node.metadata()

3) You should receive a result like the following:


4) Within your Viewer, switch to the Right view

5) Execute the script again.

Result: The metadata for the Right view will not be posted, instead it will be empty:


Workaround
As displayed in the Nuke Python API, the user can add a specified view input to the function:
https://learn.foundry.com/nuke/developers/112/pythonreference/nuke.Node-class.html#metadata
 
To use the currently selected view, the user can use the following:
node = nuke.toNode('Read1')print node.metadata(view=nuke.thisView())

Copying and executing the following will print all view metadata for the node, even when switched to the right view:
node = nuke.toNode('Read1')for views in nuke.views():     print 'View: ' + views + '\nMetadata Values:'    for k, v in node.metadata(view=views).iteritems():        print k, v    print '\n\n'

Reproduced by Support in:
Nuke 13.0v4 - Windows 10
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke11.2v4 - Windows 7 - Mac10.13 - CentOS6.9
Nuke11.2v1 - Windows 7
Nuke11.1v6 - Windows 7
Nuke11.1v3 - Windows 7 - Mac10.13 - CentOS6.9 - Regression 1

Regression 1 ( Left View Metadata appears in BOTH Views )
Nuke11.1v2 - Windows 7
Nuke11.1v1 - Windows 7
Nuke11.0v4 - Windows 7
Nuke11.0v1 - Windows 7
Nuke10.5v7 - Windows 7 
Nuke10.5v1 - Windows 7
Nuke10.0v6 - Windows 7
Nuke10.0v1 - Windows 7 - Regression 2

Unable to reproduce
Nuke9.0v9 - Windows 7- Mac10.13 - CentOS6.9

Earliest version tested
- This issue no longer appears in this version and has regressed


Expected behavior
nuke.metadata() should print the metadata values for the currently selected Node's View

Actual behavior
Any View which is not the main, will not print any information.

 

    We're sorry to hear that

    Please tell us why