Skip to content

Commit

Permalink
SG-20264 Support Email Update (#101)
Browse files Browse the repository at this point in the history
* Switched to using support_url from tk-core instead of the hard-coded email address. Also using TKMessageBox from tk-core to make sure hyperlinks are clickable and styled
* Updated build_resources to use local PySide
* Added core_api files to make sure testing is done with the local tk-core instead of the latest app_store version
  • Loading branch information
eshokrgozar authored Dec 9, 2020
1 parent 4de620f commit 0ad0133
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 12 deletions.
2 changes: 1 addition & 1 deletion info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ description: "Using this app you can browse, open and save your Work Files and P

# Required minimum versions for this item to run
requires_shotgun_version:
requires_core_version: "v0.19.1"
requires_core_version: "v0.19.18"
requires_engine_version:

# the engines that this app can operate in:
Expand Down
7 changes: 5 additions & 2 deletions python/tk_multi_workfiles/actions/new_file_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from sgtk import TankError
from sgtk.platform.qt import QtGui
from sgtk import support_url

from .file_action import FileAction
from .action import Action
Expand Down Expand Up @@ -77,8 +78,10 @@ def execute(self, parent_ui):
# and raise a new, clearer exception for this specific use case:
raise TankError(
"Unable to resolve template fields after folder creation! This could mean "
"there is a mismatch between your folder schema and templates. Please email "
"[email protected] if you need help fixing this."
"there is a mismatch between your folder schema and templates. Please "
"contact us via {} if you need help fixing this.".format(
support_url
)
)

# reset the current scene:
Expand Down
4 changes: 2 additions & 2 deletions python/tk_multi_workfiles/file_save_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def _generate_path(
# and raise a new, clearer exception for this specific use case:
raise TankError(
"Unable to resolve template fields! This could mean there is a mismatch "
"between your folder schema and templates. Please email "
"[email protected] if you need help fixing this."
"between your folder schema and templates. Contact us via {} "
"if you need help fixing this.".format(sgtk.support_url)
)

# it's ok not to have a path preview at this point!
Expand Down
4 changes: 3 additions & 1 deletion python/tk_multi_workfiles/ui/file_save_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def setupUi(self, FileSaveForm):
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.preview_grid = QtGui.QGridLayout()
self.preview_grid.setHorizontalSpacing(14)
self.preview_grid.setVerticalSpacing(6)
self.preview_grid.setVerticalSpacing(1)
self.preview_grid.setObjectName("preview_grid")
self.preview_label = QtGui.QLabel(self.preview_page)
self.preview_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTop|QtCore.Qt.AlignTrailing)
Expand Down Expand Up @@ -211,10 +211,12 @@ def setupUi(self, FileSaveForm):
self.warning_grid.setVerticalSpacing(6)
self.warning_grid.setObjectName("warning_grid")
self.warning = QtGui.QLabel(self.warning_page)
self.warning.setMinimumSize(QtCore.QSize(0, 45))
self.warning.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.warning.setWordWrap(True)
self.warning.setMargin(0)
self.warning.setIndent(-1)
self.warning.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.warning.setObjectName("warning")
self.warning_grid.addWidget(self.warning, 0, 1, 1, 1)
self.warning_label = QtGui.QLabel(self.warning_page)
Expand Down
7 changes: 2 additions & 5 deletions resources/build_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
# The path to output all built .py files to:
UI_PYTHON_PATH=../python/tk_multi_workfiles/ui

# The path to where the PySide binaries are installed
PYTHON_BASE="/Applications/Shotgun.app/Contents/Resources/Python/bin"

# Remove any problematic profiles from pngs.
for f in *.png; do mogrify $f; done

Expand All @@ -31,11 +28,11 @@ function build_qt {
}

function build_ui {
build_qt "${PYTHON_BASE}/python ${PYTHON_BASE}/pyside-uic --from-imports" "$1.ui" "$1"
build_qt "pyside-uic --from-imports" "$1.ui" "$1"
}

function build_res {
build_qt "${PYTHON_BASE}/pyside-rcc -py3" "$1.qrc" "$1_rc"
build_qt "pyside-rcc -py3" "$1.qrc" "$1_rc"
}


Expand Down
11 changes: 10 additions & 1 deletion resources/file_save_form.ui
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ background-color: rgb(255, 128, 0);
<number>14</number>
</property>
<property name="verticalSpacing">
<number>6</number>
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="preview_label">
Expand Down Expand Up @@ -443,6 +443,12 @@ background-color: rgb(255, 128, 0);
</property>
<item row="0" column="1">
<widget class="QLabel" name="warning">
<property name="minimumSize">
<size>
<width>0</width>
<height>45</height>
</size>
</property>
<property name="text">
<string>warning</string>
</property>
Expand All @@ -458,6 +464,9 @@ background-color: rgb(255, 128, 0);
<property name="indent">
<number>-1</number>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="0" column="0">
Expand Down
16 changes: 16 additions & 0 deletions tests/fixtures/config/core/core_api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2020 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.

# this configuration file defines which version of the toolkit
# core API that should be used at runtime.

location:
type: path
path: $SHOTGUN_REPOS_ROOT/tk-core
16 changes: 16 additions & 0 deletions tests/fixtures/configWF2ui/core/core_api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2020 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.

# this configuration file defines which version of the toolkit
# core API that should be used at runtime.

location:
type: path
path: $SHOTGUN_REPOS_ROOT/tk-core

0 comments on commit 0ad0133

Please sign in to comment.