Shotgun Toolkit Core API

Core API Release Notes

These are the release notes for the Toolkit Core API. Whenever we release a new version, we enter a description of what we have changed here.

This page holds the release Notes for the Toolkit Core API.

Note: Version numbers not appearing in this list have not been publically released - usually due to issues discovered in our Release QA process. While such versions will never be available through the Toolkit App Store, they may still exist as tags within Github. We recommend avoiding such releases in production as they may not be completely stable.

v0.18.89

Software entity launch doc tweaks.

v0.18.88

Corrects an issue with accessing the config's roots data as stored in roots.yml. This bug only affected descriptors created for classic-style configs by way of the bootstrap api's config resolver class.

v0.18.87

This fixes an issue where the incorrect path to the Shotgun Desktop's python interpreter would be written to the interpreter_*.yml files if it is not installed at the default location.

v0.18.85

A minor fix to v0.18.84 that ensures that an exception is caught that could lead to the need to bootstrap using a legacy code path.

v0.18.84

Bug fixes for bootstrapping the Shotgun engine using a legacy tk-core.

Details:

An edge case existed where a locked-off site configuration housing a tk-core that did not originate from the Toolkit app store could fool the Shotgun engine bootstrap logic into thinking it was a post-v0.18.77 tk-core.

v0.18.83

Software Launch API. Bootstrap and Plugin utilities.

This is a larger release which contains a number of different fixes and improvements in a number of different areas. Most of the change is additive, however we advise extra testing for this release since it touches multiple areas of core.

Software launch API

  • Adds a new software launch API, allowing engines to implement logic for automatic software discovery. This creates an official core interface for launching DCCs and other integrations, making it easy to build "launch apps" that are used to start up toolkit integrations. The official toolkit launch app is being upgraded to phase out existing interfaces and transition to this API. A number of our engines are being prepared, implementing this interfaces, allowing for easy launch and introspection of software installs.

Developer related

  • Adds developer.build_bundle_cache script which can be used to construct a bundle cache given a plugin manifest.
  • Improved dev reference docs and structure.

Browser integration

  • Adds new core hooks for browser integration, allowing for greater flexibility and customization. These changes are in preparation of updates to the websockets server framework.

Toolkit manager/bootstrap

  • Improved progress feedback during bootstrap
  • Manager now supports setting pipeline configs both by name and id
  • Adds config override property to control if bootstrap override environment variables should be used or not.
  • Adds a pre_engine_start_callback property which allows for better integration with plugins.
  • Adds prepare_engine method which can be used to prepare for complex bootstrap scenarios.
  • Adds get_pipeline_configurations() methods for handling enumeration of pipeline configs for a project.
  • Adds helper method get_entity_from_environment() to help streamline common plugin patterns.
  • Adds helper method resolve_descriptor() to help streamline common plugin patterns.

Miscellany

  • Adds Descriptor.check_version_constraints() and a CheckVersionConstraintsError exception.
  • Adds get_python_interpreter_for_config() helper method.
  • Upgraded to a WIP Shotgun API, including better mockgun and new navigation methods.

Tests

  • Adds basic travis CI integration
  • Improved tests and extended coverage

v0.18.73

Fixes an issue with the OS http proxy settings and local installs of Shotgun.

This fix allows to disable the OS level proxy settings when accessing your Shotgun site does not require a proxy. In order to do so, you can edit toolkit.ini or shotgun.yml and add an empty http_proxy setting. This will disable access to your proxy when connecting to the Shotgun site. Please note that you will then need to set the app_store_http_proxy setting to restore access to the Toolkit AppStore, since by default connections to the Toolkit AppStore uses the proxy settings from the Shotgun site.

For more information on toolkit.ini and AppStore proxies, please visit our Toolkit Core reference.
For more information on shotgun.yml and AppStore proxies, please visit out support page and scroll down to the section named Connecting to the Toolkit app store with a locally hosted site.

v0.18.72

Improved publish path resolve logic. Other small changes.

Improves the Hook.get_publish_path() logic to handle smarter resolves and better error reporting.

The method will attempt to resolve the publish data into a path by applying several recipes:

First, the resolve_publish core hook will be called. This hook can be used either in order to override any built-in behavior or to implement support for url schemes, uploaded files or other modes which the default implementation currently doesn’t support. The hook returns None by default, indicating that no resolve overrides are present. If no path was resolved by the hook, the method will check if the publish is associated with a local file link and if so attempt to resolve this to a path (for more details see below). Next, it will check if the publish is linked to a file:// url and attempt to resolve this. Lastly, if the publish still cannot be resolved, a PublishPathNotSupported is raised.

If the publish is a local file link, its local OS representation will be used. Local file links are generated automatically by register_publish() if the path you are publishing matches any local file storage defined in the Shotgun Site Preferences. Read more about local file links here.

The method also supports the resolution of file:// urls. Such urls are not multi platform and the local storages and environment variables will therefore be used to try to resolve such paths in case of ambiguity. First, local storage settings will be downloaded from Shotgun and added to a path translation table. Next, any environment variables of the form SHOTGUN_PATH_WINDOWS|MAC|LINUX or SHOTGUN_PATH_WINDOWS|MAC|LINUX_STORAGENAME will be added to the translation table. The file:// path will be compared against all the existing roots for all operating systems. The first match detected will be used to translate the path into the current operating system platform. If no root matches, the file path will be returned as is.

For more information, see the API docs. In addition to the above:

  • Added a general utility method sgtk.util.resolve_publish_path(tk, sg_publish_data). This is what is being called by Hook.get_publish_path()
  • Hook.get_publish_paths() has been marked as deprecated and taken out of the docs
  • Improved sphinx docs for Hook.get_publish_path()
  • Improved sphinx docs for exceptions in general
  • Added new exceptions for publish lookups
  • Added new core hook resolve_publish() for business logic implementation of custom resolvers.
  • Added Hook.sgtk and Hook.tank properties for easy access to core API instance from hooks
  • Fixes bug with resolution of file:// urls with windows drive letters
  • Split the shotgun.py file into multiple smaller chunks
  • Added in-memory caching of local storages for performance
  • Added setters to ShotgunPath os accessors .macosx, .windows, .linux and .current_os
  • Added ShotgunPath.normalize() method for path sanitation
  • Added extensive test coverage of the changes above.
  • The project context string representation now returns Project Test instead of just Test
  • App store descriptor optional label support: This allows for a workflow where a single stream of updates from the app store can target several different plugin releases. The primary use case for this is that you want a single config to drive plugin based integration. For more info, see the descriptor documentation.
  • The hard coded list of entity types available for use as context in the tank command has been updated to reflect the available types provided on new sites. 44 new entity types added. The list has also been sorted alphabetically to make it easier to look over.
  • Adds a dry_run option to the register_publish method which will return the dictionary of data that would be supplied to SG for creating the publish entry.
  • Fixes a bug with the hook validation when using inheritance.

v0.18.69

Speeded up the path cache syncing process.

When syncing the path cache, any delete events are now played back on top of the current state of the path cache instead of rebuilding it from scratch.

v0.18.64

Improvements to register_publish(). Improved png handling. Grouping of registered commands.

