Set highlighted range in Maya's Time Slider
问题 It is easy to get the highligted range in the time slider using: import maya.cmds as cmds import maya.mel as mel aTimeSlider = mel.eval('$tmpVar=$gPlayBackSlider') timeRange = cmds.timeControl(aTimeSlider, q=True, rangeArray=True) Likewise the Qt widget can be accessed with from maya import mel from maya import OpenMayaUI as omui try: from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * from PySide2 import __version__ from shiboken2 import wrapInstance