ID 512668 - Menu items with / in the Name cannot be found via Python in Nuke.

Follow

Problem summary
Items with / in the Name cannot be found via Python in Nuke.
 
Customer reported version
nuke.13.2v2
 
Customer reported platform
Windows 11
 
Steps to reproduce
1) In Nuke, open the Script Editor and run the command:

cur_menu = nuke.menu('Nuke') m = cur_menu.findItem('Edit/Node/Disable/Enable') print(m)
2) Observe the output in the Script Editor.
 

 
Expected behavior
The Script Editor should return a value for names with /.
 
Actual behavior
The output displays 'None' when finding Items with a / character in the name. Additionally, the character is unable to be escaped with \
 
Workaround
Run the following command to find the name and set a shortcut:
for i in nuke.menu('Nuke').findItem("Edit/Node").items():     if i.name()== "Disable/Enable":         i.setShortcut('Z')
 
Reproduced by Support in:
Nuke 13.2v2 - Windows 10, CentOS 7
Nuke 13.2v1 - Windows 10
Nuke 13.1v1 - Windows 10
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10, CentOS 7
 
 
Earliest version tested
Nuke 9.0v1 - This issue appears to be in all tested versions of the product

    We're sorry to hear that

    Please tell us why