The shotgun plug-in connects to the shotgun API and applies tag to the shots found on the filesystem
Have DataIQ running on the host machine.
Must have Python-pip and git installed. May require the epel-release package for Red Hat.
(shotgun) $ mkdir "build"
(shotgun) $ mkdir "dist"(shotgun) $ cp -rv "hoststorage/." "build"(shotgun) $ cd "build"
(build) $ python2 -m pip download -d deps2 -r requirements.txt
We are packaging the hoststorage and Python dependencies into a single archive file so that this plug-in can be installed on any DataIQ host. It is self-contained so that running the plug-in does not require a connection to the outside internet to download dependencies at runtime.
(build) $ tar -czvf "../dist/shotgun-plugin-1.0.0.tar.gz" *(shotgun) $ /opt/dataiq/plugin_manager/bin/plugin_manager init(shotgun) $ /opt/dataiq/plugin_manager/bin/plugin_manager install shotgun-plugin plugin-centos-base
-f "dist/shotgun-plugin-1.0.0.tar.gz"~ $ /opt/dataiq/plugin_manager/bin/plugin_manager start shotgun-pluginShotgun plug-in needs tags to identify shotgun shots. This is done using the autotagging feature.
The shotgun plug-in assumes the following directory structure on filesystem.
/volumename/showname/sequences/sequencename/shots/shotnumber/
Where volumename, showname, sequencename, and shotnumber are variable.
A /sequences directory (case sensitive) must exist at the third level depth and a /shots directory must exist at the fifth level depth.
Notes:
- This directory pattern is hard-coded into the example shotgun plugin.
- If your actual production directory structure varies from the above example, both the DataIQ regular expression autotag rule and the actual python API to Shotgun will need to be modified to match actual directory structure in production.
- shownames can actual span multiple filesystem volumes (example: production storage and archive storage) if first level autotag regular expression matches on multiple volumes
- The python API call to Shotgun can then also be refined for further efficiencies
In DataIQ go to settings > data management configuration > Other settings > Autotagging configuration file
Add at the end of file the following: Replace the with your volume name
match /<VOLUME NAME>/([^/]+)/sequences/([^/]+)/shots/([^/]+)
max_depth 6
apply_tag shot/$1_$2_$3
In DataIQ go to settings > data management configuration > plugins > Select Shotgun plugin > Edit configuration
and edit the global configuration:
"Global Configurations":
shotgunAPIUrl: "YourShotgunAPIUrl"
shotgunAPIScriptName: "YourShotgunAPIScriptName"
shotgunAPIKey: "YourShotgunAPIKey"
expirationDelay: 7Once configured you can enable the plugin by going to: settings > data management configuration > plugins > Select Shotgun plugin > Enable
The plugin is automatically executed everyday at 1:00 AM (You can also edit the Cron jobs in the configuration file)
settings > data management configuration > plugins > Select Shotgun plugin > Edit configuration
You can trigger the plug-in manually by selecting a folder on DataIQ dashboard
Select the "Actions" tab and click Run shotgun plugin
Create an account on https://www.shotgunsoftware.com/ and signin
You have access to a free 30 days trial
Go to Scripts
Once created edit the global configuration with the API credentials
On the host machine go to your mounted volume and create the following folders:
$ mkdir -p dataiqtest/sequences/sequence/shots/shotIf you look carefully, our hierarchy is composed of the following:
<PROJECT_NAME>/SEQUENCES/<SEQUENCE_FOLDERS>/SHOTS/<SHOT_FOLDERS>
.
`-- sequences
`-- sequence
`-- shots
`-- shot
- The sequences folder is composed of folders within the same name of the sequences created on Shotgun
- The shots folder is composed of folders within the same name of the shots created on Shotgun
For instance if we have a shot named 'test' we will have the following tree:
.
`-- sequences
`-- sequence
`-- shots
`-- shot
`-- test
Now you can re-scan volumes and trigger Shotgun manually
If everything worked correctly you will have your shots tagged!
From the command line of the DataIQ server run the following to see a list of pods and their names:
~ $ kubectl -ndataiq get podsThen run the following substituting the name of the plug-in pod.
~ $ kubectl -ndataiq log <NAME OF POD>See this example:
Disable the plug-in in DataIQ, go to settings > data management configuration > plugins > Select Shotgun plugin > Disable
Stop the plug-in
~ $ /opt/dataiq/plugin_manager/bin/plugin_manager stop shotgun-pluginDelete plug-in componenets
~ $ /opt/dataiq/plugin_manager/bin/plugin_manager rm shotgun-plugin
~ $ rm -rf /opt/dataiq/maunakea/data/plugins/shotgun-plugin/



















