Recently a work colleague approached me with a request for a custom feature in Maya.
The request was for a custom tool that replicated the Maya timeline and it’s tools in a torn off window.
The colleague has a thing for large windows when animating, they enjoy a very custom setup.
Tools that are going to be used are the best kind to make.
This is written entirely for Pyside, using a method for controlling Maya elements using pointers shown to me by Malcom.
As it’s written for pyside/Maya 2014+ you need not install anything to use it.
As I looked a little deeper into this I came across this with the timeline:
From the Maya docs here
Note: only one timeControl may be created. The one Maya creates on startup can be accessed from the global string variable $gPlayBackSlider. Also, it is not a good idea to delete it.
So there can be only one, and yes I deleted it a few times. You do not want that, it does not come back.
So this tool rips the timeline from Maya and re parents it into the QT window, Holding a reference to the location it came from.
It then puts the timeline back on the close event of the QT window.
Creating the range control is straight forward as there can be more than one of these see here.
The tool will store the position and size of the window when the window is closed. It will then restore to this location/dimensions on next use.
There other elements are all QT.
The script can be downloaded here
Installation and use
- Unzip and copy the to “timelineCtrl” folder to maya script folder for example:
- run Maya, open script editor (Python window) and type in:
- import timelineCtrl
The import and timeline control lines can also be saved off to the shelf for easy use.
And boom, tool is good to go.
Alternate use method
If you have a thing for not installing scripts you can do the following:
- Copy the contents of “BigTimelineWindow.py”
- Paste this into a python script editor window
- Run the code
Note: The refreshing of the states in the torn of window currently do not update as well as they could.
Tested on windows only, will note work with pre-Maya 2014 as Pyside is not part of the standard install.