I have a menu created with pymel with each item being using:
pm.menuItem(p=parentMenu, label=labelName, command=pm.Callback(callback))
This works fine if I just click the menu items. But if I shift click it to create a shelf shortcut the code will be something like “<function callback at 0x00000000420EE198>”. This won’t work as it’s only a memory adress.
What can I do to make it create a shelf button with the actual contents of the callback?