Created
October 9, 2016 01:31
-
-
Save boredstiff/5091548ed436707dbcd5e9e246f5e88a to your computer and use it in GitHub Desktop.
Delete Maya 2017 Sign In Button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import shiboken2 | |
import maya.OpenMayaUI as OMUI | |
from PySide2 import QtWidgets | |
def deleteSignInButton(): | |
statusLine = pm.mel.eval('$tmp = $gStatusLineForm') | |
pointer = OMUI.MQtUtil_findControl(statusLine) | |
statusLine = shiboken2.wrapInstance(long(pointer), QtWidgets.QWidget) | |
mayaStatusShelf = statusLine.children()[1].children()[1] | |
for widget in mayaStatusShelf.children(): | |
if widget.objectName() == 'IPM_Button_Placeholder' or widget.objectName() == 'IPMButtonCollapse': | |
widget.deleteLater() | |
if __name__ == "__main__": | |
deleteSignInButton() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment