def register_menuitem_2(menuitem_path): action = mayautils.uipath_to_qtobject(menuitem_path) font = action.font() font.setBold(True) action.setFont(font) def setdefault(): action.setFont(QtGui.QFont()) action.triggered.connect(setdefault)
def register_menuitem_3(menuitem_path): if menuitem_path in _loadregisry(): #(6) return action = mayautils.uipath_to_qtobject(menuitem_path) font = action.font() font.setBold(True) action.setFont(font) def setdefault(): action.setFont(QtGui.QFont()) registry = _loadregisry() #(7) registry[menuitem_path] = None _saveregistry(registry) #(8) action.triggered.connect(setdefault)
def demo2_changecolor(menuitem): action = mayautils.uipath_to_qtobject(menuitem) #(1) font = action.font() #(2) font.setBold(True) #(3) action.setFont(font) #(4) return action
def register_menuitem_1(menuitem_path): action = mayautils.uipath_to_qtobject(menuitem_path) font = action.font() font.setBold(True) action.setFont(font)