Maya Timeline Markers

timeline_markers

This script lets you overlay markers on the timeline. Its useful if you need to set keys on different objects at certain times.
I created a QWidget with a custom paint event which renders a vertical line at a list of positions. Then I installed a couple event filters to create a shift+click context menu over the timeline. I couldn’t use the widget’s contextMenuEvent or mousePressEvent or else it would interfere with Maya’s context menus.

download the script here

Comments

  1. brewery says:

    Thats ok, sorry I just seen your reply! 🙂

    It is maya 2012, but I actually got it to work… thing is it seems to remove the shift-click funcionality of being able to select keys to move them in the timeline?

    thanks!

  2. brewery says:

    hey this looks like a cool script but i’m having trouble getting it to work… what commads should i be using?
    i keep getting this error when trying to run:

    ‘Error: NameError: name ‘timeline_layout’ is not defined # ‘

    many thanks for any help! 🙂

    • Danny Wynne says:

      sorry for late response, what version of maya? Autodesk makes no guarantees that maya’s qt interface will remain the same between versions (names, layouts etc will change), so scripts that access maya’s qt bits might break between versions.

      • Molly says:

        I realize this is old thread but same error in Maya 2016.
        “timeline_markers.py line 1: No module named PyQt4”

        • Danny Wynne says:

          Maya 2016 ships with PySide, which replaces PyQt. You’d have to replace the PyQt4 with PySide in the import statements. And you can’t use sip. These days, to load Qt in Python I use this module https://github.com/Temujin2887/mlib/blob/master/core/qt.py
          It handles choosing pyside or pyqt for you and has some other nice things. It can also get the Maya QMainWindow (the current script uses sip to do that, but you’d need to use pysides thing).

          Were you interested in using this script? Maybe Ill update and clean up my scripts this weekend and put them on github. There not aging well

Leave a Reply

Your email address will not be published.