Add a custom tool the the ftrack menu within Maya¶
In this section we demonstrate how to add your own studio tool to the Maya plug-in, which in this case updates the status of the task you have launched to “In progress”. We add its menu item to the ftrack menu in userSetup.py:
mypipeline/ftrack-connect-pipeline-maya/resource/scripts/userSetup.py
1..
2
3def initialise():
4
5 ..
6
7 maya_utils.init_maya()
8
9 cmds.menuItem(
10 parent=ftrack_menu,
11 label='In Progress',
12 command=(functools.partial(maya_utils.set_task_status, 'in progress', session, logger))
13 )
14
15 maya_utils.scene_open(session, logger)
In DCC custom_commands.py, we add the corresponding set_task_status
function:
mypipeline/ftrack-connect-pipeline-maya/source/ftrack_connect_pipeline_maya/utils/custom_commands.py