State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:476051|
Problem summary
Nuke Menu items cannot be removed when using literal slashes for the name in Python.
Customer reported version
nuke.11.3v6
Customer reported platform
centos7
Steps to reproduce
1) In Nuke, open the Script Editor.
2) Run the following commands:
m = nuke.menu("Nuke")
tm = m.addMenu("test")
menu_item = tm.addCommand("test\/unremovable", "print('nope')")
tm.removeItem(menu_item.name()) # returns False, item not removed
tm.removeItem("test\/unremovable") # returns False, item not removed
3) Observe the menu items available.
Expected behavior
The menu item should be removed from the menu.
Actual behavior
The menu item is not removed and returns as False in the Script Editor.
Workaround
Disabling the visibility of the menu item removes it from view. Run the following code from the above snippet: menu_item.setVisible(False)
Reproduced by Support in:
Nuke 13.0v2- Windows 10, CentOS 7
Nuke 13.0v1 - Windows 10
Nuke 12.2v1 - Windows 10
Nuke 12.1v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v1 - Windows 10, CentOS 7
Earliest version tested
Nuke 8.0v1 - This issue appears to be in all versions of the product
We're sorry to hear that
Please tell us why