change ;thumbnail update logic on ftrack event

This commit is contained in:
Milan Kolar 2019-03-28 14:03:55 +01:00
parent 3077785c7e
commit b19f703189

View file

@ -23,8 +23,12 @@ class ThumbnailEvents(BaseEvent):
parent['name'], task['name']))
# Update task thumbnail from published version
if (entity['entityType'] == 'assetversion' and
entity['action'] == 'encoded'):
# if (entity['entityType'] == 'assetversion' and
# entity['action'] == 'encoded'):
if (
entity['entityType'] == 'assetversion'
and 'thumbid' in entity['keys']
):
version = session.get('AssetVersion', entity['entityId'])
thumbnail = version.get('thumbnail')
@ -40,6 +44,7 @@ class ThumbnailEvents(BaseEvent):
pass
def register(session, **kw):
'''Register plugin. Called when used as an plugin.'''
if not isinstance(session, ftrack_api.session.Session):