mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
change ;thumbnail update logic on ftrack event
This commit is contained in:
parent
3077785c7e
commit
b19f703189
1 changed files with 7 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue