Lets say you want to add some custom buttons to the Outliner in Maya’s vanilla Graph Editor. You could do this by getting the workspace control and wrapping it in a QWidget class.
But in order to do that, you need to know the name of the workspace control. In Maya 2018, the name is “graphEditor1OutlineEdSlave”, and you’d get a variable for editing it by doing
ptr = OpenMayaUI.MQtUtil.findControl("graphEditor1OutlineEdSlave")
graphEd = QtCompat.wrapInstance(long(ptr ), QtWidgets.QWidget)
But this name doesnt work in Maya 2023. ptr is None, so I need to find whatever the new name is. How do you get the string “graphEditor1OutlineEdSlave” in the first place? Is there a way that I can run a script that prints the name of any UI element I click on?