forked from shotgunsoftware/tk-hiero-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhiero_get_extra_publish_data.py
35 lines (28 loc) · 1.25 KB
/
hiero_get_extra_publish_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright (c) 2013 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.
from tank import Hook
class HieroGetExtraPublishData(Hook):
"""
This class defines a hook that can be used to gather additional data
and add it to the data dictionary that's used to register any new
PublishedFile entities in Shotgun during the given Task's execution.
"""
def execute(self, task, **kwargs):
"""
Get a data dictionary for a PublishedFile to be updated in Shotgun.
.. note:: The track item associated with this task can be accessed via
task._item.
:param task: The Hiero Task that is currently being processed.
:returns: A dictionary to update the data for the PublishedFile in
Shotgun, or None if there is no extra information to publish.
:rtype: dict
"""
# No extra data by default
return None