From c6d0a4f75185333130b4c1a79bddf215c48860a2 Mon Sep 17 00:00:00 2001 From: RT-Anthony Date: Tue, 15 Dec 2020 09:45:35 -0700 Subject: [PATCH] updates for engine to work with 4.26 --- hooks/tk-multi-publish2/basic/publish_movie.py | 2 +- python/tk_unreal/__init__.py | 2 +- python/tk_unreal/unreal_sg_engine.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/tk-multi-publish2/basic/publish_movie.py b/hooks/tk-multi-publish2/basic/publish_movie.py index f4ad76c..365a1ae 100644 --- a/hooks/tk-multi-publish2/basic/publish_movie.py +++ b/hooks/tk-multi-publish2/basic/publish_movie.py @@ -429,7 +429,7 @@ def _unreal_render_sequence_to_movie(self, destination_path, unreal_map_path, se # Must delete it first, otherwise the Sequencer will add a number in the filename try: os.remove(output_filepath) - except OSError, e: + except OSError as e: self.logger.debug("Couldn't delete {}. The Sequencer won't be able to output the movie to that file.".format(output_filepath)) return False, None diff --git a/python/tk_unreal/__init__.py b/python/tk_unreal/__init__.py index 4429918..fb09f93 100644 --- a/python/tk_unreal/__init__.py +++ b/python/tk_unreal/__init__.py @@ -2,4 +2,4 @@ # This file has been modified by Epic Games, Inc. and is subject to the license # file included in this repository. -import unreal_sg_engine \ No newline at end of file +from . import unreal_sg_engine \ No newline at end of file diff --git a/python/tk_unreal/unreal_sg_engine.py b/python/tk_unreal/unreal_sg_engine.py index d38e17a..4a965f5 100644 --- a/python/tk_unreal/unreal_sg_engine.py +++ b/python/tk_unreal/unreal_sg_engine.py @@ -4,7 +4,7 @@ import unreal import sgtk.platform -import config +from . import config import sys import os @@ -156,7 +156,7 @@ def _execute_within_exception_trap(self): try: unreal.log("_execute_within_exception_trap: trying callback {0}".format(self._callback.__str__())) self._callback() - except Exception, e: + except Exception as e: current_engine = sgtk.platform.current_engine() current_engine.logger.exception("An exception was raised from Toolkit") self._callback = None