Skip to content

Instantly share code, notes, and snippets.

@boredstiff
Created October 9, 2016 01:31
Show Gist options
  • Save boredstiff/5091548ed436707dbcd5e9e246f5e88a to your computer and use it in GitHub Desktop.
Save boredstiff/5091548ed436707dbcd5e9e246f5e88a to your computer and use it in GitHub Desktop.
Delete Maya 2017 Sign In Button
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