Hey Highend3D,
I have created a script that uses the maya.cmds.hudButton() which creates the buttons in each viewport. however, upon creating a new modelPanel or tear off viewport, this falls apart and stops the viewport from pressing any of my buttons. If you have an idea how to make, please let me know.
Best,
Aniket