Pyblish for FTrack
##Usage
To succesfully publish an instance to ftrack using this extension you need to append a few data members to the instance you want to publish.
Required data:
- ftrackComponents - Dictionary of dictionaries where each key is a component name (Instance data)
- Each component (key) should be a dictionary that can have 2 keys
- path (required): holds path to the file being published
- reviewable (optional): tells extension whether you want component to be uploaded to ftrack servers and made available for webReview
ftrackComponents = {
'sequence': {path: 'path/to/file.%04d.exr'},
'movie': {path: 'path/to/file.mp4', reviewable = True},
}
instance.data['ftrackComponents'] = ftrackComponents
Optional data:
- ftrackAssetName - Name of ftrack asset where you want your AssetVersion to be created. (Context data)
- I you set this data, extensionwill try to find an existing ftrack asset with given name and attach the version to it. If such asset is not found, a new one will be created.
# Example code to set ftrackAssetName data
context.data['ftrackAssetName'] = 'myAsset'
- version - Version number of the publish (Context data)
- ftrack extension needs to know a version number the publish taking place so it can set ftrack version to the same number. If you set version yourself, it will be pick up by plugins and used. If not, extension will try to get the version number from currentFile context.
# Example code to set ftrackAssetName data
context.data['version'] = 2
- comment - Version description (Context data)
- If extension find 'comment' data in the context, it will be written into a 'description' field of the created AssetVersion.
# Example code to set ftrackAssetName data
context.data['comment'] = 'comment about the version being published'
Publish from Ftrack
Environment variables to set before launching ftrack-connect.
- Add
pyblish-ftrack/ftrack_event_plugin_path
toFTRACK_EVENT_PLUGIN_PATH
- Add
pyblish-win/pythonpath
toPYTHONPATH
Publish action will appear in the available actions. When launched it will ask for a folder. This will be the current working directory (cwd), for the session, which can be access in plugins through os.getcwd()
Currently only tasks have the Publish action.