timeline_marker.utils module

timeline_marker.utils.get_timeline()

Get the QWidget of Maya’s timeline. For versions 2016.5 and later the first QWidget child of the timeline should be returned.

Returns:QWidget of Maya’s timeline
Return type:QtWidgets.QWidget
timeline_marker.utils.get_timeline_menu()

Get the QWidget of Maya’s timeline menu. An initialization mel function has to be called to create and populate the menu before adding functionality.

Returns:QWidget of Maya’s timeline menu
Return type:QtWidget.QMenu
timeline_marker.utils.get_timeline_path()
Returns:Object path of Maya’s timeline
Return type:str
timeline_marker.utils.get_timeline_range()
Returns:Frame range of timeline selection
Return type:list[int]
timeline_marker.utils.maya_to_qt(name, type_=<sphinx.ext.autodoc._MockObject object>)
Parameters:
  • name (str) – Maya path of an ui object
  • type (cls) –
Returns:

QWidget of parsed Maya path

Return type:

QWidget

Raises:

RuntimeError – When no handle could be obtained

timeline_marker.utils.remap(value, input_min, input_max, output_min, output_max)

Remap a value based on input minimum and maximum, the result is converted to an integer since markers can only live as a whole frame.

Parameters:
  • value (float) – Value to remap
  • input_min (float) – Original minimum
  • input_max (float) – Original maximum
  • output_min (float) – New minimum
  • output_max (float) – New maximum
Returns:

Remapped value

Return type:

int