Disable double click time slider select all. (Python/2017)

Disable double click time slider select all. (Python/2017)

Anonymous
Not applicable
844 Views
2 Replies
Message 1 of 3

Disable double click time slider select all. (Python/2017)

Anonymous
Not applicable

I have been trying to disable the double click select all function of the Time Slider, because it is more irritating than useful.

 

I have gone down two paths with this and come up blank each time.

I have tried using timeControl:

import maya.mel as mel
time_control = mel.eval('$tempMelVar = $gPlayBackSlider')
cmds.timeControl(time_control, q=1, var)

But there are not functions, or callbacks to help with the double click functionality here.

 

And I have tried the more obscure Qt route:

import maya.mel as mel
from PySide2 import QtWidgets, QtCore, QtGui
import maya.OpenMayaUI as omui
import shiboken2 as shiboken
MAYAWINDOW = shiboken.wrapInstance(long(omui.MQtUtil.mainWindow()), QtWidgets.QWidget)

time_control = mel.eval('$tempMelVar = $gPlayBackSlider')
time_control_path = cmds.timeControl(time_control, q=1, fullPathName=True) qt_frame = MAYAWINDOW.findChildren(QtWidgets.QWidget) for i in qt_frame: if i.objectName() == time_control_path.split("|")[-2]: qt_widget = i

I am using Maya 2017.

Any ideas on this would be appreciated.

0 Likes
845 Views
2 Replies
Replies (2)
Message 2 of 3

lee.dunham
Collaborator
Collaborator

Haven't tried, but I would probably look at installing an eventFilter for the time slider QObject.

Bear in mind that you'll probably need to deduce a double click event by capturing the time between clicks.

Message 3 of 3

Anonymous
Not applicable

Interesting, I'll check it out when I have some more time. 
Thank you for your response!

0 Likes