Hello:
I was trying to use to find an existing menu and add some commands to it using
the .menu("") call but it appears this is returning a MenuItem object instead
of a Menu, and thus I can't call addCommand on it.
Nuke 8.0v3 in Linux:
menubar = nuke.menu("Nuke")
# Result:
testMenu = menubar.addMenu("Test Menu")
# Result:
testMenu
# Result:
<Menu object at 0x1d13b10>
menubar.menu("Test Menu")
# Result:
<MenuItem object at 0x1d139d8>
Shouldn't menubar.menu("Test Menu") return a Menu object?
.findItem seems to return a MenuItem as well:
menubar.findItem("Test Menu")
# Result:
<MenuItem object at 0x1d139a8>
Even iterating through .items() gives me a menuItem.
for i in menubar.items():
if i.name() == "Test Menu":
print i
# Result:
<MenuItem object at 0x1d137b0>
Am I totally not seeing the forest through the trees on how to get a Menu
object to then call addCommand?
Thank you!
Jake
--
--------------------------------------------
[email protected] 203-992-6319
LTD Blue Sky Studios
--------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python