Creating a new extension
In this section, you'll learn how to create a simple Hello World style extension.
It will be on the form a dialog that will be shown when the user clicks a menu item with the DCC.
Prerequisites
- Install Connect v24+
- Download and install the Maya framework base integration.
- Create a new folder for your extension. This folder will contain all the files for your extension:
cd ~/Documents/ftrack
mkdir -p extensions/hello-world
Developing
- Create a dialogs folder inside the extension folder:
cd ~/Documents/ftrack/extensions/hello-world
mkdir dialogs
mkdir plugins
mkdir tool-configs
mkdir widgets
- In you operating system, set the environment variable FTRACK_USER_EXTENSIONS_PATH to the folder where you created the extension:
export FTRACK_USER_EXTENSIONS_PATH=~/Documents/ftrack/extensions
- Start Connect and launch a framework integration, your extension should now be visible under the ftrack menu.
Overview
📄️ Dialog
Create a helloworlddialog.py file inside your user extensions folder with the following content:
📄️ Plugin
Here we will add a validator plugin, to Maya scene publisher, that validates the node graph.
📄️ Widget
Here we will add a widget to the previous validator plugin, that fetches and displays the root nodes of the node graph.
📄️ Tool config
Here we modify the Maya scene publisher tool-config to use the new mayascenevalidator plugin and it's UI - the widget.