1、获取当前帧速率
import pymel.core as pm
_frame = int(pm.mel.currentTimeUnitToFPS())
2、暂停maya界面刷新
import maya.cmds as cmds
#暂停界面刷新
cmds.refresh(suspend=True)
#恢复界面刷新
cmds.refresh(suspend=False)
3、关闭\开启xgen的自动刷新功能
def autopreview(state):
_des_editor = xgg.DescriptionEditor
if state:
_des_editor.previewAutoAction.setChecked(1)
else:
_des_editor.previewAutoAction.setChecked(0)
_des_editor.refresh("Full")
#1 为打开刷新,0为关闭刷新
autopreview(1)