diff --git a/engine.py b/engine.py
index 43ad7b6..f6f58ff 100755
--- a/engine.py
+++ b/engine.py
@@ -209,18 +209,18 @@ def pre_app_init(self):
except Exception:
self.logger.debug(
"Was unable to import the flame Python module. As a result, "
- "the Flame project will not be linked to associated Shotgun "
+ "the Flame project will not be linked to associated SG "
"project using the Flame Python API. This shouldn't cause "
"any problems in the current session, but it does mean "
"that the user might be prompted to link this project to a "
- "Shotgun project if they launch Flame using the Toolkit "
+ "SG project if they launch Flame using the Toolkit "
"plugin and open this same Flame project."
)
else:
try:
current_flame_project = flame.project.current_project
- current_flame_project.shotgun_project_name = (
- self.context.project.get("name")
+ current_flame_project.shotgun_project_name = self.context.project.get(
+ "name"
)
except Exception:
self.logger.debug(
@@ -228,13 +228,13 @@ def pre_app_init(self):
"shotgun_project_name property. This shouldn't cause "
"any problems in the current session, but it does mean "
"that the user might be prompted to link this project to a "
- "Shotgun project if they launch Flame using the Toolkit "
+ "SG project if they launch Flame using the Toolkit "
"plugin and open this same Flame project."
)
else:
self.logger.debug(
"Successfully linked the Flame project to its associated "
- "Shotgun project."
+ "SG project."
)
def _initialize_logging(self, install_root):
@@ -1410,7 +1410,9 @@ def cmdjob_supports_plugin_name(self):
)
self._cmdjob_supports_plugin_name = False
- for line in backburner_job_cmd_usage.communicate()[0].decode("utf-8").split("\n"):
+ for line in (
+ backburner_job_cmd_usage.communicate()[0].decode("utf-8").split("\n")
+ ):
if "-pluginName:" in line:
self._cmdjob_supports_plugin_name = True
break
@@ -1704,7 +1706,7 @@ def create_local_backburner_job(
return backburner_job_id
else:
- error = ["Shotgun backburner job could not be created."]
+ error = ["SG backburner job could not be created."]
if stderr:
error += ["Reason: " + stderr]
error += ["See backburner logs for details."]
@@ -1824,11 +1826,12 @@ def sgtk_exception_trap(ex_cls, ex, tb):
traceback_str = "\n".join(traceback.format_tb(tb))
if ex_cls == TankError:
# for TankErrors, we don't show the whole stack trace
- error_message = "A Shotgun error was reported:\n\n%s" % ex
+ error_message = "A SG error was reported:\n\n%s" % ex
else:
- error_message = (
- "A Shotgun error was reported:\n\n%s (%s)\n\nTraceback:\n%s"
- % (ex, ex_cls, traceback_str)
+ error_message = "A SG error was reported:\n\n%s (%s)\n\nTraceback:\n%s" % (
+ ex,
+ ex_cls,
+ traceback_str,
)
except:
pass
@@ -1839,7 +1842,7 @@ def sgtk_exception_trap(ex_cls, ex, tb):
if QtCore.QCoreApplication.instance():
# there is an application running - so pop up a message!
- QtGui.QMessageBox.critical(None, "Shotgun General Error", error_message)
+ QtGui.QMessageBox.critical(None, "SG General Error", error_message)
except:
pass
diff --git a/flame_hooks/sg_hook.py b/flame_hooks/sg_hook.py
index bbca8d4..3f3bf51 100644
--- a/flame_hooks/sg_hook.py
+++ b/flame_hooks/sg_hook.py
@@ -110,7 +110,7 @@ def getMainMenuCustomUIActions():
# sorts the list to have Log out option always appear last, Shotgun Python Console prior, and the rest in same order
context_commands.sort(
- key=lambda el: ("Log Out" in el, "Shotgun Python Console..." in el, None)
+ key=lambda el: ("Log Out" in el, "SG Python Console..." in el, None)
)
# generate flame data structure
diff --git a/flame_hooks/sg_project_hook.py b/flame_hooks/sg_project_hook.py
index 7df4533..f8fb6fe 100644
--- a/flame_hooks/sg_project_hook.py
+++ b/flame_hooks/sg_project_hook.py
@@ -58,7 +58,7 @@ def appInitialized(projectName):
engine.logger.debug(
"Was unable to import the flame Python module. As such, "
"it must be assumed that the Flame project change is "
- "resulting in a change in Shotgun project. This means "
+ "resulting in a change in SG project. This means "
"that the user will see a QMessageBox warning if the "
"tk-flame engine's project_switching setting is false. "
"The API to allow this was introduced in 2018.2."
@@ -85,7 +85,7 @@ def appInitialized(projectName):
QtGui.QMessageBox.warning(
None,
"No project switching!",
- "The Shotgun integration does not currently support project switching.\n"
+ "The SG integration does not currently support project switching.\n"
"Even if you switch projects, any Shotgun-specific configuration will\n"
"remain connected to the initially loaded project.",
)
diff --git a/hooks/backburner_hooks.py b/hooks/backburner_hooks.py
index 72117c9..3983d83 100755
--- a/hooks/backburner_hooks.py
+++ b/hooks/backburner_hooks.py
@@ -182,7 +182,7 @@ def attach_mov_preview(self, path, width, height, targets, display_name, fps):
return return_code
if self.parent.get_setting("bypass_server_transcoding"):
- self.parent.log_debug("Bypass Shotgun transcoding setting enabled.")
+ self.parent.log_debug("Bypass SG transcoding setting enabled.")
field_name = "sg_uploaded_movie_mp4"
else:
field_name = "sg_uploaded_movie"
diff --git a/hooks/project_startup.py b/hooks/project_startup.py
index 6d9d0e7..d8d1e61 100644
--- a/hooks/project_startup.py
+++ b/hooks/project_startup.py
@@ -123,12 +123,12 @@ def get_user(self):
shotgun_user = sgtk.util.get_current_user(engine.sgtk)
if shotgun_user is None:
- user_name = "Shotgun Unknown"
+ user_name = "SG Unknown"
engine.log_warning(
"Toolkit was not able to map your machine user name to a "
"user in Shotgun. Your Flame project will be associated with a "
"default 'unknown' user. In order to correctly connect your Flame "
- "user with the current Shotgun user, check that the current operating system "
+ "user with the current SG user, check that the current operating system "
"user name matches the 'login' field of one of the users in Shotgun. "
"Alternatively, if would like a different naming convention, either "
"reconfigure the Flame project startup hook or the Toolkit Core user "
diff --git a/hooks/tk-multi-loader2/flame_loader_actions.py b/hooks/tk-multi-loader2/flame_loader_actions.py
index 399be2a..39cdf27 100755
--- a/hooks/tk-multi-loader2/flame_loader_actions.py
+++ b/hooks/tk-multi-loader2/flame_loader_actions.py
@@ -206,9 +206,7 @@ def execute_action(self, name, params, sg_publish_data):
# A FlameActionError reaching here means that something major have
# stopped the current action
QtGui.QMessageBox.critical(
- None,
- "Error",
- str(error),
+ None, "Error", str(error),
)
app.log_error(error)
@@ -308,7 +306,7 @@ def _add_batch_group_from_shot(self, sg_publish_data, build_new):
sg_info = self._get_batch_info_from_sg_publish_data(sg_publish_data)
if sg_info is None:
raise FlameLoaderActionError(
- "Cannot load a Batch Group from Shotgun using this Shot"
+ "Cannot load a Batch Group from SG using this Shot"
)
self._go_to_batch_on_action()
diff --git a/hooks/tk-multi-publish2/collector.py b/hooks/tk-multi-publish2/collector.py
index a3442c4..1f15b50 100644
--- a/hooks/tk-multi-publish2/collector.py
+++ b/hooks/tk-multi-publish2/collector.py
@@ -364,14 +364,12 @@ def process_current_session(self, settings, parent_item):
# Set the context based on the most precise entity available
if shot:
self.cache_entities(parent_item, [shot])
- item.context = (
- self.publisher.sgtk.context_from_entity_dictionary(shot)
+ item.context = self.publisher.sgtk.context_from_entity_dictionary(
+ shot
)
else:
- item.context = (
- self.publisher.sgtk.context_from_entity_dictionary(
- project
- )
+ item.context = self.publisher.sgtk.context_from_entity_dictionary(
+ project
)
# This item cannot have another context than this one
diff --git a/hooks/tk-multi-publish2/create_cut_item.py b/hooks/tk-multi-publish2/create_cut_item.py
index 3f9fa3b..c79cb2d 100644
--- a/hooks/tk-multi-publish2/create_cut_item.py
+++ b/hooks/tk-multi-publish2/create_cut_item.py
@@ -48,7 +48,7 @@ def description(self):
Verbose, multi-line description of what the plugin does. This can
contain simple html for formatting.
"""
- return "Creates cut items in Shotgun for the given object"
+ return "Creates cut items in SG for the given object"
@property
def settings(self):
diff --git a/hooks/tk-multi-publish2/create_version.py b/hooks/tk-multi-publish2/create_version.py
index f51ad0b..72a7fbe 100644
--- a/hooks/tk-multi-publish2/create_version.py
+++ b/hooks/tk-multi-publish2/create_version.py
@@ -51,7 +51,7 @@ def description(self):
Verbose, multi-line description of what the plugin does. This can
contain simple html for formatting.
"""
- return "Creates version in Shotgun for the given object"
+ return "Creates version in SG for the given object"
@property
def settings(self):
diff --git a/hooks/tk-multi-publish2/publish_file.py b/hooks/tk-multi-publish2/publish_file.py
index 88b040c..ed8c12c 100644
--- a/hooks/tk-multi-publish2/publish_file.py
+++ b/hooks/tk-multi-publish2/publish_file.py
@@ -50,7 +50,7 @@ def description(self):
Verbose, multi-line description of what the plugin does. This can
contain simple html for formatting.
"""
- return "Creates publish file in Shotgun for the given object"
+ return "Creates publish file in SG for the given object"
@property
def settings(self):
diff --git a/hooks/tk-multi-publish2/update_cut_item.py b/hooks/tk-multi-publish2/update_cut_item.py
index dc3d5b9..abc1837 100644
--- a/hooks/tk-multi-publish2/update_cut_item.py
+++ b/hooks/tk-multi-publish2/update_cut_item.py
@@ -50,7 +50,7 @@ def description(self):
Verbose, multi-line description of what the plugin does. This can
contain simple html for formatting.
"""
- return "Update cut items in Shotgun for the given object"
+ return "Update cut items in SG for the given object"
@property
def settings(self):
diff --git a/hooks/tk-multi-publish2/update_shot.py b/hooks/tk-multi-publish2/update_shot.py
index fac39b9..0668dfe 100644
--- a/hooks/tk-multi-publish2/update_shot.py
+++ b/hooks/tk-multi-publish2/update_shot.py
@@ -49,7 +49,7 @@ def description(self):
Verbose, multi-line description of what the plugin does. This can
contain simple html for formatting.
"""
- return "Update shot in Shotgun for the given object"
+ return "Update shot in SG for the given object"
@property
def settings(self):
diff --git a/python/startup/backburner.py b/python/startup/backburner.py
index 6c8798e..c0fd312 100755
--- a/python/startup/backburner.py
+++ b/python/startup/backburner.py
@@ -20,7 +20,7 @@
# /usr/discreet/backburner/cmdjob
# -userRights
# -jobName:"Sequence 'aa002' - Uploading media to Shotgun"
-# -description:"Creates a new version record in Shotgun and uploads the associated Quicktime."
+# -description:"Creates a new version record in SG and uploads the associated Quicktime."
# -servers:Mannes-MacBook-Pro-2.local
# -dependencies:1587902041
# /usr/discreet/Python-2.6.9/bin/python
@@ -33,6 +33,7 @@
from __future__ import absolute_import
import os
import sys
+
try:
import sgtk.util.pickle as pickle
except:
diff --git a/python/startup/bootstrap.py b/python/startup/bootstrap.py
index 39a4be5..d6753b2 100644
--- a/python/startup/bootstrap.py
+++ b/python/startup/bootstrap.py
@@ -118,7 +118,7 @@ def bootstrap(engine_instance_name, context, app_path, app_args):
if major_ver < 2016:
raise TankError(
- "In order to run the Shotgun integration, you need at least Flame 2016!"
+ "In order to run the SG integration, you need at least Flame 2016!"
)
# first of all, check that the executable path to Flame exists
diff --git a/python/tk_flame/local_movie_generator.py b/python/tk_flame/local_movie_generator.py
index 2712e1d..ec4989f 100644
--- a/python/tk_flame/local_movie_generator.py
+++ b/python/tk_flame/local_movie_generator.py
@@ -70,8 +70,8 @@ def generate(
)
self.engine.create_local_backburner_job(
- job_name="%s - Updating Shotgun Path to movie" % display_name,
- description="Uploading Shotgun Path to movie to %s" % dst_path,
+ job_name="%s - Updating SG Path to movie" % display_name,
+ description="Uploading SG Path to movie to %s" % dst_path,
dependencies=job_id,
instance="backburner_hooks",
method_name="update_path_to_movie",
diff --git a/python/tk_flame/local_movie_generator_flame.py b/python/tk_flame/local_movie_generator_flame.py
index 09e6c98..883e14a 100644
--- a/python/tk_flame/local_movie_generator_flame.py
+++ b/python/tk_flame/local_movie_generator_flame.py
@@ -61,7 +61,7 @@ def _generate(
dst_path=dst_path,
extension=os.path.splitext(dst_path)[-1],
display_name=display_name,
- job_context="Create Shotgun Local Movie",
+ job_context="Create SG Local Movie",
preset_path=self.engine.local_movies_preset_path,
asset_info=asset_info,
dependencies=dependencies,
diff --git a/python/tk_flame/thumbnail_generator.py b/python/tk_flame/thumbnail_generator.py
index af32b7a..94b9f8c 100644
--- a/python/tk_flame/thumbnail_generator.py
+++ b/python/tk_flame/thumbnail_generator.py
@@ -69,7 +69,7 @@ def generate(
# a thumbnail
bypass_server_transcoding = self.engine.get_setting("bypass_server_transcoding")
if bypass_server_transcoding:
- self.engine.log_debug("Bypass Shotgun transcoding setting ENABLED.")
+ self.engine.log_debug("Bypass SG transcoding setting ENABLED.")
generate_previews = favor_preview and self.engine.get_setting(
"generate_previews"
diff --git a/python/tk_flame/thumbnail_generator_ffmpeg.py b/python/tk_flame/thumbnail_generator_ffmpeg.py
index 57c841e..ca9b965 100644
--- a/python/tk_flame/thumbnail_generator_ffmpeg.py
+++ b/python/tk_flame/thumbnail_generator_ffmpeg.py
@@ -48,7 +48,7 @@ def _generate_preview(
the media is created in foreground.
"""
self.engine.log_debug("Create and Upload Preview using ffmpeg")
- job_context = "Create and Upload Shotgun Preview"
+ job_context = "Create and Upload SG Preview"
job_name = self.engine.sanitize_backburner_job_name(
job_name=display_name, job_suffix=" - %s" % job_context
)
@@ -92,7 +92,7 @@ def _generate_thumbnail(
the media is created in foreground.
"""
self.engine.log_debug("Create and Upload Thumbnail using ffmpeg")
- job_context = "Create and Upload Shotgun Thumbnail"
+ job_context = "Create and Upload SG Thumbnail"
job_name = self.engine.sanitize_backburner_job_name(
job_name=display_name, job_suffix=" - %s" % job_context
)
diff --git a/python/tk_flame/thumbnail_generator_flame.py b/python/tk_flame/thumbnail_generator_flame.py
index 1aa4614..bafefde 100644
--- a/python/tk_flame/thumbnail_generator_flame.py
+++ b/python/tk_flame/thumbnail_generator_flame.py
@@ -58,7 +58,7 @@ def _generate_preview(
dst_path=None,
extension=".mov",
display_name=display_name,
- job_context="Create Shotgun Preview",
+ job_context="Create SG Preview",
preset_path=self.engine.previews_preset_path,
asset_info=asset_info,
dependencies=dependencies,
@@ -110,7 +110,7 @@ def _generate_thumbnail(
dst_path=None,
extension=".jpg",
display_name=display_name,
- job_context="Create Shotgun Thumbnail",
+ job_context="Create SG Thumbnail",
preset_path=self.engine.thumbnails_preset_path,
asset_info=asset_info,
dependencies=dependencies,
@@ -136,7 +136,7 @@ def _upload_thumbnail_job(self, thumbnail_job):
:param thumbnail_job: Thumbnail generation job information.
:return: Backburner job ID created.
"""
- job_context = "Upload Shotgun Thumbnail"
+ job_context = "Upload SG Thumbnail"
job_name = self.engine.sanitize_backburner_job_name(
job_name=thumbnail_job.get("display_name"), job_suffix=" - %s" % job_context
)
@@ -168,12 +168,12 @@ def _upload_preview_job(self, preview_job):
:return: Backburner job ID created.
"""
if self.engine.get_setting("bypass_server_transcoding"):
- self.engine.log_debug("Bypass Shotgun transcoding setting ENABLED.")
+ self.engine.log_debug("Bypass SG transcoding setting ENABLED.")
field_name = "sg_uploaded_movie_mp4"
else:
field_name = "sg_uploaded_movie"
- job_context = "Upload Shotgun Preview"
+ job_context = "Upload SG Preview"
job_name = self.engine.sanitize_backburner_job_name(
job_name=preview_job.get("display_name"), job_suffix=" - %s" % job_context
)
diff --git a/python/tk_flame/transcoder.py b/python/tk_flame/transcoder.py
index 659dbb0..4353b66 100755
--- a/python/tk_flame/transcoder.py
+++ b/python/tk_flame/transcoder.py
@@ -221,7 +221,9 @@ def _create_open_clip_file(self, src_path, asset_info):
""".format(
**metadata
- ).encode("utf-8"),
+ ).encode(
+ "utf-8"
+ ),
)
os.close(tmp_fd)
return path
diff --git a/python/tk_flame/ui/project_create_dialog.py b/python/tk_flame/ui/project_create_dialog.py
index 4f6519f..5c0c17f 100644
--- a/python/tk_flame/ui/project_create_dialog.py
+++ b/python/tk_flame/ui/project_create_dialog.py
@@ -491,13 +491,13 @@ def retranslateUi(self, ProjectCreateDialog):
self.label_9.setText("")
self.label_5.setText(QCoreApplication.translate("ProjectCreateDialog", "Project Name", None))
#if QT_CONFIG(tooltip)
- self.project_name.setToolTip(QCoreApplication.translate("ProjectCreateDialog", "The Flame project name is automatically generated based on your current Shotgun project. ", None))
+ self.project_name.setToolTip(QCoreApplication.translate("ProjectCreateDialog", "The Flame project name is automatically generated based on your current SG project. ", None))
#endif // QT_CONFIG(tooltip)
self.project_name.setText(QCoreApplication.translate("ProjectCreateDialog", "xxx", None))
self.label_7.setText(QCoreApplication.translate("ProjectCreateDialog", "Storage Volume", None))
self.label_6.setText(QCoreApplication.translate("ProjectCreateDialog", "User", None))
#if QT_CONFIG(tooltip)
- self.user_name.setToolTip(QCoreApplication.translate("ProjectCreateDialog", "The User Name associated with your new Flame Project is based on the Shotgun user that matches your current login name.\n"
+ self.user_name.setToolTip(QCoreApplication.translate("ProjectCreateDialog", "The User Name associated with your new Flame Project is based on the SG user that matches your current login name.\n"
"", None))
#endif // QT_CONFIG(tooltip)
self.user_name.setText(QCoreApplication.translate("ProjectCreateDialog", "xxx", None))
diff --git a/python/tk_flame/wiretap.py b/python/tk_flame/wiretap.py
index f914cf9..d18d3c9 100755
--- a/python/tk_flame/wiretap.py
+++ b/python/tk_flame/wiretap.py
@@ -306,7 +306,7 @@ def _ensure_project_exists(self, project_name, user_name, workspace_name):
xml += (
"%s"
- % "Created by Shotgun Flame Integration %s"
+ % "Created by SG Flame Integration %s"
% self._engine.version
)
diff --git a/resources/build_resources.sh b/resources/build_resources.sh
index 0706e14..dd15a33 100755
--- a/resources/build_resources.sh
+++ b/resources/build_resources.sh
@@ -24,7 +24,7 @@ function build_qt {
# replace PySide2 imports with tank.platform.qt and remove line containing Created by date
sed -i"" -E "s/^(from PySide2)(.*)$/try:\n from tank.platform.qt\2\nexcept ImportError:\n \1\2/g" $UI_PYTHON_PATH/$3.py
- sed -i"" -E 's/u\"/\"/g' $UI_PYTHON_PATH/$3.py
+ sed -i"" -E 's/u\"/\"/g' $UI_PYTHON_PATH/$3.py
}
function build_ui {
diff --git a/startup.py b/startup.py
index d7fc8f1..d426123 100644
--- a/startup.py
+++ b/startup.py
@@ -61,9 +61,7 @@ class FlameLauncher(SoftwareLauncher):
# globbing and regex matches by replacing the named format placeholders
# with an appropriate glob or regex string.
EXECUTABLE_TEMPLATES = {
- "darwin": [
- "/opt/Autodesk/{executable}_{version}/bin/startApplication",
- ],
+ "darwin": ["/opt/Autodesk/{executable}_{version}/bin/startApplication",],
"linux2": [
# /usr/discreet/flame_2017.1/bin/startApplication
# /usr/discreet/flameassist_2017.1.pr70/bin/startApplication
@@ -171,9 +169,7 @@ def prepare_launch(self, exec_path, args, file_to_open=None):
env["TOOLKIT_FLAME_INSTALL_ROOT"] = match.group(1)
app_folder = match.group(2)
wiretap_path = os.path.join(
- env["TOOLKIT_FLAME_INSTALL_ROOT"],
- app_folder,
- "python",
+ env["TOOLKIT_FLAME_INSTALL_ROOT"], app_folder, "python",
)
self.logger.debug(
"Adding wiretap root path to PYTHONPATH: %s", wiretap_path
@@ -200,10 +196,7 @@ def prepare_launch(self, exec_path, args, file_to_open=None):
# /python/startup/app_launcher.py dcc_path dcc_args
#
launch_script = os.path.join(
- os.path.dirname(__file__),
- "python",
- "startup",
- "app_launcher.py",
+ os.path.dirname(__file__), "python", "startup", "app_launcher.py",
)
exec_path = env["TOOLKIT_FLAME_PYTHON_BINARY"]
args = "'%s' %s %s" % (launch_script, app_path, args)
diff --git a/tests/test_startup.py b/tests/test_startup.py
index 140dfdd..bb9b2df 100755
--- a/tests/test_startup.py
+++ b/tests/test_startup.py
@@ -106,8 +106,7 @@ def _test_launch_information(
# Ensure the environment variables from the LaunchInfo are the same as the expected ones.
self.assertListEqual(
- sorted(expected_env.keys()),
- sorted(launch_info.environment.keys()),
+ sorted(expected_env.keys()), sorted(launch_info.environment.keys()),
)
# Ensure each environment variable's value is the same as they expected ones.