Details:

  • The method now offers two new levels of storage fallback. If the path is not associated with any root belonging to the current toolkit project, the publisher will attempt to find a suitable local storage in Shotgun. Failing this, the publish will be registered with a file:// url. For more details, see the API reference.

  • Improved exception handling. If publishing fails, a sgtk.util.ShotgunPublishError exception will be raised. This exception includes information about the state of the publish at the time it was raised, allowing calling methods to make intelligent decisions around for example rollback logic. For more details, see the API reference.

  • Fixes a bug where Windows UNC paths with forward slashes (e.g. //server/share/path/to/file) were treated as urls. These are now correctly interpreted to be paths.

  • Silences libpng warnings from Qt when the png files are loaded as pixmaps.

  • Added support for grouped registered commands. This introduces a standard for clustering registered commands together into groups. Engines may implement the standard in different ways, or not at all. This change to core defines the convention and adds graceful handling for colliding registrations. For more details, see the API reference.

  • Fixes an issue with descriptor cloning. If the destination of a clone is inside one of the fallback bundle cache, the get_path method will return a different value after creating the destination folder. This ensures that the folder is not used. This fixes a known issue with the plugin build script sometimes not including all items in the bundle cache.

v0.18.59

Bug fixes, updated tests and improved documentation.

Details:

  • Fixed a bug in hook.disk_location affecting complex hook inheritance scenarios.
  • Updated docstrings for register_command
  • Improved tests for descriptors
  • Updated documentation related to the publish_type data type.

v0.18.58

Bundle existence is determined by directory existence rather than checking for its info.yml.

Details:

With the release of v0.18 of core, bundle existence began being determined by the existence of the info.yml file. This introduced a regression due to the fact that there are legitimate situations whereby a bundle could not contain an info.yml. Instead, we now check for the existence of the bundle's root directory and assume existence if it is present. This release also switches to using the "creatordate" when sorting Git tags, which will work for all tag types that we might encounter rather than only supporting annotated tags, as before.

v0.18.57

Corrects the error message presented to the user after a failed "folders" action related to a Step entity.

v0.18.56

Resolves an issue with dependent publish look ups by path.

Details:

The example case is in Nuke, where all paths associated with a Read node in the Nuke scene being published are tested to see if they correspond to an existing PublishedFile in Shotgun. Those that do are set as dependencies of the newly-created PublishedFile entity. The bug was that certain situations, most notably that of multiple templates matching a path being tested, would error out and stop the publish action from completing. The behavior now is to skip those paths and continue on so as to not stop the publish.

v0.18.55

Log a user activity metric when an engine is bootstrapped.

v0.18.54

Updated SG authorization and added a new parameter (w/ default) to sgtk.util.download_url() method.

Details:

Integrated authorization features from the Shotgun API download_attachment() method that will allow input URLs containing a shotgun server name to correctly redirect to an s3 location.

Added use_url_extension parameter to append the filetype extension of the resolved url to the input download location. In some cases, the target content of the url is not known beforehand. For example, the url https://my-site.shotgunstudio.com/thumbnail/full/Asset/1227 may redirect into https://some-site/path/to/a/thumbnail.png. In such cases, setting the use_url_extension parameter to True will cause the method to append the file extension of the resolved url to the filename passed in via the location parameter. So for the urls given above, you would get the following results:

- location="/path/to/file" and use_url_extension=False would return "/path/to/file"
- location="/path/to/file" and use_url_extension=True would return "/path/to/file.png"

v0.18.53

Raise a meaningful exception for an unknown project id.

Details:

For an unknown project id, a meaningful python ValueError exception is now raised when bootstrapping. For example:

Shotgun initialization failed: Configuration could not be installed: Unknown project id 123456789.

v0.18.52

Added new features to hooks.

Details:

  • The hook base class now has a logger property which makes it easy for any hook to log to the default toolkit logging systems. For more information, see the API Reference.
  • The hook base class now has a disk_location property which makes it easy for a hook to locate files relative to the hook files. For more information, see the API Reference.
  • Added bundle.create_hook_instance() method which allows for the instantiation of hooks, allowing for stateful hook workflows.
  • Tweaks to the caching policy bootstrap logic.

v0.18.50

Support standard operating system http proxy settings.

Details:

When the http proxy is not set in the user settings, fall back on the operating system http proxy.

Note the following restriction when looking for proxy information from Mac OS X System Configuration or Windows Systems Registry: in these cases, the use of proxies which require authentication (username and password) is not supported.

Refer to the documentation for details.

v0.18.49

Better app caching selection and control, and minor bug fix.

Details:

While bootstrapping, when caching the apps associated with a given toolkit instance, select the environment based on the current configuration, then select the descriptors for the current configuration engine, in order to download only the needed apps.

Add property ToolkitManager.caching_policy to specify the config caching policy to use when bootstrapping.

  • Setting it to ToolkitManager.CACHE_SPARSE will make the manager download and cache the sole config dependencies needed to run the engine being started. This is the default caching policy.
  • Setting it to ToolkitManager.CACHE_FULL will make the manager download and cache all the config dependencies.

Bug fix to ensure that the busy dialog is correctly closed if clicked on by a user.

v0.18.42

Fixes a bug with the validate flag in sgtk.Context.as_template_fields.

Details:

The method sgtk.Context.as_template_fields will no longer raise an exception if the validate flag is set to False and the context is missing an entity required by field in the templates.

v0.18.41

When there is no file system locations, hide the 'Jump to File System' button.

v0.18.40

Tweaks the summary printed at the end of a run of the "tank updates" command to include forced-updated frameworks.

v0.18.39

Adds a "minimum_version" setting to bundle framework requirements.

Details:

When specifying a required framework in an app/engine/framework's info.yml file, a minimum_version setting can be added. If that minimum-version requirement is not satisfied, that bundle will not be loaded at startup and an error will be printed to the console. When updating a configuration using the tank command, any apps/engines/frameworks that require a minimum version of a framework will automatically trigger the update of that framework if the requirement is not already met.

v0.18.38

Recaches engine settings during context change.

v0.18.37

Fixes a regression when launching engines where Qt is unavailable.

v0.18.36

Fixes an issue where the global busy dialog text was being cut off due to new font.

v0.18.35

Adds pip support to Toolkit.

Details:

You can now install sgtk from the pip command or add it to your requirements.txt. This is useful in conjunction with toolkit plugins and the Toolkit Bootstrap Process. Use the following syntax:

pip install git+https://github.com/shotgunsoftware/tk-core@v0.18.35

The following simple example illustrates how to add the latest sgtk API to a virtual environment:

$ virtualenv /tmp/pip_test
New python executable in /tmp/pip_test/bin/python
Installing setuptools, pip, wheel...done.

$ source /tmp/pip_test/bin/activate

(pip_test)$ pip install git+https://github.com/shotgunsoftware/tk-core@v0.18.35
Collecting git+https://github.com/shotgunsoftware/tk-core
  Cloning https://github.com/shotgunsoftware/tk-core to /var/folders/v6/f96y2r0x3vz91h_sw6xgxly40000gp/T/pip-WQjekN-build
Installing collected packages: sgtk
  Running setup.py install for sgtk
Successfully installed sgtk-0.18.35

(pip_test)$ python 
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sgtk

v0.18.34

Bundles Open Sans font with core.

Details:

This is now the default font for engines using the bundled dark look and feel. The font is loaded automatically and allows any app to make use of the font via stylesheets.

v0.18.33

Toolkit now only logs metrics for custom core hooks once per session.

v0.18.32

Adds two new properties to string keys: subset and subset_format

Details:

This new format allows for a template to be configured to extract a substring pattern given a field value, for example a user's initials given a full name or the three first characters of a Shot name.

v0.18.31

Fixes an issue where environment variables specified at the front of environment or template includes don't get evaluated on Windows.

v0.18.30

Fixes a regression introduced in v0.18.13 that broke the TK_DEBUG environment variable.

v0.18.29

Override for Shotgun home folder and fix when rotating logs.

Details:

  • Introduced the SHOTGUN_HOME environment variable, which allows to override the root folder where Toolkit will output its logs, caches and session information.
  • Fixed an issue on Windows where two processes writing to the same log file at the same time prevented either of them to log anything once the maximum log size was reached.

v0.18.28

Misc updates and fixes.

Details:

  • In a filesystem configuration where there are task folders but no step folders, context_from_path() now returns a context which includes both step and task when a task folder is being passed. Previously, it would generate a context which had a task entry but no step.
  • Improved handling of a concurrency case where two processes where trying to run an incremental path cache sync and both of them tried to insert the same record at the same time, generating sql uniqueness constraint errors. Now, the first writer will succeed and the second writer will silently continue after it has determined that the record already exists.
  • Minor fixes around asynchronous bootstrap thread handling.
  • Fixed an issue with the Pyside2 handling of QDesktopServices where the return value was incorrect.

v0.18.27

Updates core's python-api to the latest release (v3.0.32).

v0.18.26

Changed entry point concept to be called plugin id. Site wide config overrides.

Details:

  • Changed the bootstrap API to use plugin_id rather than entry_point. The change is backwards compatible, however it is strongly recommended that any plugins created with earlier versions of v0.18 are rebuilt and modified to use plugin_id instead.

  • Improved progress reporting during the bootstrap process.

  • Added site wide shotgun pipeline overrides, allowing for a single pipeline configuration to drive the configuration of a given set of plugins across all shotgun projects.

v0.18.25

Threaded bootstrapping, baked builds and bug fixes.

Details:

  • Adds method ToolkitManager.bootstrap_engine_async() which launches the bootstrap process and returns immediately. Sgtk is bootstrapped asynchronously in a background thread, followed by launching the engine in the main application thread. This allows the host application to continue its execution and remain responsive when bootstrapping the toolkit involves downloading files and installing apps from the toolkit app store.
  • The plugin build script now handles baked configurations in a more complete fashion. Any plugins with a config of type baked will be built in such a way that no installation is installed at bootstrap. The setup runs from within the immutable plugin .
  • The baked descriptor type already introduced in the build script is extended to carry through into the built data - for these baked descriptors, a complete and installed configuration is baked in.
  • sgtk.util.shotgun.get_associated_sg_base_url() now uses the authenticated user's base url if available and only falls back on shotgun.yml if needed.
  • Build script outputs file sizes.
  • Method for computing file sizes has been added to the filesystem utils
  • Added a manager init convenience method to the automatically generated manifest file
  • Added support for script based authentication to the build script
  • Improved sphinx docs for descriptor uris
  • Added TK_BOOTSTRAP_CONFIG_OVERRIDE environment variable to help plugin dev.

v0.18.24

Exposes the QT5 modules, UI enhancements and regression fixes.

Details:

  • In environments where QT5 has been made available, Toolkit will expose all available modules under sgtk.platform.qt5. To learn more about how QT5 has been exposed in Toolkit, please read our reference documentation.
  • The login dialog will now always display placeholder text in a text box, even if it is focused.
  • Fixes a regression introduced in v0.18.0 where the migrate_desktop and upgrade_folders commands would crash on exit.
  • Fixes a regression introduced in v0.18.18 where configuring a git-based pipeline configuration would not copy over the .git folder.

v0.18.22

Adds toolkit manager runtime Shotgun configuration lookups.

Details: This means that it is now possible to implement dynamic overrides via the existing Pipeline Configuration concept in Shotgun, allowing for shotgun users to take control over the behaviour, configuration and deployment of plugin based payloads. Notable points:

  • The system will look for the fields project and plugin_ids or sg_plugin_ids to determine a suitable set of pipeline configurations. The latter field is to ensure backwards compatibility with older shotgun versions, where you can create this field by hand. It will then determine which configuration to use based on the value of the pipeline_configuration property. If this is set to None (the default value), it will try to determine the most suitable configuration, taking into account the users field. If it's set to an explicit value, this will be used. If the lookup fails, the manager always falls back onto the base_configuration.

  • Once having detected a pipeline configuration, the lookup will first check the traditional path fields, then look for the fields descriptor and sg_descriptor where it expects to find a descriptor uri string to resolve the config from.

  • The ToolkitManager.pipeline_configuration property has shifted its default value to be None rather than primary. If None, it will automatically determine the pipeline configuration to be used by looking at the users field in Shotgun. This makes it easy to support dev sandbox workflow for toolkit plugins.

  • The plugin build script has moved from the scripts folder into a new developer folder.

v0.18.19

Off-line descriptors and plugin build script.

Details: - This adds a new script to toolkit, located in scripts/build_plugin.py. This script makes it easier to build and release toolkit plugins. - Adds a sgtk.__version__ to core. - Descriptor primary and fallback paths now support environment variables and tildes. - The bootstrap logic has been changed so that if a base_configuration descriptor is passed in without a version number, it is assumed to be auto updated. If however, the version number is provided, it will not auto update at bootstrap time. - Optimized the core upgrade to download less from the app store. - Shotgun attachment download now logs download speed to debug. - Added documentation for engine events. - Adds support for off-line descriptor fallback to the bootstrap and the rest of toolkit. - The create_descriptor() call has been augmented in the case when you pass resolve_latest=True. In this case, it now tries a remote resolve first and if that fails attempts a local resolve of the latest version given all items that exist in the cache. - A new find_latest_cached_version() method has been added to the official descriptor API with similar characteristics to the find_latest_version() method. - Introduced a has_remote_access() method to probe whether or not a descriptor can reach its remote. - Git branch descriptor now caches into a gitbranch folder rather than git. - Shotgun descriptor now caches into a more elaborate structure on disk in order to allow for cache computations. - Fixed issue with shotgun descriptors and bundle cache - sg descriptors are now cached by sg site to ensure uniqueness. - Fixed bug in shotgun descriptor project handling.

v0.18.18

Improved git support.

Details: This cleans up and simplifies git support in toolkit. Previously it was a little inconsistent.

  • All git operations are now completely encapsulated within the git descriptor.
  • Simplifies code and makes things more coherent.
  • Removed unused internal interfaces and parameters.
  • Git repos are now copied across rather than cloned when using the copy method.
  • Improved docstrings and docs.
  • Improved and more consistent error reporting on failure.
  • Added unit tests.
  • The clone_cache() method no longer copies content if it already exists on disk.
  • Descriptor search path is now traversed starting with the fallback paths and then the primary location.

v0.18.16

Adds a global configuration file to specify proxy settings. Fixes to project setup.

Details:

This global configuration file will provide default values for the Shotgun proxy and app store proxy when the authentication module cannot find any proxy settings in the shotgun.yml settings file. Visit the Toolkit reference documentation to learn more about this new file.

This release also fixes a 0.18 regression which would cause certain projects to not set up correctly. If you were using the Shotgun Desktop and creating a new project based on an old project's configuration, and this configuration was using Core 0.17 (or earlier), an error would be displayed, saying that the desktop engine couldn't start. This was caused by the apps, engines and frameworks being copied to the new app store cache structure, which is default in 0.18 but not known to the 0.17 cores. This is now fixed, and whenever a 0.17 core is being used in conjunction with the project setup, the entire install folder is copied across to ensure that all cached information is being correctly carried across.

v0.18.14

Fixes an issue with the authentication module when no current host is set.

v0.18.13

Fleshed out dump_config command usage, context serialization fix and tweaked LogManager API.

Details:

dump_config command

This change is limited to the dump_config command and fleshes out the usage and information displayed when invalid/insufficient parameters are passed. Also includes a little more output to indicate when the process completes.

The --no-debug-comments option has been changed to --no_debug_comments to be consistent with other commands.

Context serialization

Methods sgtk.context.serialize and sgtk.context.deserialize have been deprecated. Application code should now invoke the new serialize method on sgtk.Context objects and the class method sgtk.Context.deserialize to deserialize a context.

The sgk.Context.serialize method also has an optional parameter that allows to serialize a context without the user credentials. This is handy when your application needs to restore a context without restoring the user credentials, for example on a render farm.

LogManager API

The sgtk.LogManager methods initialize_base_file_handler and uninitialize_base_file_handler now return a file path instead of a logger name. Also, initialize_base_file_handler_from_path has been introduced. It allows to store a log file anywhere on disk.

v0.18.12

Improved retry for failed downloads. Bug fixes around git based project setup

Details:

  • Fixed an older bug causing the tank command to fail in Python 2.5
  • Improvements to documentation and error messages
  • Hook exception traps introduced in v0.18.8 were relaxed to only cover core hooks.
  • Fixed a regression in 0.18 related to when projects are being set up from a git repo. Previously, the content would always be pulled from the git repo's master branch. In v0.18, the behavious accidentally changed to be pulling from the tag with the highest version number. This patch release reverts the behaviour back to always fetching from master.
  • Fixes an issue where warnings would sometimes be reported when downloading new apps. These warnings were false positives and not indicating any problematic state.
  • Adds smarter retries when a bad attachment is downloaded or when app store or shotgun attachment downloads fail for whatever reason. This helps with the particularly annoying issue where Shotgun Desktop says "file is not a zip file" during project setup. Also helps with intermittent connections. Toolkit will now retry 4 times (which likely will resolve the issue) and if that still fails, it will emit a human friendly error message along the lines of "Failed to download Toolkit App Store Config tk-config-default v0.15.11. Error: Failed to download attachment after 5 retries. See error log for details.".

v0.18.10

Adds engine events.

Details:

Engine events are emitted by an engine when something occurs in the host DCC application that child sgtk apps need to be notified of. As of this initial implementation, the FileOpenEvent is available. When an event is emitted by an engine, each of its child apps will have their event_engine() method called, regardless of the event type, and then the event-type-specific method will also be called (ie: event_file_open()). This closely mirrors the Qt framework's event system.

v0.18.9

Fixes download statistics for the core on the app store.

v0.18.8

PySide 1 emulation layer for PySide 2 environments.

Details:

Applications written for Toolkit have always been written with PySide1/PyQt4 in mind. Therefore, running these applications in a PySide 2 environment means having to update the application code since Qt5 is not backwards compatible with Qt4. Toolkit thus provides a PySide 1 emulation layer on top of PySide 2 so applications written for PySide 1 can run in PySide 2 without any modification.

Note that this emulation layer is not exhaustive and is currently targeted to run our supported applications and engines. If you find an issue with your application running in PySide 2, please contact support@shotgunsoftware.com and let us know which part of the API is not working so that we can fix our emulation layer.

Also introduced exception traps around hooks, ensuring that all exceptions raised within hooks are logged (but not trapped) by the toolkit logging system.

v0.18.7

Fixed localize bug causing project setup to fail when basing a new project on an existing config.

Details:

  • Fixed a bug which was causing certain items to be missing from a new project's app cache when it the project was created from another project's config. This issue was caused by the fact that toolkit maintains a global in-memory cache of descriptors, which wasn't working well with some of the localize logic. A new descriptor.clone_cache() method has been added, making it easy to build and maintain bundle cache collections and the localize command has been updated to use this interface.

  • Tweaked the logic for how the skip_list parameter is handled within utils.filesystem.copy_folder().

  • Modified the default permissions for the copy file I/O method. This was introduced in 0.18 and they were wrong.

  • Improved use of internal I/O methods.

  • Added logging around descriptors.

v0.18.5

Misc tweaks and fixes.

Details:

  • The config_path settings type is now less strict and doesn't raise an exception when a target is missing. In practice, this means that for example missing multi publish icons will not stop the publish app from loading, but instead fall back on using a default icon graphic.
  • Improved storing of user settings. Users exclusively using the tank command and not the Shotgun Desktop previously had to log in each time.
  • Add access method to retrieve the cache location for a project other than the current.
  • Toolkit initialization speedups, particularly for TaaP scenarios.
  • Added additional timing and debug around shotgun calls.
  • Fixed regression causing apps with manifests containing requires_shotgun_fields sections containing fields not starting with sg_ to fail.

v0.18.2

Compatibility fixes and tweaks.

Details:

  • Added back a constant for backwards compatibility - this was causing the Desktop project setup wizard to fail when a project's config was selected from an existing project.
  • Dev descriptors now supports paths with ~ (e.g. home directory) folders.
  • Added stylesheet constant SG_LINK_COLOR for hyperlinks.
  • Improved API documentation for register_command().

v0.18.1

Fixes an issue when an unexpected error occurs when connecting to the Toolkit App Store.

v0.18.0

Toolkit as a Plugin, improved logging, documentation and APIs.

This is a major update and we strongly recommend testing prior to studio rollout.

What's new in Core v0.18?

Toolkit Core v0.18 contains a number of major changes:

  • We have a brand new and improved set of developer reference docs: http://developer.shotgunsoftware.com/tk-core

  • Toolkit logging has been extended and improved. This makes debugging toolkit application much easier. For a summary of what has changed, see below. Alternatively, check out the reference documentation for details.

  • Sparse environment configurations are now supported. A sparse environment configuration only contains the settings values that are non-default, thereby drastically cutting down on the size of configuration files. Sparse configurations are default from 0.18, so if you run tank install_app or tank updates, toolkit will no longer bake default settings values into the config. You can overview and convert your existing configurations using the new tank dump_config command.

  • The cache_location core hook has been updated to better handle Toolkit Plugins. If you have customized this hook, we strongly recommend tweaking it for 0.18.

  • The local directory structure storing cache files, settings and log files has changed in order to have shorter paths and a less redundant structure, primarily to make Toolkit less likely to run into issues with MAX_PATH on Windows. As of Toolkit 0.18, cache and settings files will start to be stored in a new layout on disk. Backwards compatibility logic is provided in most cases via the cache_location core hook, meaning that Toolkit will first check the previous cache location and if this is detected, it will be used for backwards compatibility. Toolkit cache, logging and data locations have been formalized and can be accessed via a new public API.

  • Similarly, the install location on disk which caches apps, engines and frameworks has a slightly different structure in the interest of shortening paths. Toolkit descriptors now support a search path, allowing it to look for a cached app in multiple locations on disk, and the legacy install locations are automatically added to this search path, meaning that Toolkit will be able to locate all old app caches. As toolkit upgrades or installs new apps, these will end up in the new structure.

  • A new hook keyword {engine} has been introduced, allowing apps to access hooks inside the currently running engine. This means that apps can configured to use hooks that are distributed with an engine. This makes it possible to upgrade for example the Maya engine to be distributed with hooks for referencing and importing content and then all apps that rely on such fuctionality (for example the Toolkit Loader and the Toolkit Panel) can reference the hook that comes with the engine rather than having to distribute their own.

  • Configurations can now explicitly specify which core they require by adding a core/core_api.yml file containing a location key.

  • Improved handling of desktop auto-update and when a connection to the toolkit app store could not be be established. Previously, this could cause extensive hangs in certain IT setups. Now it is capped with a five second timeout.

  • Improved handling of cases when the shotgun host and proxy information is unicode

  • Added a new menu item that will appear on the context menu in all engines, allowing a user to quickly open up the folder that now contains all the auto-generated Toolkit log files. This makes it easy to locate these log files in order to for example pass them on to our support team for further investigation.

  • It is now possible to bootstrap Toolkit without any prior setup. This allows for a workflow where Toolkit can be embedded inside other environments, sometimes referred to as Toolkit as a Plugin. There is no need to set up a pipeline configuration in Shotgun with this workflow and it makes it straightforward to package up and deploy tools and functionality on top of the Toolkit platform without requiring the user configure anything. You could for example use this to ship a Toolkit based tool that runs directly from a Maya plugin. For more information, see the reference documentation.

  • The Core API has been extended with several new additions:

  • Previously an internal mechanism, the Descriptor API makes it easy to handle remote file location and locally cache items out of cloud based systems.

  • The authentication API have been moved from tank_vendor.shotgun_authentication to sgtk.authentication. A backwards compatibility layer is in place to support the previous access point.

  • Several new utility methods have been added to help manage cache files and I/O.

  • The Shotgun API has been upgraded to use v3.0.31.

Backwards Compatibility

Core v0.18 is fully backwards compatible with previous releases of Toolkit. Its documented and public facing API is fully backwards compatible.

Please note however that there have been extensive internal refactoring and relocation of code in order to reach a more standardized, future proof and easily maintainable internal structure. If you have code that accesses Toolkit internals, make sure to test this prior to site wide rollout.

Descriptors - A new API for handling remote locations

Toolkit's descriptor API is now part of the public API. The descriptor API is used to cache and retrieve remote payloads from Shotgun, the file system, the Toolkit app store, git etc. The descriptor system is already used extensively by toolkit internally. As of Core v0.18 it is available for general use.

The following things are notable extensions to the descriptor system:

  • A string based uri format has been introduced for descriptors. Previously, descriptors were always expressed as dictionaries such as the location in the environment configuration. Now, a fully compatible string based format has been introduced. The two forms are interchangeable.
  • The Toolkit Core and Toolkit Configs are now also fully supported descriptor types. Previously, only apps, engines, configurations and frameworks could be expressed as descriptors. This is utilized by the core deploy process which now fully caches cores and configs for reuse. It also makes it possible to specify which core should be used in a particular configuration via the new core/core_api.yml config file.
  • A set of fallback paths can be specified, allowing for a complex set of descriptor caches.
  • A 'global bundle cache' has been added to toolkit where bundles can be shared between projects and services. Toolkit projects launched via the new bootstrap process utilizes this feature by default. Traditional Toolkit projects which have been set up via the project setup process work the same way as previously. Projects can be manually configured to use bundle fallback locations by setting the bundle_cache_fallback_roots in the pipeline_configuration.yml config file.
  • A new git_branch descriptor has been added which makes it possible to set up configurations to track a particular branch in git.
  • A new shotgun descriptor has been added which makes it possible to use a Shotgun attachment field as a code deploy mechanism.
  • A path descriptor has been added. This is identical to a dev descriptor, with the exception that it is not intended for development purposes.

Improved Logging

The new logging system is extensively documented in the API reference documentation.

In a nutshell, the new logging system includes:

  • Improved logging for core and external scripts. You can now very easily include a standard toolkit logger at the top of your file by simply including logger = sgtk.LogManager.get_logger(__name__).
  • You can now log inside your app/engine/framework python code by simply including logger = sgtk.platform.get_logger(__name__) at the top of the file.
  • All of toolkit now uses this generic logging and all logs end up in a single log hierarchy with an sgtk parent logging node.
  • A new sgtk.LogManager class makes it easy to add your own handlers for displaying log information.
  • Automatic backend log files are written out by Toolkit into a default log location. This makes it easier to troubleshoot issues.
  • A TK_DEBUG environment variable has been introduced. If this is detected, Toolkit will switch to debug logging across the board. A global_debug flag is also available to control this behaviour.
  • Logging in engines have been improved and refactored, allowing for future refactors of each engine.
  • Several new decorators and utilities have been added for easy access to logging.

v0.17.28

  • Incorporates v3.0.31 of the Shotgun Python API.
  • Added core hook allowing to listen for context change events.

Details:

The new core hooks, implemented in hooks/change_context.py, allows a developer to listen for context change events at the core level. The hook can actually be used to listen to two different event types, pre_context_change and post_context_changed. In each case, the previous and new context will be passed in. Note that when a context change is invoked with the same context, the hook will still be executed.

v0.17.25

Upgraded Shotgun API to v3.0.30.

v0.17.24

Fixes two authentication related bugs and the core command.

  • The --script-user and --script-key arguments were ignored in certain circumstances on the tank command line.
  • Console based and UI based authentication now perform whitespace cleanup of a user's site and login.
  • core command can now be used with global command-line arguments.

v0.17.21

Adds a new exception for missing method in hook

This is a small change that adds a new exception type to core called TankHookMethodDoesNotExistError. This is raised when execute_hook_method fails because the specified method does not exist in the hook.

v0.17.20

Fixes multi-project path cache synchronization issues.

Fixes a bug which would cause unnecessary full syncs of the path path cache in some situations when more than one project was being active at once.

v0.17.19

Defaults to the whitespace-preserving yaml parser

This switches the yaml parsers around so that the ruamel (the new, smarter parser) is the default one and you can opt out of this if needed.

The previous tank command flag --preserve-yaml has been deprecated and replaced by a --use-legacy-yaml flag instead that can be added if you want to opt out. Similarly, the TK_PRESERVE_YAML environment variable has been replaced by a TK_USE_LEGACY_YAML one.

v0.17.18

Fixes an issue when a new dependency is already present in an environment.

Fixed an edge case that prevented new frameworks from always being installed in the same file as the bundle that required it. In that edge case, the framework was registered in the main environment file, which meant other environments which included the file defining the bundle wouldn't have access to the framework through its frameworks section.

v0.17.17

Copies core API files during push_configuration command when appropriate

In a localized config, there are files (interpreter_*.cfg and shotgun.yml) related to the core API that need to exist for the config to function. These files were not being copied over to the target config which caused the target config to raise the error:

The Toolkit configuration path points to an invalid configuration.

This change will copy the necessary files only when both the source and target pipeline configurations are localized. When the source is localized and the target is not localized, we don't copy these files. We do issue a warning saying that the files will not be copied over and provide a list of the files in question.

In summary, when running push_configuration:

  • source config localized, target config localized ==> copy core api files
  • source config localized, target config not localized ==> do not copy core api files (issue warning)
  • source config localized, target config localized ==> do not copy core api files
  • source config localized, target config localized ==> do not copy core api files

v0.17.16

Allows to upgrade or downgrade a pipeline's core using the --version parameter.

When running the tank core command, it is now possible to specify a specific version of core you wish to upgrade or downgrade to. For example, if you wanted to downgrade to v0.17.10, you would type tank core --version v0.17.10. Note that if you downgrade to a version prior to v0.17.16, you won't be able to use the --version argument anymore until you've run tank core to upgrade to the latest version.

v0.17.14

Set an http proxy for the Toolkit App Store connection.

This is meant to be used mostly with local installs of Shotgun. Such an install doesn't require an http proxy to connect to the Shotgun site, but could require one to connect to the Internet and therefore the Toolkit App Store. The new setting, app_store_http_proxy can be set inside shotgun.yml and will be used only for App Store connection. Note that if both app_store_http_proxy and http_proxy are specified, app_store_http_proxy takes precedence. Just like before, if only http_proxy is set, it will be used both for App Store connections and connections to the Shotgun site. If both are set, but app_store_http_proxy is null, then a proxy will only be used for connections to the Shotgun site.

v0.17.12

Set a default timeout for the Toolkit App Store connections

When launched, SG Desktop attempts to connect to the Toolkit app store to check for updates to the desktop startup framework. For studios that have blocked internet access, connections to the Toolkit app store are usually rejected, which is handled correctly and the startup process will continue normally and will emit a log message stating the app store was unreachable.

However, if the firewall is configured to drop the connection rather than reject it, the client is left waiting for a response. In this case the "client" is the Shotgun API handle that Toolkit uses, which by default specifies no explicit connection timeout value. This means the timeout used by the API falls back on the default value set by the specific socket implementation for your platform. This could mean the connection waits forever causing SG Desktop to hang upon startup.

This fix ensures a reasonable default (5 seconds) is set on the API connection for the Toolkit App Store. If the connection fails to return a response after the timeout, an exception is raised which will be caught by the desktop startup framework.

Note that because the SG API (currently) retries failed connections 3 times by default, this means the full timeout will take 15 seconds. Also (currently) the timeout isn't settable until the SG API instance has been created. Since the SG API also connects to the server by default when instantiated, this would mean the timeout would still be None on the initial connection, defeating the purpose. So we also set the connect parameter to False so that we don't actually connect to the SG server when the SG API instance is created. This allows us to set the timeout before a connection is made.

v0.17.11

Adds config syntax to source hooks from the currently running engine

This change adds a new config syntax for hooks to allow them to be sourced from within the current engine. The new syntax looks like this:

hook_setting: {engine}/my_hook.py

At runtime, the {engine} token will be evaluated to the hooks directory within the currently running engine. This change makes it possible to package DCC-specific behavior with the engine rather than in each of the individual multi-apps.

v0.17.10

Fixes a race condition in sgtk.platform.current_bundle.

Details:

  • Fixed a bug where multiple threads calling import_module at the same time would corrupt the import stack.
  • Fixed a bug where a thread calling import_module would cause a side-effect in an unrelated thread.

v0.17.9

Update Python API to v3.0.29

Details:

  • The timezone objects returned in the datetime objects from the Python API are now serializable.
  • The change for the default field name for thumbnail uploading in the Python API has been reverted.

v0.17.8

Adds an optional flag to log_metric for apps

Details:

Since we're often logging the app version when we log a metric for app execution, this change adds an optional flag to take care of both with one call.

v0.17.7

attach_to_core() can now be run non-interactively via the API.

Details:

The non-interactive mode of the attach_to_core() command was not suppressing prompts making it impossible to run this command via the API without user interaction. We now correctly pass the correct boolean flag to suppress the user prompts when running non-interactively via the API.

v0.17.6

Username in session cache is now case insensitive.

Details:

This fixes an issue where the authentication framework couldn't recognize that two logins with different casing were actually the same and therefore prompted you for a password.

v0.17.5

Fixes regression with some Apps not executing correctly from Shotgun.

Details:

This fixes an issue where shotgun apps which supports the multi select property wouldn't execute. This includes "create folders" in Shotgun and several others.

v0.17.4

Fixes regression with metrics logging attempting to access shotgun connection without authenticated user.

v0.17.3

Make sure HTTP proxy authentication works with the @ character in a password.

v0.17.2

Toolkit metrics logging.

These changes add the ability to dispatch metrics to SG. Metrics are collected into a queue during normal Toolkit execution and activity. During engine startup, one (the default) or more dispatcher worker threads begin pulling metrics from the queue and forwarding them to a new metrics logging endpoint in SG.

v0.17.0

Adds on-the-fly context changing support to Toolkit engines and apps.

Details:

Previously, the context that a toolkit engine and its apps were running in was immutable. Any change in context required the engine and all apps to be torn down and restarted, which is not fast enough to be practical in some cases. With the introduction of Nuke Studio to the family of DCC applications that are supported by Shotgun Toolkit, it became necessary to support a faster approach to changing contexts. Engines that support on-the-fly context changes can now accept a new context and will handle reuse of already-running apps that themselves support context changes.

v0.16.42

Fixes a regression in the context validation that was introduced in Core v16.40.

v0.16.41

Misc fixes and tweaks.

Details: - Adds support for unregistering folders for individual tasks in task-based file system setups. - Git framework and code locator now supports arbitrary levels of version nesting (e.g. vA.B.C.D.x.x version patterns are now supported in the git version comparison code). - Improved error messages around configuration path resolution in toolkit startup.

v0.16.40

Upgrades Core to use v3.0.25 of the Shotgun API.

Details: The Shotgun API upgrade is in response to the SHA-2 certificate changes that will be happening shortly. For more information see, please the following links:

  • Blog post with information: http://blog.shotgunsoftware.com/2016/01/important-ssl-certificate-renewal-and.html
  • Shotgun API release notes: https://github.com/shotgunsoftware/python-api/releases/tag/v3.0.25

This release also contains a bug fix that allows apps to specify a required context as part of their manifest. This feature was previously not working correctly.

v0.16.38

Engine startup speed optimizations and new tank commands.

Details: Optimizations for speed, plus the addition of a Tank command "cache_yaml" that will crawl a config and cache all yaml data into a .pickle file at the root of the config. Upon initialization, core will pre-populate its in-memory yaml cache with this data as a starting point, and then maintain the cache in memory the same as before (mtime, file size of .yml files). Adds the get_entity_commands tank command (API only) to get the list of possible commands that can be executed on certain entities. This list is fetched by invoking the ./tank executable of another pipeline configuration. It fetches it from the other project's cache (and updates it first if needed). Also, a small fix for tank command to correctly detect Windows platform when on Windows 10 using a linux-type shell is included.

v0.16.37

Tank Command to get the commands for entities

Details: Adds the get_entity_commands tank command (API only) to get the list of possible commands that can be executed on certain entities. This list is fetched by invoking the ./tank executable of another pipeline configuration. It fetches it from the other project's cache (and updates it first if needed).

v0.16.36

Small fix for tank command to correctly detect Windows platform when on Windows 10 using a linux-type shell.

v0.16.35

Added a way to invoke a method in the main thread asynchronously.

Details:

sgtk.platform.Engine now has a method called async_execute_in_main_thread. This allows the user to execute a method in the main thread without waiting for it to complete. As such, the method doesn't return a value, contrary to execute_in_main_thread which does, since there is no guarantee the code will have been executed when async_execute_in_main_thread returns.

v0.16.34

Fixed bugs preventing the new yaml parser to handle yaml-level includes correctly.

v0.16.33

Add function to get a list of matching commands

Add a function get_matching_commands in engines that allows to parse a setting of the following format:

menu_favourites:
- {app_instance: tk-multi-workfiles, name: Shotgun File Manager...}
- {app_instance: tk-multi-snapshot,  name: Snapshot...}
- {app_instance: tk-multi-workfiles, name: Shotgun Save As...}
- {app_instance: tk-multi-publish,   name: Publish...}

and extract all the commands that match the specified app instances and command names ('' being all commands from that app instance).

v0.16.32

Initializes frameworks as shared by default and adds support for cyclic dependencies.

This changes the loading and allocation behaviour for frameworks to improve performance and allow for cyclic dependencies. Previously, each app would load its individual framework code from disk, resulting in a very sandboxed setup. Alongside this approach, we also allowed for the possibility of a shared framework, where a single framework is loaded on the engine level and shared between apps.

This change makes everything shared by default with a couple of immediate benefits:

  • Less loading of code from disk. This will affect users running on show file system setups.
  • Less memory usage
  • It's now possible to load a framework chain with cycles.

Frameworks needing explicit sandboxing can still opt in to this.

v0.16.31

Adds an optional engine_instance_name argument to the engine find_app_settings() method.

Providing an engine's instance name will cause an additional check to be performed such that app settings for engines are pulled based on both system name and instance name. This allows multiple DCC applications to use the same engine, but with different app configurations for a given context.

v0.16.30

Adds a new, optional structure preserving yaml parser and an improved update workflow.

  • Added yaml library https://pypi.python.org/pypi/ruamel.yaml which preserves comments and overall state much better than pyyaml that we currently use. Parts of the yaml file that isn't updated is not being modified at all. Because this is a big change, the old parser is used for all read and write operations, meaning that the behaviour is exactly the same as it was before. For write operations, you can also opt in to using the new yaml parser by passing a --preserve-yaml flag to tank updates, tank install_app, tank install_engine or tank switch_app. Once this flag is detected, the new parser is used instead, but only when making modifications to yaml files. Setting the TK_PRESERVE_YAML environment variable will also result in the new parser being used.

  • Now dumps out yaml on multi-line form by default, resulting in more verbose and (generally) more readable yaml.

  • Fixes an issue where previously non-unicode values would be written out as unicode, causing issues when they were read back in.

  • The tank updates command now takes an --external flag, allowing for a workflow where an external config is easily updated.

v0.16.27

Folder creation was failing when a user workspace with deferred creation was specified in the schema and the folder creation was happening via script. This fix moves the check to see if a user workspace folder should be created before the sg user validation.

v0.16.26

Added support for passing multiple defer keywords to folder creation as a comma-separated string.

This is useful if you want to trigger the deferred folder creation for multiple keywords when using the Launcher app to launch a DCC.

For example, when you launch Nuke, the Launcher app automatically sends the engine name (tk-nuke) as the deferred keyword, so any folders in your schema definition that are configured with the setting defer_creation: "tk-nuke" will be created. However, if you wanted this to also trigger folder creation for additional keywords, previously this was not possible because when you specify a specific keyword in the Launcher settings (eg. "tk-myApp"), this will override the app's default behavior of sending the engine name and replace it with the value you provide. Now you can send a defer keyword like "tk-nuke, tk-myApp". Toolkit will treat that as 2 separate keywords ("tk-nuke" and "tk-myApp") and will compare each one to the defer_creation setting for the folder.

v0.16.25

Fixed path comparison on Windows and a regression with template keys.

Path slash fix for Windows

We are now sanitizing paths coming from the install_location.yml. This fixes an issue where Toolkit is not able to match paths inside install_location.py with a pipeline configuration's paths in Shotgun because they didn't use the same folder separating convention.

Template key regression

A template key's default value can once again be overridden programmatically. This fixes a regression introduced by the v0.16.15 release.

v0.16.22

Updated hook setting validation to handle inheritance

Now checks that all of the hook files specified in a hook setting exist in order to handle cases where users are using inheritance to override methods in multiple hook files (e.g. actions_hook: '{config}/multi-loader2/tk-multi_actions.py:{config}/multi-loader2/tk-houdini_actions.py'. The validation was previously assuming hook settings would only contain a single file path.

v0.16.21

Updated the Shotgun API to v3.0.22, changed unit test rig to use external mockgun module.

Now uses the mockgun object that comes bundled with the Shotgun API (as of Shotgun API v3.0.22). This change separates the mockgun Shotgun schema from the unit test fixtures, making it possible for a unit test to provide its own mockgun schema fixtures. This was not possible previously.

class ExampleTest(TankTestBase):

    def setUp(self):
        p = {"mockgun_schema_path": "/foo/bar/schema.bin", 
             "mockgun_schema_entity_path": "/foo/bar/schema_entity.bin"}
        super(TestSchemaCreateFolders, self).setUp(parameters=p)
        self.setup_fixtures()

This drastically simplifies writing app unit tests for apps that need to be tested against a specific Shotgun site and/or schema.

v0.16.20

Added constant required by the Perforce integration.

Details

  • This constant was removed from a previous version of the Core API because it wasn't being used anywhere. However, it is still required for the Perforce integration and hence its removal was breaking the perforce processing daemon. This minor bug fix release puts the constant back.

v0.16.19

Fixed issue where a pipeline configuration could be detected as a duplicate of itself.

Details

  • If there are multiple Local Storage definitions with the same path, this fix ensures that the matching pipeline configurations don't get added more than once. Previously if you had more than one storage defined with the same path, the project path would be the same for each storage and the associated pipeline configuration would be added for each one. This created duplicate pc paths and generated a bogus error saying "The path '[project path]' is associated with more than one primary pipeline configuration."

v0.16.18

Shared Frameworks loaded by hooks are now registered correctly.

Details

  • Previously, shared frameworks loaded via Hook.load_framework() were not registered as shared frameworks so a new instance was loaded and created each time. This change means they are now registered correctly and the same instance will be returned each time load_framework() is called.

v0.16.17

Fixed issues with proxies and error reporting in the login dialog.

The Shotgun Desktop was hit by a unicode bug in the httplib2 library that prevented it from using proxies. We've overhauled the error reporting in the login dialog so that HTTP and connection errors are cleaner. We've also integrated a newer version of the Shotgun API which integrates a bugfix for the httplib2 issue.

v0.16.16

Better handling of forward slashes as folder separators on Windows.

This fixes a regression on Windows where Toolkit didn't take into account that the forward slash is a supported folder separator when creating a Sgtk instance from an entity or a path and cause issues when trying to match one with forward slashes with one with backward slashes.

v0.16.15

Timestamp fields, stricter integer matching, panel support, app stylesheets and per platform paths.

Backwards compatibility heads up! Please note that this release contains a couple of bug fixes relating to how Toolkit interprets integers. If you are running a standard setup, this should not affect you in any way but if you are running a customized config we advise you to test prior to studio wide deployment!

Backwards compatibility details: In its template system, Toolkit defines validation masks for integer keys. Previously, these validation masks were interpreted too loosely, meaning that input values would be valid even when the template said they wouldn't be. We have now fixed this to make sure validation is correct, but it may mean that paths that used to work will no longer work in v0.16.15. There is a simple workaround to mitigate this problem - please see the section below for details.

Stricter integer matching and space padding

Fixes a bug where toolkit previously wasn't being strict enough when matching integer values in the template system.

Previously, an int field would match numbers that were not properly padded. For example, given a format_spec of 03 and a template of {name}.v{version}.ma, the following would match before this bugfix:

  • scene.v3.ma
  • scene.v03.ma
  • scene.v003.ma
  • scene.v0003.ma

With this change, only scene.v003.ma will now match. This new behaviour may break some templates if you've been using external tools to generate incorrect number patterns. If you've been using the default templates configuration that came with Toolkit, it is very likely you won't run into any issues. If you need the old behaviour back, add strict_matching: false in templates.yml to the field that is broken. This will tell Toolkit to evaluate that integer key using the more loose logic that it has been using up to now:

frame_no:
    type: int
    format_spec: "03"
    strict_matching: false

This would allow for matching of frame numbers that are incorrectly padded.

Omitting the 0 in the format_spec will pad the number with spaces, as per python formatting rules:

spaces_number:
    type: int
    format_spec: "6"

The above key, when used by the template '{spaces_number}' and the value 1234, would generate the string ' 1234'. If you have any questions or concerns regarding these changes, don't hesitate to contact our support team!

New timestamp template key

It is now possible to define template keys that contain time stamps. These time stamps can have default values such as now, and you can easily control the formatting of time values.

The default field supports 4 types of values:

  • now: The field will be formatted using the current local time according to the format spec.
  • utc_now: The field will be formatted using the current UTC time according to the format spec.
  • A string matching the format spec.
  • Nothing, in which case the code will need to provide a datetime.datetime object for that field

The format_spec for the timestamp key supports formatting options following the conventions of strptime and strftime.

Toolkit App QT stylesheet support

Styling your Toolkit Apps is now easy! Simply drop in a style.qss file in your app root and it will be automatically read and applied.

Logic has been added to the engine so that every time a dialog is opened, Toolkit will look for a style.qss file in the application's root directory, and if present, apply this to the top level dialog widget. If you have made changes and want to reload, just re-open the dialog. No need to restart the engine.

Furthermore, it introduces some standard colors that can be be referenced in stylesheets:

  • SG_HIGHLIGHT_COLOR: #18A7E3
  • SG_FOREGROUND_COLOR: #C8C8C8
  • SG_ALERT_COLOR: #FC6246

In order to reference them in a style.qss file, use a double bracket syntax, e.g. {{SG_ALERT_COLOR}} and it will be replaced at runtime with the right values. These values are also accessible via the bundle.style_constants property.

Panel Support

Panel-style app dialogs are now officially supported in Toolkit.

This adds register_panel and show_panel methods Toolkit, making it possible for Toolkit apps to create dockable widgets. Engines need to separately implement these new methods for it to be fully supported (we are releasing Maya and Nuke shortly). If an engine has not specifically implemented support for it, UIs will be shown using a modeless dialog instead.

Multi-platform paths from template system

The template.apply_fields() method can now generate paths for other operating systems than the currently running one.

In order to render paths for other operating systems, simply add a platform parameter:

# always generate a windows path
template_obj.apply_fields(fields, platform='win32')

The parameter uses values from sys.platform and valid values are currently win32, linux2 and darwin.

v0.16.13

The setup_project_wizard command respects core configuration when cloning projects and various other bugfixes and performance enhancements.

  • Fixed an issue where the setup_project_wizard command used by the Shotgun Desktop doesn't respect how the core is configured when cloning a project's configuration. Because of this, the command always picked the core configuration of the site configuration instead of the original project's. This will ensure that script user information will be correctly carried over to the new project. This fix also ensures that if the original project used a shared core that the new project will also use the shared core.
  • Global wait dialog now closes when clicked.
  • download_url method now honors the Shotgun connection's config.timeout_secs value.
  • bundle.cache_locationis now cached.
  • Added tk.shogun_urlproperty.
  • Added mockgun.config to better match the interface of the Shotgun api.

v0.16.12

The setup_project_wizard command doesn't strip credentials from shotgun.yml anymore.

v0.16.10

Fixed a bug in the path cache sync causing it to run a full sync too often.

This fixes an issue which was causing the path cache sync to kick into its full sync mode at a regular basis - in some cases every time. This fix means that the path cache sync will be incremental most of the time, drastically reducing startup time in many cases. Practically, it means that the "Hang on, Toolkit is preparing folders" window is showed less often. Also fixed a minor issue where folder creation event log markers were inserted even when no actual folders got created.

v0.16.9

Fixed regression in environment include processing.

This fixes a regression where environment parsing would fail if an included file was empty.

v0.16.8

Introduces site configurations on the PipelineConfiguration class.

This implies the following:
- A Pipeline Configuration can now be created without a Project attached to it.
- The site's configuration project id will be None.
- However, for backwards compatibility reason, the project id passed to the cache_location script will be 0.
- To detect that a pipeline configuration is a site config, simply call tk.pipeline_configuration.is_site_configuration()
- The migrate_desktop tank command was introduced to allow users to get rid of Shotgun Desktop's dependency on the Template Project.

Various fixes to the two factor authentication workflow have also been implemented.

v0.16.6

Introduces two factor authentication support for Shotgun in Toolkit.

You will need to activate two factor authentication on your Shotgun site in order to access this feature.

v0.16.4

Improved Toolkit security

This is a major update and we strongly recommend testing prior to studio rollout.

What's new in Core v0.16?

Toolkit Core v0.16 contains a number of major changes, all related to making Toolkit more secure. In a nutshell, your existing projects will operate exactly as before, but for new projects created by the Shotgun Desktop, Toolkit will start prompting users for their Shotgun login and password:

Previously, all Shotgun operations carried out by Toolkit were handled by a single Toolkit script user. With new v0.16 projects, each user is required to log in to Toolkit and once they have logged in, all Shotgun operations will be associated with that user.

Backwards Compatibility

Core v0.16 is fully backwards compatible and your existing projects will not change their login behavior. New projects created with Core v0.16 via the Shotgun Desktop will require users to log in, however opting out of this behavior is straight forward. The logic around command line based project setup is unchanged, meaning that new projects created via the tank command or API will inherit the security settings from the project they were created from.

In order to run a login based workflow, you need Shotgun v6.0.2 or higher.

The Shotgun Desktop

As part of 0.16, we have also created a new and much improved version of the Shotgun Desktop. If you are using the Shotgun Desktop, we strongly encourage you to download and install this new version which also contains improved security and an update framework which makes it much easier for us to release Shotgun Desktop updates and bug fixes in the future.

Technical Details

As of this release, the default authentication strategy in Toolkit is login based. This means that the Shotgun connection used by Toolkit will be logged in to Shotgun as the user running Toolkit, and all Shotgun permissions will be in effect. New core installs will default to login based authentication, but script based authentication is still available which existing core installs will use.

If you wish to configure a new core using script users, simply setup your core with the usual commands and then manually add the script name and key in config/core/shotgun.yml. If you wish to switch to login based authentication on an existing project, simply remove the script user from config/core/shotgun.yml.

Some things to note when switching to login based authentication are:

  • Toolkit will now require you to enter a login and password the first time it is run, even command line or Shotgun.

  • Toolkit applications, tank, and the Shotgun Desktop will ask you for your password from time to time when your session expires. A session typically expires after 24 hours of inactivity, but is renewed with any activity.

Further Reading

For more information, please see our security documentation:

v0.15.23

Improvements to context.as_template_fields()

  • Fixed issue where as_template_fields() could return invalid fields for the context if for some reason the path cache contained out-of-date information (e.g. paths added before a change to the templates). Previously this method could return fields belonging to completely different entities!
  • Added a validate parameter to as_template_fields(). This will cause a TankError to be raised if one or more context fields that are required by the template aren't found. This is useful if you need to be sure that a full set of context fields are returned by this method.

v0.15.22

Allow setting additional SG fields in register_publish() and error message improvement.

  • Added additional optional sg_fields parameter to register_publish() in order to allow setting additional fields on the PublishedFile entity at publish time. You can now pass an optional dictionary of additional Shotgun field/values to update on the publish entity in Shotgun. This is useful if, for example, you wish to add tags or some additional custom information on the entity at publish time. (Thanks to @sdelhomme at Mikros Image)
  • Updated the error message displayed when you have duplicate templates that match a path. When an error is raised because more than one template matches a path, we now display the templates as well as the fields that matched to help you determine what the offending key/values are. For example:

    TankError: 2 templates are matching the path '/sgtk/projects/scarlet/sequences/001/000/Comp/publish/nuke/hawaii.v001.nk'. The overlapping templates are: {'Step': 'Comp', 'foo': 'hawaii', 'Shot': '000', 'version': 1, 'Sequence': '001'} {'Step': 'Comp', 'version': 1, 'Shot': '000', 'name': 'hawaii', 'Sequence': '001'}

v0.15.21

Optimizations, minor bug fixes and preparations for the v2 file manager.

  • Added in-memory caching of the yaml environment files. The yaml parsing in python is slow and this helps improve performance around context switching.
  • Add a context.from_entities() method which makes it possible to more efficiently contstruct context objects when part of the context state is well known. This is being used by the file manager v2 app in order to speed up context switching.
  • Template key choices can now be dictionary of choice:label. This allows a more UI friendly label to be defined for each choice. The previous list based approach is still supported.
  • Cloned localized Core APIs no longer think they are primary. This resolves an issue where previously, if you ran python directly from a dev sandbox, it would report that it was the primary configuration.

v0.15.20

Improved unregister folders support. Tweaked error messages.

This release adds several new ways to unregister folders:

  • Folders can be unregistered by passing a list of paths
  • API support has been added so that batch processing can be automated
  • Added --all flag to unregister all folders for a project
  • Added --filter flag to make it easier to find and unregister patterns

This is the new help documentation for the command:

----------------------------------------------------------------------
Command: Unregister folders
----------------------------------------------------------------------

Unregister folders on your filesystem that are being tracked by Toolkit. When
applications are launched and folders are created on your filesystem, new
entries are stored in Shotgun as FilesystemLocation entities. These records
are called the 'path cache', and are used to track the relationship between
Shotgun entities and folders on disk. Use this command if you ever need to
remove these associations.

You can unregister all folders for a project:
> tank unregister_folders --all

You can unregister all folders matching a certain pattern:
> tank unregister_folders --filter='john.smith'

Pass in a Shotgun entity (by name or id):
> tank Shot ABC123 unregister_folders

Or pass in one or more paths:
> tank unregister_folders /path/to/folder_a /path/to/folder_b ...

v0.15.19

Preview release for Workfiles v2. Limited distribution.

  • The environment .yaml files are now cached when loaded to avoid unnecessary disk access.
  • Added a new tk.context_from_entity_dictionary() method to improve performance of context creation when all required information is already known by the calling code. This takes a single entity dictionary and looks at linked entities where needed to try to construct a full context, only falling back to Shotgun & path cache queries when any required information can't be found.
  • Labels can now be specified for template key choices by specifying a dictionary of {choice:label} pairs instead of a list. When a list is provided, the label will be the choice itself.

v0.15.18

Fixes for context comparison and HumanUser login/name consistency.

  • When comparing two context instances to determine if they are the same, the code now only checks the entity type and id for all entity dictionaries. Previously the entire dictionary would have been compared which could lead to unexpected comparison failures.
  • The name field on the HumanUser entity is now stored as the name in the path cache instead of the login field. This fixes an issue where a context created from a user sandbox path would end up with the login instead of the name in context.user["name"] resulting in odd/unexpected behaviour.

v0.15.17

Improved template validation and tweaks project setup error reporting.

  • Now raises a TankErrorProjectIsSetup exception rather than a TankError when a project already exists.
  • Added improved key validation to the template system.
  • Added periods to the set of valid characters for key names.

v0.15.16

Tweaked the right hand side info UI. Removed optimizations.

  • Removed tabs from the right hand side info UI since these tags were not visualized consistently across all supported DCCs.
  • Removed an optimization which was causing issues when trying to reload an existing environment.

v0.15.14

A minor PySide related bug fix.

Fixed an issue in the global busy dialogue where it was explicitly importing pyside rather than using the local py-agnostic qt import mechanisms, causing the busy dialogue to fail to show in pyqt-based environments.

v0.15.13

Bug fixes and optimizations

  • Fixes an issue where sgtk_from_path() would return an error message if there were overlapping project data locations.
  • Environment lookup is now cached, making the tank command faster to load.

v0.15.12

Improvements to the 0.14 path cache migration utility

  • Improved the path cache migration command to better handle syncing.
  • Better handling of defaults for localized installations running in command line mode.

v0.15.11

Minor changes

  • Added a configuration_name property to the core api to allow inspection of the name of the currently loaded pipeline configuration.
  • Added a missing variable declaration to the Engine class.

v0.15.10

Fixed a regression which affects some users running on windows with drive letter style storage defs.

  • Windows local storages defined as a drive letter followed by a colon and with no backslash (e.g. X:) were not fully supported in Core v0.15, causing sgtk to fail to initialize. This patch release fixes that regression.

v0.15.9

Fixed a bug preventing multi folder level projects to be used on windows.

  • Multi folder level projects (e.g. project names containing a slash character, for example vfx/project_x) were previously not recognized on windows.

v0.15.8

Fixed regression in Hook loading logic.

  • Hook loading was recently made more deterministic but as a side-effect of that work it became more strict and specifically, having derived classes in a single Hook file no longer works. This is fixed with this change.

v0.15.7

Path Cache and Localize fixes and improvements.

  • The tank localize command now spends much less time where the configuration which is being operated on is inaccessible. Previously, the command had its operations arranged in such a way that the configuration could not be used during the entire time the localization was happening. Now, the apps, engines and frameworks are copied across before the localization starts.
  • Fixed a bug where the path cache syncing wouldn't work with projects where some publishes referred to local storages which had been deleted. Such records are now ignored by the syncer.

v0.15.6

Hook loading is now thread-safe.

  • Previously, if different threads attempted to load hooks at the same time (either the same hook or different hooks) the behaviour was undefined. This has been fixed so that all hooks will load correctly.

v0.15.5

Fix for subclassing hooks.

  • Previously, sub-classing hooks would only work if the name of the derived class was alphabetically after the name of the base class. This change fixes this problem so that the derived hook will be correctly instantiated.

v0.15.4

Limited release to help debug performance issues.

  • Updated to include v0.15.x changes

v0.15.3

Bug fix release which resolves an issue relating to cloned pipeline configurations.

In 0.15.x, the pipeline configuration data is cached in a new way, eliminating the need for one of the lookup files in the project storage location. This release fixes a regression in this new caching subsystem, causing cloned configuration not to be recognized as valid pipeline configurations.

v0.15.2

Minor bug fixes following the big 0.15 release.

  • Fixed a long standing issue where new-style hooks for engines could not be executed.
  • Added additional QT error trapping to help with a use case where someone has upgraded to 0.15 but is still running older versions of the shotgun and shell engines.

v0.15.1

Improved folder synchronization and local caching. This is a larger update and we strongly recommend testing prior to studio rollout.

Overview

The v0.15 release contains a number of larger changes to the way metadata is handled within the toolkit core. Where previously configuration files and metadata caches have been stored in a central, shared location, we are now moving towards a setup where each user individually keeps such files. This is part of a longer term strategy where we want to make it easy to work in a more distributed fashion with Toolkit and where ultimately the configuration is stored in Shotgun and cached on a local disk.

Once v0.15 has been installed, existing projects will work the same way the currently do, however new projects will be created using some new features. Instead of keeping a shared path cache file to track the bindings between folders on disk and shotgun entities, this information is pushed into shotgun - via the Filesystem Location entity. Each user will have their own version of the path cache and this is synchronised in the background whenever applications are launched or folders are created. Furthermore, previous lookup files residing inside a tank folder within the project storage have been removed - meaning that the project data roots have zero tank-specific files.

Existing projects can be upgraded using a the command tank upgrade_folders if desirable.

Technical Details

Shotgun Path Cache

  • The v0.15 release introduces a stronger and more robust folder creation mechanism where the associations between folders on disk and entities in shotgun are tracked in shotgun rather than in a local file on disk (the so called path cache file).
  • On application launch and folder creation, the locally cached folder database (the path cache) will be synced against the list of folders in Shotgun.
  • On setups where several local independent storages are used, it is now possible to "replay" folder creation on each local machine via the path cache synchronization mechanism.
  • New projects created with 0.15 will automatically have this feature enabled.
  • Existing projects will behave exactly as the did before - no change.
  • There is a tank command which can be used to upgrade a pre-0.15 project.
  • There is a tank command which can be used to force synchronize the local cache.
  • There is now a better workflow for renaming folders. Asset names no longer need to stay in sync with the created folders on disk - these can vary independently once folders have been created (although this may be confusing for users!). In order to rename or update folders, a special new tank command called unregister_folders have been introduced. This unregisters folders and thereby leaves space to re-create those same folders, allowing for a workflow where disk locations can be upgraded in a controlled and programmable fashion.

Cache Location

  • The path cache file no longer exists in the primary project storage but instead resides on a user's local machine (inside ~/.shotgun on Linux, in %APPDATA%\Shotgun on Windows and in ~/Library/Caches/Shotgun on Macosx.
  • Other cache entries have also been moved into this location - the cache_location property on the Engine/Framework/App base class no longer points into the cache folder in the Pipeline Configuration but rather to the local folder mentioned above. This improves performance on setups with slow networked file storage.
  • The cache location is configurable per data type and can be overridden via a core hook if desirable.

Project Configuration Files

  • The tank_configs.yml file which previously had to exist in each project root is no longer needed. Instead, this information is cached on disk inside the cache location mentioned above.
  • This disk cache keeps shotgun information so that the same lookup doesn't have to be carried out over and over again, resulting in overall performance improvements, especially for the sgtk_from_entity() method.

Other

  • Our internal test rig has been improved and is now providing a complete shotgun emulation as part of its test harness, allowing for more realistic test setups and through testing of toolkit/shotgun interaction.
  • The move_studio tank command has been deprecated - this is now replaced by the attach_to_core and share_core commands.
  • When accessing a Shotgun API instance outside of a project/tk context, internal code is now sharing a single API handle, resulting in improved performance for several tank commands.
  • Core hook support has now been upgraded to support our second generation hooks which allow for inheritance and explicit method names. The first hook to support this new scheme is the cache location hook.

Deprecations

The 0.15 release is a big one and we have done some significant refactoring under the hood. The APIs and client facing interfaces are all unchanged, however some internal methods may have changed, so if your code is accessing private APIs and members, please test your intergration carefully. When possible, we have tried to provide legacy support even for internal methods.

The move_studio command has been removed and is no longer supported due to its complex nature and because we are moving in a direction with more shared projects and localized setups. As part of the Shotgun Desktop release, we also added attach_to_core and share_core commands to better manipulate how core APIs are associated with projects. Please use these two commands instead of move_studio if you ever need to move a shared studio API around. Alternatively, don't hesitate to reach out to our support if you have a complex maintenance scenario you would like to get some help with.

v0.14.79

Limited release to help debug performance issues

  • Reduced number of Shotgun connections created when running the tank command
  • Added additional logging

v0.14.78

Minor bug fixes. - Added ability to call pre_setup_validation from the setup project wizard in order to fix an error reporting issue with the back button in the Shotgun Desktop project setup wizard.

v0.14.77

Minor bug fixes and improvements

  • Added support for Flame style sequences, e.g. /path/plates/render.[1001-1100].dpx alongside our existing formats %04d, $4F, etc.
  • Fixes a problem where the execution bits weren't being set correctly when a bundle was unzipped during install for executable content contained within the bundle.
  • This upgrade will run a migration ensuring that the tank.bat and tank scripts will now be updated in all Pipeline Configurations when upgrading from core versions older than v0.14.72. This is to resolve a bug with file paths containing spaces.
  • Validation for the Pipeline Configuration name specified during project setup now uses the same logic as the project name.
  • The Toolkit dialog now defers handling of the close event to the contained widget allowing app developers to control what happens when the dialog or widget is closed.
  • Added tracking id to allow tracking of Shotgun queries through the server
  • Configuration paths on OSX can now contain spaces. Previously, if the configuration was installed to a location that contained spaces in the path on OSX then the tank command would fail to run. This has now been fixed.

v0.14.74

Limited release to help debug performance issues

  • Added finer-grained control around Shotgun calls.

v0.14.69

Improved Shotgun threading, tank command and backwards project setup compatibility.

  • Changes the tk.shotgun property accessor such that it is stored in a threadlocal storage rather than as a normal member variable. This means that each thread will get a separate instance of the Shotgun API when calling tk.shotgun, even if the tk instance is shared across threads. This provides a natural layer of protection around the Shotgun API which isn't thread safe. The result is that while you couldn't previously have multiple threads picking up tk.shotgun and running concurrent queries, this is now possible. Note that this also affects some API methods (for example the publish method) which also uses this accessor. The overall result is improved thread safety for any Shotgun call made via toolkit.

  • Improved the error message you get if you run tank Project foo from a project specific tank command.

  • Added support for a tank command digits only syntax, so that the tank command will correctly find a shot named 123 when the command tank Shot 123 is executed. If no shot named 123 is found, the tank command will fall back to its previous behaviour and assume 123 is a shogun id and use that for the lookup instead.

  • For an explicit id lookup (which is also faster), you can now use a new Shot @123 syntax to look for a Shot with id 123.

  • If you are running a project tank command, the project prefix syntax (tank Shot bunny:foo) is not valid since the project is implied by the fact that you are running the tank command for a particular project. Previously this logic was less clear.

  • If you are running the tank command out of a project config CWD without params, (e.g. ./tank) it now gives you the project context. Previously it would only give you the empty context.

  • Minor changes to the tank setup_project localize logic. The logic for the tank setup_project command has been changed so that if the currently running core API belongs to a localized pipeline configuration, the created pipeline configuration will be localized too. This brings it more in line with the way the desktop wizard project setup process works and will be relevant going forward, as more and more projects will be created as localized by default, as UI wizard adoption will start becoming more commonplace.

Please note that this means that the behaviour of the tank command changes slightly:

If you are currently launching entities via their ids (tank Shot 123) and also have your shot named numeric codes, this change means that the name suddenly takes precedence, meaning that there may be a change in behaviour as a consequence. We recommend that in this case you tweak your code to include the @ symbol (e.g. tank Shot @123) to explicitly use ids. This should also be slightly faster.

v0.14.67

Tweaks to template logic and localise behaviour

  • Fix to allow a template that specifies the storage root. For example, the template project_root: / will now correctly validate against the project storage root that the template is defined for and will return the storage root from template.apply_fields(). Previously this would have failed!
  • The localise command now only copies across apps, engines and frameworks that are actually used in the configuration being localised instead of the entire directory (including all old versions). This significantly reduces the amount of time the command takes to run as well as the amount of disk space needed for the localised configuration.

v0.14.66

Added UDIM support to Sequence keys for Mari UV (UDIM) textures - <UDIM> and $UDIM are now valid format strings for Sequence keys

v0.14.65

Internal refactors preparing for the Shotgun Desktop launch, updated Shotgun API, minor improvements.

Note! This release contains some larger internal code reshuffles. Users with external code which accesses internal API methods relating to project setup and pipeline configurations are advised to test prior to upgrade.

  • Toolkit now supports template configurations which don't have any storage defined
  • Introduced a new 'auto_path' mode for projects which creates a project which does not have a strict pipeline configuration binding but is instead managed by directly accessing its location
  • Refactored and restructured the setup project code
  • Added a setup wizard factory tank command (API only) which creates project setup wizards. This is in preparation for the shotgun desktop release.
  • Updated to use the most recent Shotgun API (v3.0.17). This adds support for authenticating as a HumanUser as well as being able to sudo as a user. Both are instrumental in future development of Toolkit as we allow expand how users are authenticated via Toolkit. Includes a fix for a bug in the mimetypes library in Python 2.7. There are certain installers on Windows that will (incorrectly) add non-Latin characters to the registry. This usually only happens if you are located in an area where unicode characters are more widely required. The mimetypes library in Python 2.7 chokes on these non-Latin characters causing a UnicodeDecodeError. To work around this error, we have bundled a patched version of the mimetypes library and fall back on that if we encounter this issue during runtime. Full release notes are on the Python API project page https://github.com/shotgunsoftware/python-api/tree/v3.0.17
  • Added null-check in environment to better support empty engines. This fixes an issue where it was previously not possible to install apps into some empty engine config setups.
  • Improved some of the error messages in the folder creation.
  • Added tank commands 'share_core' and 'attach_to_core' which makes it possible to effectively 'unlocalize' your core API.
  • Improved the 'move_configuration' tank command to handle the process of adding a new platform.

v0.14.63

Fix for PyQt 4.6.2 compatibility issue

  • PyQt 4.6.2 doesn't contain the Q*Animation classes introduced in Qt 4.6 and used by parts of Toolkit
  • This release adds conditional logic to work around this issue

v0.14.62

Preview version (limited release) testing a potential performance improvement.

  • Updated to include changes introduced in v0.14.61

v0.14.61

Tweaks to engine initialisation and Toolkit dialog size constraints to get things to play more nicely in the 3ds Max engine.

  • Added a pre_app_init() method to the Engine base class. This allows any initialisation to be done after Qt, etc. have been set up but before the apps are loaded - this is particularly useful if any additional setup is needed before any 'launch-on-init' apps are loaded. Because of this, init_engine() has now been deprecated and pre_app_init() should be used instead.
  • Tweaked the Toolkit dialog layout so that it doesn't enforce an overly large minimum height which could result in oddly sized dialogs.
  • Improved backwards compatibility for frameworks that would no longer work following the recent change to support upgradeable frameworks.

v0.14.60

Preview version (limited release) testing a potential performance improvement.

  • Fixed Python 2.6 compatibility issue

v0.14.59

Preview version (limited release) testing a potential performance improvement.

  • Added even more additional debug output

v0.14.58

Various improvements and fixes including a fix to the tank updates command when updating frameworks referenced from a separate import file.

  • Added support for shared framework instances. This allows a single framework instance to be shared across multiple apps/engines that use it by specifying shared: true in the framework's manifest. This can help in cases of heavy memory usage or performance overhead.
  • An exception will now be raised if a null value is specified for a local storage and something attempts to use it. Previously it would silently ignore it resulting in undefined behaviour later on.
  • Fixed tank updates to correctly handle updating a framework that is referenced in from a separate include file.

v0.14.57

Various improvements including support for spaces in paths on Windows and an overhaul of the template parsing algorithm.

  • Toolkit now checks when a hook setting contains {engine_name} that a hook for that engine actually exists otherwise it will warn at install time.
  • The default logging for tank commands no longer breaks long words over multiple lines.
  • Spaces are now supported for Windows project/data & configuration paths when using the tank command. If you need this functionality for an existing configuration then you will need to manually update tank.bat after updating core with the versions from the new core. Please contact support@shotgunsoftware.com for further details.
  • Toolkit now accepts spaces in the Python install path on Windows. If you need this functionality for an existing configuration then you will need to manually update tank.bat after updating core with the versions from the new core. Please contact support@shotgunsoftware.com for further details.
  • Improved template parsing to be more robust and handle a number of templates where it would previously fail. It is possible that this change may cause problems with some existing templates... If this happens, please contact support@shotgunsoftware.com for advice.

v0.14.56

Improved dark UI theme support. Support for include statements containing environment variables.

Added improved debug output around shotgun queries executed by the tank command.

Include statements now supports environment variable expansion. This allows paths declared via the include or includes statements in the templates.yml or environment files to contain environment variables.

Improved dark UI theme support adds a new method to the engine base class: _initialize_dark_look_and_feel() which replaces the _get_standard_qt_stylesheet() method (which will still be around however deprecated).

This method sets up a visual environment very similar to the one in maya. It is using a slightly different approach than just using a stylesheet - instead, it is a combination of style, palette and some css on top. The hope is that this should provide a broad, solid and consistent style base for all apps and widgets and ensure that they are looking similar to the way they would look in Maya (or Nuke for that matter).

Engine initialisation will typically look something like this with the new method:

# start up our QApp now
qt_application = QtGui.QApplication([])
qt_application.setWindowIcon(QtGui.QIcon(self.icon_256))
self._initialize_dark_look_and_feel()

v0.14.55

Preview version (limited release) testing a potential performance improvement.

  • Added additional debug output

v0.14.54

Preview version (limited release) testing a potential performance improvement.

v0.14.53

Various fixes and improvements.

  • Added a new method bundle.execute_hook_expression(). This method lets you execute a hook expression directly.
  • Deprecated the method bundle.execute_hook_by_name(). Please use bundle.execute_hook_expression() instead. The method is still available but has been removed from the official reference documentation.
  • The install_app and install_engine commands now support installation of apps straight from disk. These apps will be added with a dev location. The howto documentation outlining how to get started doing app development has been updated to reflect this.
  • If an app is in dev mode, its UIs will show up with a little blue DEV marker in the toolbar.
  • Expert mode: The core_{os}.cfg configuration files now support using an environment variable rather than a path.

v0.14.52

Preview version (limited release) testing a potential performance improvement.

v0.14.51

Various fixes and improvements.

  • User sandbox resolution is now handled just-in-time during folder creation. This means a valid user is no longer required if all folders being created are above the user sandbox level.
  • Fixed an issue in register_publish() when the local storage is a drive letter with no sub-directory on Windows (e.g. Y:\). This would cause the first character to be stripped from the path_cache field which in turn stops find_publish() from working correctly!
  • All git clone calls used by tank commands (e.g. updates) now correctly handle Windows UNC paths.
  • The github location descriptor for apps/engines/frameworks has now been removed (it was previously deprecated) - the git descriptor should be used instead.
  • Fixed a template issue where Step would not be resolved correctly if it was at the top of the folder structure and the template exactly matched the path (e.g. {Step}/{Sequence}/{Shot}).
  • Fixed an issue with nested frameworks that could raise an exception during app install.
  • Including the entire frameworks block is now supported for updates (advanced use). If using this feature be aware that new frameworks will have to be installed by hand-editing the included .yml file prior to installing an app that uses it.
  • The cache_apps command now checks frameworks in addition to apps and engines.
  • Added support for environment variables in Pipeline Configuration paths.

v0.14.50

Preview version (limited release) testing a potential performance improvement.

  • Moves the core code into a zipped module to try and improve performance, particularly on slow Windows file shares.

v0.14.49

Fixed a bug in the second generation hooks inheritance stack management.

Previously, whenever a 2nd gen style hook was executed, it would (regardless of whether the sgtk.get_hook_baseclass() call was used or not) build up an inheritance list and load each of the class objects from those files. If a file didn't exist, an exception was raised. This is normally not an issue since hooks specified in configs certainly must exist and default hooks that come with apps also need to exist. However, if the {engine_name} token is used in the manifest, there is a case where an app does not provide a default hook for an engine - beause it doesn't officially support it yet - and therefore an exception was raised beucase that file was missing, effectively blocking a user from implementing their own support for that engine.

The logic is now tweaked so that the code checks if the default app hook exists and only then will it wedge it into the inheritance list. This means that the sgtk.get_hook_baseclass() call will return the main Hook class as long as the app does not provide default support for that engine and when a version of the app which does support the new engine is released, the sgtk.get_hook_baseclass() call will start returning that app hook instead. This transition should be transparent for already existing custom implementations since they need to completely implement the required hook interfaces anyway, and therefore will shadow any future app level hooks.

v0.14.48

Tweaks to icons and logos.

  • Toolkit now uses the Shotgun Logo for its standard toolbar.
  • The engine.register_command() method now adds an icon property by default, pointing to the default bundle icon (e.g. icon_256.png).
  • Added support for the QSplashScreen widget in the default QT stylesheet.
  • Added a file containing information about third party software licenses.
  • Added a helper method to the hook base class which resolves a local path given shotgun publish data.

v0.14.47

Fixes to resolution of new style hooks when using old-style defaults.

  • Fixed hook resolution when using an old-style default_value in the app manifest with a new-style hook format (e.g. {framework}/my_hook.py) in the config.
  • Fixed the case where the app manifest specifies a new style hook but the config setting is set to default.

v0.14.46

Minor features and bug fixes. Support for inheritance in hooks.

  • Added a check in the default folder creation hook to prevent folder creation race conditions that can appear on slow file storages.
  • Added support for inheritance for hooks (see below).
  • Tweaks to environment serialization error reporting.
  • core_{os} files now supports line endings at the end of the file.
  • Improved an error message to work with unicode data.
  • Fixed a bug where the tank command would not correctly handle multiple matches. If there were multiple items named the same thing, the tank command would simply pick the first item in the case of a direct match. Now it instead looks for a single exact match to the search query and in that case it uses that match.
  • Added associated_entity_type parameter to task and step. When creating a step or task folder, toolkit needs to figure out which parent folder to associate the step or task with. This is currently done by looking up the folder tree and picking the first shotgun folder that is found. However, For complex folder setups, where for example you want to have a structure with Sequence > Shot > Department > Step, this approach won't work, because it will find Department rather than the desired Shot level. This change adds an optional associated_entity_type parameter to the folder configs which allows a user to explicitly specify the type of the parent folder to bind the task or step to. In the example above, we would set associated_entity_type: Shot in order to tell the system not to associate the step with the department object but instead (correctly) with the Shot object.

Details on Hook Inheritance

This release adds an optional, backwards compatible support for inheritance in hooks. When new style hooks are used, it is now possible to construct the following custom hook:

import sgtk

HookBaseClass = sgtk.get_hook_baseclass()

class DerivedHook(HookBaseClass):

    def some_method(self, param):
        data = HookBaseClass.some_method(self, param)
        data.append("derived class stuff")
        return data

The sgtk.get_hook_baseclass() will return the immediate parent class, allowing for flexible customization. For new-style hooks in the info.yml in the manifest (e.g. default values starting with {self}), inheritance will be gracefully handled. What this means is that if you have the following definition for your custom hook:

some_hook: '{config}/my_override.py'

The sgtk.get_hook_baseclass() call inside that my_override.py file will return the class that is defined in the default hook that comes bundled with the app. It is also possible to create multiple levels of inheritance, using a ":" syntax. A complex example:

some_hook: '{tk-framework-perforce_v1.x.x}/path/to/foo.py:{config}/my_override.py'

This will generate three levels of inheritance; the perforce hook foo.py will inherit from the built-in hook, and then my_override.py will derive from the perforce hook.

v0.14.45

Support for arbitrary method execution in hooks.

Previously, each hook would only support the execution of an execute() method via the execute_hook() method generally available through the API. This release adds an execute_hook_method() method which makes it possible for apps to reach any method inside a hook. This makes it possible to structure hooks in classes, so that a collection of associated hooks gracefully can reside inside a single class.

v0.14.44

Support for regular expression filters, a new hook syntax and incrementally updating frameworks.

  • Git locator urls ending with a slash are now handled correctly.
  • It is now possible to define a regular expression for the filter_by: field that is used to define what strings are valid for a particular template key. This setting exists for string fields and makes it possible to construct more complex naming convention validation rules.
  • When you define a framework dependency in an app, it is now possible to define it to track a version rather than match an exact version. For example, if you set a framework dependency to be version v1.x.x, it will track any framework updates which are major version 1 and automatically pull in framework updates as part of the standard updates command.
  • Added new formats for referencing hook files in the environment configs:
  • hook_setting: {$HOOK_PATH}/path/to/foo.py - The path is resolved from an environment variable.
  • hook_setting: {self}/path/to/foo.py - The path is resolved local to the app or engine's hooks folder.
  • hook_setting: {config}/path/to/foo.py - The path is resolved local to the config's hooks folder.
  • hook_setting: {tk-framework-perforce_v1.x.x}/path/to/foo.py - The path is resolved local to the specified bundle instance's hooks folder.
  • Added support for engine specific default parameters, making it possible to direct different defaults towards different engines in an app manifest. For example:

param_name: type: str default_value_tk-maya: "This value will be used when the app is installed in Maya." default_value_tk-nuke: "This value will be used when the app is installed in Nuke." default_value: "This value will be used in all other engines." description: "Example of engine specific defaults."

Compatibility notes: If you have manually been installing or configuring frameworks, this release may generate errors as it now requires a framework instance name to be on the form frameworkname_versionnumber. Any framework instances named differently may report errors as they are loaded into the system.

v0.14.43

Added support for handling a full url instead of a local path in register_publish.

v0.14.42

Updated to the latest version of the Shotgun API (v3.0.14)

v0.14.41

Fixed bug fixes and regressions.

  • Fixed a bug which was causing the sgtk/tank python API proxy objects which are installed in all non-localized configurations to not resolve correctly on linux and windows.
  • Fixed a bug causing the app install location to be incorrect on localized Cores.
  • Fixed an issue which was causing new site activation to fail, caused by a bug introduced in v0.14.37.

v0.14.38

Added support for symbolic links in the folder creation.

The folder creation system now supports the generation of symbolic links. For more information, see the file system configuration reference documentation.

v0.14.37

Misc fixes and small features. Added API access to all tank commands.

  • Added support for recursive updates of default values within bundle manifests.
  • Project setup now supports git repositories as its input for starter templates. This makes it easier to run a studio workflow where there is a shared configuration managed in git.
  • The push_configuration command now supports a --symlink command (*nix only) which creates a symlink when it copies the configuration across rather than replacing files in a folder.
  • Fixed a bug in the push_configuration command where errors could be reported if configuration was being pushed from a localized API.
  • Added support for nested query syntax for list fields in the folder creation configuration.
  • Added support for project folder names containing period characters.
  • Fixed a bug where the configuration was not correctly initialized when running the toolkit API via a non-localized pipeline configuration API proxy.
  • Added a new method called sgtk.util.download_url() which makes it easy to download for example images. This method takes into account the proxy settings used by the shotgun API when it connects.
  • Added a studio level hook which lets you override the connection settings retrieved from the shotgun and app_store configs. This is useful if you for example have a dynamic proxy which changes depending on some external set of circumstances (e.g. your physical location).
  • Added API based access to all Tank commands
  • Added filter_by: alpha for template keys alongside existing filter_by: alphanumeric constraint.

v0.14.34

Fixed a couple of issues with schema validation for template settings:

  • null is now a valid default value if a allows_empty is True.
  • Fixed an issue with validation of required/optional fields when using the new fields syntax.

v0.14.33

Misc fixes and small features. Added a number of new tank command relating to configuration management.

  • Added a post_engine_init() command to the application base class that apps can implement if they need to execute any logic after all apps and the engine has initialized.
  • If an environment contains any items using dev locations, a restart and reload will automatically be added to the Shotgun menu for easy development and iteration.
  • Improved the inline documentation for a number of tank commands.
  • The updates command now allows for selective updates in various ways.
  • The install_app command allows you to install an app from a git repository.
  • Added a switch_app command that lets you switch the location for an app between app store, git and dev.
  • Added a push_configuration command that pushes the configuration data safely from one pipeline config to another.
  • Added a app_info command that shows a breakdown of the apps in an environment.
  • Added a cache_apps command that ensures that all the app code that toolkit needs exists on disk for a configuration.
  • Register_publish can now take the optional named parameter version_entity. This specifies the version entity the published file should be linked to.

v0.14.32

Fixed issue stopping the shell & shotgun engines from launching when PySide is not installed for Python.

v0.14.31

Miscellaneous improvements and fixes

  • Added the ability to hide the title bar for dialogs created with show_modal and show_dialog.
  • Added execute_in_main_thread() method to help with UI interaction from non-main threads.
  • Reloading apps and engines now reloads templates.
  • Added sgtk.platform.restart() to simplify restarting the current engine

v0.14.30

Changes to how Toolkit ensures the correct core API is being executed for a configuration.

Previously, only loose checks were carried out to ensure that the currently running code was compatible with the currently running configuration. This could lead scenarios where a pipeline configuration contained apps and engines which required a certain version of the core API, but could still be initialized with an older version of the core API, causing failures at runtime as a consequence.

Also, pipeline configurations now also have a proxy sgtk API wrapper created when constructed. Previously, only a tank wrapper was created.

v0.14.29

Toolkit dialogs no-longer allow un-handled key press events to be passed to the host application.

  • Previously, un-handled key-press events were passed to the host application which could result in unexpected behaviour if the application handled them (e.g. Maya hot-keys).

v0.14.28

Miscellaneous bug fixes and minor improvements.

  • Added a create_with_parent option to static folder nodes.
  • The setup_project command now runs without an Internet connection, assuming that you base your new project on an configuration that exists locally.
  • Added a sgtk.reload_templates() method that reloads the template definitions.
  • Added a protected Engine._get_standard_qt_stylesheet() method to the engine base class to make it easy for engines that don't have a QT with a stylesheet natively set up to present a consistent looking visual appearance.
  • Updated the standard QT stylesheet to properly render disabled dialog boxes.
  • Added timestamps to the debug logging that is generated from the tank command
  • Added meta methods sgtk.platform.current_bundle() and sgtk.platform.get_framework() to make it easy for app code inside modules to introspect and connect to the outer toolkit world.
  • Fixed a bug which would cause the tank command to malfunction on windows if the interpreter path contained a space.
  • Fixed a bug which would cause setups where the local storage path in Shotgun has been set up with malformed paths to fail.
  • Added support for a post install hook which makes it possible to execute a script when an app, framework or engine is installed.

v0.14.26

Fixed a bug which caused windows setups that were using a driver letter and no sub folders for their primary storage to fail.

  • Added tab based auto completion to the tank shell. Unix and macosx only at the moment.
  • Contexts constructed from publishedfiles (via context_from_entity) are now constructed based on the associated task or entity.
  • When running the tank command with the --debug flag, tankerrors class exceptions are output with a full stack trace and not just as an error message.

v0.14.25

Fixed a minor context bug.

Fixed a bug where it was previously possible to contruct a context object representing a Project, but the name was not properly populated. This caused problems in certain engines and would also sometimes show up as "None" in the Shotgun menu.

v0.14.24

Several tweaks, features and bug fixes, mostly relating to folder creation.

  • It is now possible to create projects where the project level folder structure spans over multiple file system levels.

  • It is possible to use an custom entity when setting up a Step node in the folder creation configuration.

  • Added a new parameter to the publish method so that you can pass dependencies as a list of publish ids.
  • Added metrics and statistics collection to Shotgun API http user agent headers.
  • Fixed a bug where a context object sometimes would return a Project referenced in both the project and the entity property.

v0.14.23

Improvements to the Toolkit dialog & widget management as well as other improvements and fixes.

  • Dialogs created with engine.show_dialog() & engine.show_modal() are now cleaned up correctly when closed. Additionally, the hosted QWidget is now closed correctly and the closeEvent signal will be emitted allowing client code to perform any clean-up required. (Note: Some engine's may require updating to benefit from this change)
  • Stability improvements for all apps that use the tk-framework-widget BrowserWidget.
  • Improved error messages when duplicate templates are found or when a template is found without a definition
  • Fixed an issue with tank updates causing it to stop when something was updated in a file included by multiple environments

v0.14.22

Added the ability to exclude static folders based on boolean conditions.

The folder creation schema configuration and API now supports a more flexible way to create static folders. It is possible to include a shotgun filter which is evaluated at runtime and which will determine if a folder is to be created or not. This makes it possible to for example create a "cut" folder for all pipeline steps which are of type edit, but not for any other pipeline steps.

v0.14.21

Improved support for non-ascii characters in Entity/folder names.

  • Improved process_folder_name hook to handle non-ascii characters in entity names.
  • Fixed string template key validation to correctly validate non-ascii characters.

v0.14.20

Fixed a bug when using @ref syntax to reference a template defined in a multi-root configuration

v0.14.19

@ref syntax can now be used anywhere within a template definition and is no longer limited to being used at the start

v0.14.18

Improvements to @ref syntax for templates.

  • Multi-level @ references are now resolved correctly.
  • @ references can now be used for string templates as well as path templates.

v0.14.17

Bug fixes to project setup.

  • Fixed an issue which would cause pre-v0.13 setups to behave incorrectly if a project was inherited from another project.
  • Fixed a bug which would affect forced project setups when the location of the setup changes between attempts
  • Changed the logic in the tank command so that when an absolute match is found, it is assumed to be the item to be used.

v0.14.16

Bug fixes to the context object. Please note that some of these fixes may have edge case side effects in older versions of the Work Files App. Before installing this version of the Core, we recommend updating to the latest version of the work files App! See the full release for more details.

  • Fixed a bug where the inequality operator for the context object was not correctly implemented and was using the default implementation whereas the equality operator was doing an 'intelligent' lookup (as opposed to comparing memory addresses of the instances). This bug was compensated for in earlier versions of the work files app. If you are running tk-multi-workfiles version 0.3.3 (released beginning of July) we you may see side effects if you do not upgrade the work files app prior to installing this version of the Core API.

  • Fixed a bug where the context.as_template_fields() method sometimes would return the wrong fields information if you queried a context which did not have any corresponding files on disk - for example created by using the tk.context_from_entity() factory method for a Task. Now, an exception is raised instead. This may affect older versions (v0.3.15 and older) of the tk-multi-workfiles app and we recommend that you update to latest if you are running this. Note that you will only see artefacts if you operate on shots or assets for which folders have not yet been created on disk.

  • Added a tank shell command that launches an interactive python session via the tank command.

  • Product Rename: Changed a number of tank.shotgunsoftware.com urls to point to toolkit.shotgunsoftware.com

  • Improved the Core API upgrade script to notify people that they need to restart any running Applications in order for these applications to pick up the API change. Running reload engines and apps is not enough.

v0.14.15

The filter syntax is now fully supported for task and step folder configuration nodes.

v0.14.14

Fixed a bug when using the new 'fields' syntax for a template and the validation fails

v0.14.13

template.get_fields() no longer stops when value conversion fails and there are still template variations to try

v0.14.12

Improved the sgtk.paths_from_template() method to better handle optional keys.

  • Where an optional template key is specified as a skip key, sgtk.paths_from_template() will now find all paths that don't contain a value for the key together with any paths that do contain a valid value for the key.
  • Added skip_missing_optional_keys argument to sgtk.paths_from_template() to allow all optional keys not specified in the fields dictionary to be skipped.

v0.14.11

Fixed an issue that stopped the fields attribute working for the template data type in app manifests.

v0.14.10

sgtk.sgtk_from_path() no longer complains about missing non-primary pipeline configurations when run with a project path.

v0.14.9

Include syntax now supports including whole app block in environment configuration if required.

v0.14.8

Added a --force option to setup_project, allowing advanced users to set up a project more than once.

v0.14.7

Fixed an issue which prevented multi selection of Shotgun actions on Windows.

v0.14.6

Fixed problem with migrate_published_file_entities command when entities were linked with notes

v0.14.5

Added a missing sgtk_api_handle.roots property to the API.

v0.14.4

Improved schema validation in migrate_published_file_entities command.

v0.14.3

Fixed issue with migrate_published_file_entities command.

v0.14.2

Minor bug fixes and feature additions.

  • Added a special {TANK_ROOT} keyword which allows dev descriptors to organize code local to a Pipeline Configuration.

  • Publishes done in a Project Context now linked to the Project.

v0.14.1

Updated the tank command so that it now runs in a local environment on Windows

v0.14.0

Added ability to migrate TankPublishedFile entities to the new PublishedFile entity type:

  • Addition of a new command: tank migrate_published_file_entities.
  • Updated setup_project so that all new projects will use the new PublishedFile entities if they are enabled on the Shotgun site.

v0.13.27

Added the ability to create a copy of a context object with a different user

v0.13.26

Added migration for engine menu favourites that include Tank in the name.

v0.13.25

Renames and support for the new name Sgtk.

  • Added sgtk module so that you can do import sgtk
  • Added aliases to key objects in the API:
  • Factory Methods - sgtk.sgtk_from_path() and sgtk.sgtk_from_entity()
  • The main API object class Sgtk()
  • Bundle and context accessors: app_obj.sgtk

  • Renames from Tank to Sgtk and Shotgun Pipeline Toolkit in a number of places.

  • Updated reference documentation

Note that this change is fully backwards compatible.

v0.13.24

Minor bug fixes.

  • It is now possible to run the Core API with a storage pointing at a server mapped as a UNC handle (\\server) and each project being represented by a UNC share (\\server\share).

  • When new projects are created, empty folders now contain placeholder files. This is to help SCMs such as Perforce and Git to be able to manage Configurations easily.

v0.13.23

Folder creation tweaks, misc. functions and bug fixes.

  • It is now possible to create a task folder under a step folder in the folder schema.
  • A new core hook has been added that runs at pipeline configuration init.
  • Added logic to support the new publish types when publishing.
  • The Tank command now supports custom entities.
  • The Tank (bash) command now supports cygwin and msys.
  • Fixed a bug where settings of type shotgun_query would not resolve correctly.
  • Configuration and API now allows for multiple Shotgun users when connecting to Shotgun.
  • Fixed a bug in the engine base class which would cause errors not to be written on engines which do not implement any error handling at all.

v0.13.22

Added utility method to query the entity type to use for Published Files

v0.13.21

Fixed issue with using the drive as a data root in Windows

v0.13.20

Fixed bug when parsing template paths with includes in a multi-root setup

v0.13.19

Tank is now shipping with 3.0.13 of the Shotgun API

v0.13.18

Improved Tank Command. Bug Fixes and Polish.

Tank Command

  • The tank command has been restructured to present commands and help in a better and more intuitive fashion.

  • The tank command will limit shotgun lookups to the current project when executed from a pipeline configuration.

  • Improved ambiguity resolution - when there are more than one match across multiple projects, you can prefix the item you are looking for by a project in order to narrow down the matches.

  • Added an overview command which shows a breakdown of all configurations for a project.

  • Added a command to move the location of a pipeline configuration.

  • Added a command to move the studio code location.

Fixes and Improvements

  • Fixed a bug which would sometimes cause references to be replaced by actual values.
  • Improved project setup process. Setup project script now presents the user with a list of existing projects.

  • Fixed bugs in relation to setting up projects based on existing configs.

  • The standard Tank UI toolbar has improved formatting and tooltips.

v0.13.17

Fixed a bug causing some old publishes not to be found when calling find_publish.

v0.13.16

Fixed stability issues with loading Shotgun Actions on Windows using the Browser Plugin.

v0.13.15

Improved tank command resolve logic.

This release changes the resolve logic when a local tank command or API instance is being used to start Tank.

  • Symbolic links are handled in a better way
  • The standard Tank UI toolbar now contains the project name and Configuration name is known and non-standard.

  • The Tank command and API will perfer the Primary Configuration unless a specific tank command or API instance is being used to launch Tank.

  • The setup process handles data entry for the code location in a better way.

v0.13.13

Bug fixes relating to logging and templates.

This release contains a number of smaller tweaks:

  • It runs a migration to ensure that all tank.bat files are correct
  • Logging from the shotgun engine is now always correctly output to Shotgun
  • Fixed a template formatting issue
  • Tweaks to setup script.

v0.13.12

Bug fixes relating to running Tank on windows with the new browser plugin.

v0.13.10

Fixed a bug causing cloning to fail for certain windows paths.

v0.13.9

The 0.13.x release contains a number of new features and some internal restructuring. The v0.13.9 release in particular addresses some minor improvements to error messages.

  • Fixed a bug fix where migrations would not correctly handle the open in associated application app in shotgun.
  • Core localize command now copies apps and engines to local PC.
  • Setup project now strips user input of whitespace.
  • Setup project now runs app update checker at the end of a project install.

v0.13.8

The 0.13.x release contains a number of new features and some internal restructuring. The v0.13.8 release in particular addresses some minor improvements to error messages.

Features

  • Code Locations and Pipeline Configuration - Tank now supports a more flexible structure for how to organize your projects and your code. Previously you had to locate the tank configuration inside each project in a rigid structure - now you can put the tank configuration in a different location, for example in a software install area, rather than in the project location.

  • Tank Command - We have added better shell support for Tank in the form of a tank command which gives access to maintenance functions as well as the abiliy to run apps directly in the shell.

  • New Shotgun and Shell Engines - We have revamped the shotgun and shell engines to work with QT-based UIs. This means that you can run our normal multi-apps inside Shotgun and the Shell. Right now, you need to have Pyside or PyQt installed on your system in order to do this.

  • Development Workflows - A Tank project can now be associated with more than one configuration. This means that you can "clone" a project configuration, essentially take a copy of the configuration that artists and producers are using, and do development in private, without anyone else being affected by changes you make. You can also invite people to your development sandbox so that they can try out your changes in a safe way.

  • Includes and Overrides - It is now possible to include config files in other config files, making tank easier and more flexible to configure.


v0.12.28

Fixed a bug stopping per-setting hooks from working. Fixed support for local git repos on Windows.

v0.12.27

Minor performance tweak.

  • Fixed an issue which caused tank to keep asking Shotgun for the current user over and over again in the case the current username wasn't found in Shotgun.

v0.12.26

Fixed a bug which caused the UI sidebar to fail when a template had a null value.

v0.12.25

Minor fix to internal find_settings functionality

v0.12.24

Added a length property to template keys.

You can now tell tank exactly how long a particular template key should be.

v0.12.22

Fixed a bug where the tank git update subsystem would not work with Python v2.6.

Previously, we were relying on a system call which was only available in Python2.7 and above, causing any update check against git-based locators to fail.

v0.12.21

Improved filter management in folder creation setups. Fixed and additions to configuration.

  • A new settings type can now be used in the info.yml manifest. It is called a config_path and is a path which is relative to the configuration. At runtime, this is resolved into a full path.

  • Added support for a special {engine_name} token which can be used inside the info.yml manifest when declaring default values for hooks. This makes it possible to split up a default hook into several engine specific implementations, and at runtime, tank will choose the default hook based on the engine currently running.

  • The folder creation now correctly takes filters into account for setups where the same entity type is processed more than once as part of a configuration. Imagine that you have two Asset folders in your setup, one representing assets starting with the letter X and one representing all other assets. Previously this would not work correctly, this release contains the necessary bug fixes for it to operate as expected.

v0.12.20

Minor bug fix release - Null values now working correctly in folder creation queries.

This release contains a single bug fix relating to the folder configuration syntax. You can now create shotgun queries including null values and data types other than strings - this was not previously possible.

v0.12.19

Minor bug fix release - added support for display names for Shotgun entity types.

When custom entities are defined in Shotgun, they have an API Name (CustomEntity03) and a Display Name (whatever you set it to in the Shotgun preferences). Previous versions of Tank would exclusively only display the API Names, which was fine for built in Shotgun entity types (such as shots and assets) since their API Name is the same as their Display Name. However, setups using custom entity types would look confusing. This release adds a method for looking up the display name given an API name. It also includes the display name in the str() operator for the context, so wherever the context is displayed in Tank, custom entities will now be displayed correctly.

v0.12.18

Bug fix release - better edge case checking with folder creation and added framework features.

  • When folders are created, better checks are now in place to ensure that Tank handles renaming, deletion and general changes to items in Shotgun.

  • This release allows frameworks to be loaded at any arbitrary point in the code - previously, there were some limitations related to Tank's import model.

  • This release also allows arbitrary frameworks to be loaded from hooks.

  • The update checker now checks to make sure that all declared frameworks exists locally.
  • We have added support for deprecated items in our update process.
  • Added an icon_256 property to app, engine and framework classes. This returns a 256px square app icon.
  • Added the ability to declare a support url for every app. If undefined, it will default to the Tank support helpdesk.

  • Tank now features a new, experimental sidebar UI which gives quick access to common functionality.

v0.12.17

Minor bug fix - Tank keeps a cache of loaded hook code and this is now cleared at engine restart.

This means that when the engine is restarted (for example by using the about work area app), all loaded hook code will be discarded. This is useful if you are doing hook development and want to load the latest version of the hook you are developing. Previously you had to restart the entire python interpreter (e.g. restart the host app) in order to reload the hook - now you can quickly reload things at runtime.

v0.12.16

Minor bug fix - task precedence now handled correctly in the shotgun publish method.

Previously, if a task was contained in the context object, this would always be used, even if the calling code was specifically passing a task to associate the publish with. Now the logic is the opposite - when a specific task is passed to the publish method, this is always used - if no task is passed, the method attempts to fall back on the task contained in the context.

v0.12.15

The template validation running at startup now understands optional fields.

Previously, when an app was starting up, it would validate every template settings against the info.yml manifest file to ensure that all the required fields were present. This validation would not take optional fields into account, so if you had a path /{Shot}[/{Step}]/work, it would previously only work with a context which contains both a step and a shot. As of this version of tank, a context without Step also is considered valid.

v0.12.14

Hook settings, new folder creation API methods and bug fixes.

Added features:

  • The Tank Folder creation now creates all static folders it can possibly create during the folder recursion. Previously, it was just creating the static folders that were directly related to the items that were being created.

  • Added an is_optional(field) method to the template object.

  • Added a new utility method: tank.util.prepend_path_to_env_var()
  • Added a folder creation method ensure_folder_exists() to the app/engine/framework base class.
  • Added a cache_location property to the app/engine/framework base class. This is handy if your app needs to store cache data that should persist across sessions (for example cached thumbnails).
  • Added a new, simpler way of validating template schemas.
  • Any tank environment setting can now be replaced with a hook instead of a value. The hook will be evaluated each time the value requested.

Bug Fixes:

  • context.as_template_fields() now correctly returns None values if a field in Shotgun is blank.
  • The git descriptor now correctly handles remote repositories.

v0.12.13

This release was never released to the public.

v0.12.12

Path cache related bug fixes and tweaks.

  • Improved the error message that is returned when a duplicate entry is rejected by the path cache.
  • The path cache now by default only return paths to primary disk locations in order to preserve backwards interface compatibility.

v0.12.11

New folder creation functionality and bug fixes.

  • Installer script now validates the input parameters.
  • Fixed a bug where the equals operator on context objects wasn't returning correct results when the context contained a user.
  • Added support for more than one entity associated with a folder in tank. If you now in your folder creation setup for example set the folder name of your shot folders to {code}_{sg_sequence.Sequence.code}, that folder will be associated with both the sequence and the shot object.
  • .bat files are now given 777 permissions on install
  • Added a filesystem_locations property to the context object.
  • Added a shotgun_url property to the context object.
  • In the folder creation setup, it is now possible to define optional fields. Parts of the folder name contained inside of [square brackets] are optional and will be omitted in the case the shotgun fields inside the brackets have empty values in Shotgun.

v0.12.10

Bug fixes and tweaks to folder creation.

  • It is now possible to create step folders inside of user sandboxes. Previously, the step would not associate correctly with the entity folder outside of the sandbox.
  • Fixed a confusing error message which claimed that a folder configuration was referencing fields that did not exist in Shotgun when instead was trying to access data with Null values.

v0.12.9

Update the setup_project script to handle additional parameters so that it can be run as part of a batch process.

v0.12.8

Added a tank.platform.get_engine_path() method.

This method returns a path to an engine based on processing the environment, similar to when the engine is started.

v0.12.7

Added a str() operator to the Context class.

v0.12.6

Improved QT Support in the Tank Core.

  • Changed the QT factory methods introduced in 0.12.5 to be more flexible. The methods take a class derived from QWidget and produces the necessary scaffolding to host it inside of a Dialog or other UI Construct, allowing for greater flexibility and customization.

v0.12.5

A big patch release containing many fixes and improvements across several areas.

  • Extended Manifest -- We added several new options to the info.yml manifest. You can now define version constraints for your app (e.g. requires core v1.2.3), include a short description and a name.

  • Auto-install of frameworks -- Apps that depend on frameworks will now have those frameworks automatically installed together with the app.

  • Added a manual install location descriptor for cases where deployed code is managed by hand rather than automatically by the Tank store.

  • Added init hooks for both the API and for any engine, app or framework. This lets a client run arbitrary code as part of the tank initialization.

  • Added pre-publish hook that makes it possible to add your own data to a publish prior to it being committed.

  • Added a tank.util.create_event_log_entry() method for easy access to the shotgun event log.
  • Publishes with no thumbnail defined now get a default thumb.
  • Downloads from the app store are now retried if it fails - useful when installing Tank from a location where the internet connection is unreliable.

  • Apps can now be defined to work only for a particular operating system

  • In the environment file, it is possible to declare that certain apps should only be loaded on certain operating system platforms.

  • added a script to the scripts folder which makes it more easy to switch an app between its app store version and a local development version.

  • Folder creation has been refactored so that the folder creation process runs as a single hook, making it possible to customize and take control over exactly how folders are written to disk.

  • Single Tasks and Steps can now be created by the folder creation system.

  • Added new folder node types representing tasks and steps.
  • Engines can now implement a method to report if they have access to a UI or not.
  • Added methods to the engine base class to handle QT dialog creation in a generic way. This ensures that windows are parented correctly to the host application platform and also makes it possible to run apps both in PySide and PyQt based engines.

  • The queue methods that were previously part of the engine interface have been deprecated, in favour of a framework-based approach.

  • Fixed issues with file permissions and the Path Database

  • Fixed issues with some folders being created with the wrong permissions.

v0.12.4

Fixed a bug which would sometimes cause the wrong config to be downloaded at new project creation.

v0.12.3

Experimental Python 2.5 support.

We made a first pass on changes to make Tank Python 2.5 compatible. We are hoping that we have covered most cases and situations where we were previously seeing compatibility issues, however there may be things we haven't yet encountered! If you want to run Tank in conjunction with Python 2.5, this is now possible, however proceed with slight caution!

Bugs Fixed

  • Tank now also works with Python 2.6 versions earlier than 2.6.3. Note however that there is still a known bug relating to some proxy servers not connecting properly to the app store in python versions earlier than 2.6.3.

v0.12.2

Frameworks, Configs, Better Sequence Handling, Hot Reload, Workspaces and User Sandboxes.

Features

  • User Folders - Tank now supports a user sandbox workflow. In the folder creation setup, you can add a special node in the configuration which represents the current user. This folder is created at engine startup (e.g. at application launch). The Context object also supports the concept of a user, meaning that templates now can contain {HumanUser} tokens, and these will be populated with the current user.

  • Folder Creation Transforms and Validation - When creating folders on disk, Tank previously used a fixed set rules when transforming Shotgun names into file system names. For example, spaces where replaced by dashes. This has now been moved into a Core Hook, making it completely configurable. The hook also supports validation - by raising an exception in the hook (for example if a shot or asset in Shotgun does not use the correct naming convention), folder creation is aborted and an error message is passed to the user.

  • Workspaces - Folder creation is now split into two distinct phases, one that can run at any time, and one that runs at application (engine) startup. This can not only be used for creating user sandbox folders, but can also be used to create workspaces at runtime - in some workflows this can be a powerful feature - rather than creating folder structures on disk for every possible application at folder creation time, application specific folders are created just at engine startup.

  • Hot Reload - Tank supports a new way of importing and manage code inside of apps which makes everything fully reloadable. When an engine is restarted, all the code is reloaded. This is not only useful for development, but also means that for example two versions of the app can run concurrently in the system. A new method called import_module(module_name) has been added to the engine and app base classes to administer imports in apps and engines. For more information, see the API docs.

  • Frameworks - Tank supports a new concept alongside engines and apps; a framework is a versioned library which can be included in apps and engines in order to share and encapsulate functionality. For more information, see the API docs.

  • Configuration Management - When creating a new project, you need a starter configuration. These were previously managed alongside the core code. We have now pushed configurations into the app store, making it much easier to browse and install starter configurations.

  • Improved Sequence Handling - We have added methods and features to make it easier and more efficient to work with image sequences in Tank. There is now a way to tell Tank that you want the sequence paths represented on a particular form (for example frame numbers represented as %04d, %08d, %d etc depending on how the data is stored on disk). We have also added a new file listing method which more efficiently handles 'abstract' paths, e.g. paths which contain tokens such as %v or %04d. It is now also possible to mark certain template fields as abstract, meaning that they can be returned in their abstract form from some API methods. For more info, see the API docs.

  • App Store and Community - As part of Tank v0.12, we are launching a much improvement App, Documentation and Community Site over at https://support.shotgunsoftware.com/entries/94042238-Toolkit-Home-Page. We invite to go have a look!

Tweaks

  • Better logging output.

Fixed Bugs

  • Multi engine apps now properly disable themselves when initialized into an unsupported engine.

v0.11.3

Fixed a bug which caused problems for studios connecting to Shotgun using a proxy server.

v0.11.2

Fixed a bug where templates with no keys were causing errors. Fixed a bug which caused incorrect behaviour for complex folder creation setups.

v0.11.1

Added a new standard configuration.

v0.11.0

A number of new features and a couple of smaller bug fixes.

Features

  • Multi Engine Apps - Tank how officially supports the notion of an app that can execute in more than one engine. This makes it easy to build apps that work across a range of applications.

  • Filter shotgun list fields to only include used values (e.g. asset type)

  • Folder creation: We added a tank_ignore file which lets a user define things that should not be copied across from the template location when folders are being created.

  • Templates can now define certain fields as optional using a special syntax. For example: {shot}/{sequence}/work/{shot}[_{name}].v{version}.ext

  • We have added an 'exclusions' pattern to templates, indicating that in order for a value to be valid it must not include that particular pattern. This can be handy when you for example have an assets folder and a collection of shot folders in the same location in the file system and you want to tell them apart.

  • Templates can contain arbitrary shotgun fields. These are automatically populated by the context object.

Tweaks

  • exception messages now contains the environment name.
  • It is now possible to turn off engines and applications in the environment configurations using a disabled flag.

  • The platform comes with its own set of core hooks which can be overridden.

Fixed Bugs

  • Fixed an invalid context computation that would happen when using a configuration using the additional_entities hook.

  • It is now possible to now use HumanUser in the folder creation configuration.


v0.10.11

Bug fixes.

  • Fixed yaml serialization of the Context objects.
  • Fixed issue with Version folder creation.

v0.10.10

A bigger release with a number of bug fixes and improvements.

  • Hooks now support default values and can be bundled with apps. (17818)
  • Fixed various case sensitivity issues. (18116)
  • String templates no longer omit leading slashes (18290)
  • Fixed a bug which caused errors when unicode characters were used (18289)
  • Better, smarter preserving of context when switching (18530)
  • Fixed a bug where some query filters in the folder creation configs were ignored (18548)

v0.10.9

Fixed a bug where tank.util.find_publish() would sometimes not return all matched records.

v0.10.8

Tweaks and bug fixes.

  • Added a description property to the app and engine classes.
  • Added access to key properties in the environment from the engine.
  • Added state management at menu initialisation time. Each menu entry now knows which app it was generated by.

  • Fixed a bug where it was previously not possible to retrieve the fields for a string template.

  • Bug 17934: Fixed a bug which caused configurations where step high up the tree would fail.

v0.10.7

Bug fixes and tweaks. Polish of the Starter Configuration.

  • Improvements and polish to the Starter Configuration.
  • Bug: Fixed a bug which sometimes caused the wrong dependency chain to be generated in the case the same file was published multiple times.

  • Bug: Fixed an issue with permissions and the core installer on Windows

  • Feature: Ability to bubble up thumbnails on publish to associated Task and/or Entity
  • Feature: Added a new method to the core API: tank_obj.entity_from_path() which lets you resolve the Shotgun entity that may be associated with a path on disk.

v0.10.6

Upgraded the github backend connector to use v3 of the github API rather than v2 which has been deprecated.

v0.10.5

Configuration updates.

v0.10.3

Minor changes to update scripts. Shotgun user retrieval method returns more data.

  • Split the update checking process into two scripts - one for the platform API and one for apps and engines.

  • The current user retrieval method in tank.util now returns more fields. Previously it would only return id and type, now it returns name, email, thumbnail path.

v0.10.2

Minor tweaks and a bug fix relating to template aliases.

  • Added documentation urls to all github connected projects - whenever an app is installed from github, the documentation will now point to the github wiki for that repository.

  • Made the environment parameter for check_for_updates script optional, so that if you run check_for_updates on a project, it will update all environments.

  • Fixed a bug which caused template aliasing to fail if a template containing an alias was contained inside a nested data structure in the configuration.

v0.10.1

Minor tweaks following the big 0.10 release.

  • Fixed a bug in the installer which caused some scripts not to have executable permissions after install.
  • Tweaks to our standard starter configuration

v0.10.0

API Platform Refactor and new App Store Concept.

This release contains a large number of major changes. It is not compatible with previous versions of Tank and the entire distribution and deployment model is different as of v0.10.0. In addition to making changes to the way the Tank infrastructure works, we have also added a number of new features:

  • Tank work works with multiple roots on disk, so you can have assets located on one disk mount and shots on another.

  • We have improved and changed the configuration formats for templates and metadata to make them more flexible and future proof.

  • The Shotgun Actions have been refactored and are now more flexible and powerful.

  • We have added new API calls for retrieving data from shotgun for published items.

v0.9.0

Dependency Handling and Tank Types support.

Details:

  • Improved dependency handling
  • Published data in shotgun now has a notion of type
  • Environments now contain multiple engines
  • Hooks are shared across environments

v0.8.4

Fixed bugs.

Details:

  • Exposed SequenceTemplate class in main Tank namespace.
  • Fixed a bug where external paths would produce an invalid Context.
  • Added an app location property to all apps which holds the path to the app code on disk.
  • Better error reporting when Shotgun data required by the folder creation is missing.
  • Better error reporting when apps error at startup.
  • Better error reporting when an environemnt cannot be initialized.

v0.8.3

Fixed bugs.

Details:

  • Fixed an issue where some context strings were returned as unicode rather than string.
  • Fixed an issue with windows paths being incorrectly compared if a windows application was using slashes even on windows.
  • Fixed a bug where a context factory method raised an exception in some cases rather than returning an empty context.

v0.8.2

Fixed bugs.

Details:

  • Fixed a bug where paths were incorrectly stored in our cache database on windows machines.

v0.8.1

Fixed bugs.

Details:

  • Fixed a bug where context fields were returned in a generic way by Context.as_template_fields. The as_template_fields interface has changed to take a template as a parameter, and it will now generate fields suitable for that specific template.
  • The path database stores paths in a normalized form.
  • Added the ability to have compound fields in the folder creation, so that a folder name may consist of more than just a single shotgun field.
  • The template configuration syntax now supports whitespace.
  • Folder creation logic now suports Tasks.
  • Folder creation logic now supports more complex folder names.
  • Folder creation logic now validates the names and blocks illegal characters.

v0.8.0

The very first release of the Tank Core API.

Tell tank that we don't want a table of contents by adding this special markup: TANK_NO_TOC Note that we cannot use html tags because shotgun strips them out as part of its security stuff...

Follow

0 Comments

Please sign in to leave a comment.