State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:376736|
Problem summary
When the viewer has 200 or more layers, the layer dropdown groups the layers in pairs, and creates sub menus to access them.
Customer reported version
nuke.11.2v5
Customer reported platform
Steps to reproduce
1) Open Nuke
2) Create a CheckerBoard node
3) With the CheckerBoard node selected, run the following code:
for x in xrange(197):
layname = 'lay' + str(x)
lay = nuke.Layer( layname, [ layname + '.red', layname + '.green', layname + '.blue', layname + '.alpha'] )
shuff = nuke.createNode("Shuffle")
shuff["out"].setValue(lay.name())
4) Connect the Viewer to Shuffle196, the menu looks normal:

5) Connect the Viewer to Shuffle197, the menu has grouped the layers, and created sub menus to access them:

Using the below code to count the layers shows that 200 layers are need for this issue to occur:
allLayers = nuke.layers(nuke.activeViewer().node().input(nuke.activeViewer().activeInput()))
print len(allLayers)
Reproduced by support
This bug has been reproduced in:
Nuke 11.3v1 - Windows 10 - CentOS 6.9 - MacOSX 10.13
Nuke 11.2v1 - Windows 10
Nuke 11.1v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.5v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v1 - Windows 10 - CentOS 6.9 - MacOSX 10.13
Earliest version tested
Nuke 8.0v1 - This issue appears to be in all versions of the product
Expected behaviour
For the menu to be consistent
Actual behaviour
It adds sub menus when you have 200 layers or more
We're sorry to hear that
Please tell us why