Get Shots Helper v1.0

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Antony Nasce
Convenient way to get the shots from a Sequence, including its thumbnail.
7.0 or later
Linux, Mac, Windows
16 Apr 2013

This gets you a list of Shot objects from a Sequence as Python Dictionaries, with original TrackItem, shot name, source file path and a QImage of the Shot Thumbnail.

It can be used as the preparation stage of uploading thumbnails, shots, etc. to your Shotgun/FTrack/Asset management database for instance.

myShots = getShotsFromSequence( mySequence ), where mySequence is a hiero.core.Sequence object
myShots = getShotsFromSequenceInCurrentViewer() - gets shots from the Sequence currently in the Viewer
Get the name of the first shot: myShots[0]['shotName']
Get the source file path used in the first shot: myShots[0]['sourceFile']

If you want to interrogate the Shot's in/out points etc, get the TrackItem object via: myShot[trackItem]

Notes on Saving out thumbnails
This code does not save any image files for you as it stands, but it stores images as QImages, which can later be saved/manipulated.
If you want to save the QImage to disk from a shot dictionary, myShot, do: myShot['shotThumb'].save('/tmp/some/path.png')
For more on QImage, check out:, in particular, save()
If you need more control over the output of your images, check out the QImageWriter Docs.
QImageWrite Docs:

Please login in order to download these files.

You have no rights to post comments

We have 2535 guests and 72 members online