Skip to content

Commit 6730a79

Browse files
[SHOT-3592] Introduce Review with VRED into basic config (#98)
* Added tk-shotgun-launchvredreview.yml, version.yml, and version specific handling in pick_environment.py. * Replicate project environment in the Version environment to avoid losing any functionality, and add any engine specific Version handling. Move shotgun.version settings to its own version.yml file.
1 parent fcd7457 commit 6730a79

File tree

5 files changed

+104
-4
lines changed

5 files changed

+104
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exclude: "ui\/.*py$"
1414
# List of super useful formatters.
1515
repos:
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
17-
rev: v2.2.3
17+
rev: v3.2.0
1818
hooks:
1919
# Ensures the code is syntaxically correct
2020
- id: check-ast
@@ -35,7 +35,7 @@ repos:
3535
- id: trailing-whitespace
3636
# Leave black at the bottom so all touchups are done before it is run.
3737
- repo: https://github.com/ambv/black
38-
rev: stable
38+
rev: 20.8b1
3939
hooks:
4040
- id: black
4141
language_version: python3

core/hooks/pick_environment.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ class PickEnvironment(Hook):
2121

2222
def execute(self, context, **kwargs):
2323

24-
if context.source_entity and context.source_entity["type"] == "PublishedFile":
25-
return "publishedfile"
24+
if context.source_entity:
25+
if context.source_entity["type"] == "Version":
26+
return "version"
27+
elif context.source_entity["type"] == "PublishedFile":
28+
return "publishedfile"
2629

2730
if context.entity and context.step is None:
2831
# We have an entity but no step.

env/includes/common/apps.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ common.apps.tk-shotgun-launchfolder.location:
7777
name: tk-shotgun-launchfolder
7878
version: v0.2.1
7979

80+
common.apps.tk-shotgun-launchvredreview.location:
81+
type: app_store
82+
name: tk-shotgun-launchvredreview
83+
version: v1.0.0
84+
8085
# help urls
8186

8287
common.apps.tk-multi-publish2.help_url: https://support.shotgunsoftware.com/hc/en-us/articles/115000068574-Integrations-User-Guide#The%20Publisher

env/includes/shotgun/version.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright (c) 2016 Shotgun Software Inc.
2+
#
3+
# CONFIDENTIAL AND PROPRIETARY
4+
#
5+
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
6+
# Source Code License included in this distribution package. See LICENSE.
7+
# By accessing, using, copying or modifying this work you indicate your
8+
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
9+
# not expressly granted therein are reserved by Shotgun Software Inc.
10+
#
11+
12+
# this configuration defines the behavior of the Shotgun Desktop when it
13+
# is running in its project level configuration
14+
15+
includes:
16+
- ../common/engines.yml
17+
- ../common/apps.yml
18+
- ../common/settings/tk-multi-publish2.yml
19+
20+
shotgun.version:
21+
apps:
22+
23+
tk-multi-publish2:
24+
collector: "{self}/collector.py"
25+
publish_plugins:
26+
- '@common.settings.tk-multi-publish2.publish_file'
27+
- '@common.settings.tk-multi-publish2.upload_version'
28+
location: "@common.apps.tk-multi-publish2.location"
29+
30+
tk-multi-launchapp:
31+
scan_all_projects: true
32+
use_software_entity: true
33+
hook_before_register_command: "{config}/tk-multi-launchapp/before_register_command.py"
34+
location: "@common.apps.tk-multi-launchapp.location"
35+
36+
settings.tk-shotgun-launchvredreview:
37+
deny_platforms: [ Mac, Linux ]
38+
viewer_extensions: [ vpb ]
39+
hook_verify_install: "{self}/verify_install.py"
40+
hook_launch_publish: "{self}/shotgun_launch_vred.py"
41+
location: "@common.apps.tk-shotgun-launchvredreview.location"
42+
43+
location: "@common.engines.tk-shotgun.location"

env/version.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) 2020 Autodesk, Inc.
2+
#
3+
# CONFIDENTIAL AND PROPRIETARY
4+
#
5+
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
6+
# Source Code License included in this distribution package. See LICENSE.
7+
# By accessing, using, copying or modifying this work you indicate your
8+
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
9+
# not expressly granted therein are reserved by Autodesk, Inc.
10+
#
11+
12+
# The Version environment was created to allow for Version specific actions.
13+
# To maintain functionality before this Version environment was introduced,
14+
# the Project environment has been replicated here, since that is the environment
15+
# that Versions used to have.
16+
description: Toolkit configuration to be loaded whenever an association with a
17+
Version has been established.
18+
19+
includes:
20+
- includes/houdini/project.yml
21+
- includes/maya/project.yml
22+
- includes/nuke/project.yml
23+
- includes/flame/project.yml
24+
- includes/desktop/project.yml
25+
- includes/desktop2/all.yml
26+
- includes/shell/project.yml
27+
- includes/photoshopcc/project.yml
28+
- includes/aftereffects/project.yml
29+
- includes/3dsmax/project.yml
30+
- includes/alias/project.yml
31+
- includes/shotgun/version.yml
32+
- includes/vred/project.yml
33+
34+
engines:
35+
tk-3dsmax: '@3dsmax.project'
36+
tk-3dsmaxplus: '@3dsmaxplus.project'
37+
tk-aftereffects: '@aftereffects.project'
38+
tk-alias: '@alias.project'
39+
tk-desktop: '@desktop.project'
40+
tk-desktop2: '@desktop2.all'
41+
tk-flame: '@flame.project'
42+
tk-houdini: '@houdini.project'
43+
tk-maya: '@maya.project'
44+
tk-nuke: '@nuke.project'
45+
tk-nukestudio: '@nukestudio.project'
46+
tk-photoshopcc: '@photoshopcc.project'
47+
tk-shell: '@shell.project'
48+
tk-shotgun: '@shotgun.version'
49+
tk-vred: '@vred.project'

0 commit comments

Comments
 (0)