This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import Toolkit so we can access to Toolkit specific features. | |
import sgtk | |
# Import the ShotgunAuthenticator from the tank_vendor.shotgun_authentication | |
# module. This class allows you to authenticate either programmatically or, in this | |
# case, interactively. | |
from tank_vendor.shotgun_authentication import ShotgunAuthenticator | |
# Instantiate the CoreDefaultsManager. This allows the ShotgunAuthenticator to | |
# retrieve the site, proxy and optional script_user credentials from shotgun.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sgtk | |
HookClass = sgtk.get_hook_baseclass() | |
class FilterPublishes(HookClass): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We use the Project context, not the app context, to evaluate the root for all local copies, which shouldn't be | |
# dependent on individual Versions. This allow as well to have a template defined as a `path` template | |
# instead of a `string` template and not having TK failing for a missing path on the file system. | |
project_context = self._app.sgtk.context_from_entity_dictionary( | |
self._app.context.project | |
) | |
field_data = project_context.as_template_fields( | |
template, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
OlderNewer