Snippets

ftrack Action - Batch upload thumbnails (Legacy API)

Updated by Lucas Correia

File batch_upload_thumbnails_action.py Modified

  • Ignore whitespace
  • Hide word diff
         )
         return
 
+    action = ImportThumbnails()
+    action.register()
+
 
 def main(arguments=None):
     '''Set up logging and register action.'''
Updated by Lucas Correia

File batch_upload_thumbnails_action.py Modified

  • Ignore whitespace
  • Hide word diff
         }
 
 
+def register(registry, **kw):
+    '''Register action. Called when used as an event plugin.'''
+    logger = logging.getLogger(
+        'ftrack.batch.import.thumbnails'
+    )
+
+    # Validate that registry is an instance of ftrack.Registry. If not,
+    # assume that register is being called from a new or incompatible API and
+    # return without doing anything.
+    if not isinstance(registry, ftrack.Registry):
+        logger.debug(
+            'Not subscribing plugin as passed argument {0!r} is not an '
+            'ftrack.Registry instance.'.format(registry)
+        )
+        return
+
+
 def main(arguments=None):
     '''Set up logging and register action.'''
     if arguments is None:
Updated by Former user

File README.rst Modified

  • Ignore whitespace
  • Hide word diff
 
 For example:
 
+.. code-block::
+
     0010.png  
     0010.010.png  
     0010.010.generic.png  
Updated by Former user

File README.rst Modified

  • Ignore whitespace
  • Hide word diff
 
 For example:
 
-    0010.png
-    0010.010.png
-    0010.010.generic.png
+    0010.png  
+    0010.010.png  
+    0010.010.generic.png  
 
 This will set the thumbnail for the *sequence*, *shot* and the
 *generic task*.
Updated by Former user

File README.rst Modified

  • Ignore whitespace
  • Hide word diff
 Batch upload thumbnails action
 ******************************
 
+This action will batch import thumbnails from a specified folder path to selected project.
+
+Using the action
+================
+
+Navigate to a project in the web interface and select the project in the spreadsheet and select Actions from the context menu.
+Click on `Batch import thumbnails`.
+
+Specify a *folder path* to a folder on your disk which
+contains images you want to use. The images should be named
+to match the entity path in ftrack.
+
+For example:
+
+    0010.png
+    0010.010.png
+    0010.010.generic.png
+
+This will set the thumbnail for the *sequence*, *shot* and the
+*generic task*.
+
+Available on
+============
+
+* Project
+
 Running the action
 ==================
 
  1. 1
  2. 2
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.