Skip to content

Commit 387e0bf

Browse files
authored
SG-38062 Add support for Maya 2026 (#121)
* Fixup wrong regexp for detecting app versions * Set minimum compatible version from 2014 to 2022 First version of Maya shipping Python 3 * Add support for Maya 2026 * Better badges * fixup! Better badges * fixup! fixup! Better badges
1 parent fcc3703 commit 387e0bf

File tree

4 files changed

+31
-20
lines changed

4 files changed

+31
-20
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
[![VFX Platform](https://img.shields.io/badge/vfxplatform-2025%20%7C%202024%20%7C%202023%20%7C%202022-blue.svg)](http://www.vfxplatform.com/)
2-
[![Python](https://img.shields.io/badge/python-3.11%20%7C%203.10%20%7C%203.9-blue.svg)](https://www.python.org/)
1+
# Toolkit Engine for Maya
2+
3+
![Supported Maya versions: 2023 - 2026](https://img.shields.io/badge/Maya-2026_|_2025_|_2024_|_2023-blue?logo=autodeskmaya&logoColor=f5f5f5 "Support Maya versions")
4+
[![Supported VFX Platform: 2022 - 2025](https://img.shields.io/badge/VFX_Platform-2025_|_2024_|_2023_|_2022-blue)](http://www.vfxplatform.com/ "Supported VFX Platform")
5+
[![Supported Python versions: 3.9 - 3.11](https://img.shields.io/badge/Python-3.11_|_3.10_|_3.9-blue?logo=python&logoColor=f5f5f5)](https://www.python.org/ "Supported Python versions")
6+
37
[![Build Status](https://dev.azure.com/shotgun-ecosystem/Toolkit/_apis/build/status/Engines/tk-maya?branchName=master)](https://dev.azure.com/shotgun-ecosystem/Toolkit/_build/latest?definitionId=28&branchName=master)
48
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
59
[![Linting](https://img.shields.io/badge/PEP8%20by-Hound%20CI-a873d1.svg)](https://houndci.com)

engine.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -387,39 +387,46 @@ def init_engine(self):
387387
maya_ver = maya_ver[5:]
388388
if maya_ver.startswith(
389389
(
390-
"2014",
391-
"2015",
392-
"2016",
393-
"2017",
394-
"2018",
395-
"2019",
396-
"2020",
397390
"2022",
398391
"2023",
399392
"2024",
400393
"2025",
394+
"2026",
401395
)
402396
):
403397
self.logger.debug("Running Maya version %s", maya_ver)
404398

405-
# In the case of Maya 2018 on Windows, we have the possility of locking
399+
# In the case of Maya on Windows, we have the possility of locking
406400
# up if we allow the PySide shim to import QtWebEngineWidgets. We can
407401
# stop that happening here by setting the environment variable.
408402
version_num = int(maya_ver[0:4])
409403

410-
if version_num >= 2018 and current_os.startswith("win"):
404+
if current_os.startswith("win"):
411405
self.logger.debug(
412-
"Maya 2018+ on Windows can deadlock if QtWebEngineWidgets "
406+
"Maya on Windows can deadlock if QtWebEngineWidgets "
413407
"is imported. Setting SHOTGUN_SKIP_QTWEBENGINEWIDGETS_IMPORT=1..."
414408
)
415409
os.environ["SHOTGUN_SKIP_QTWEBENGINEWIDGETS_IMPORT"] = "1"
416-
elif maya_ver.startswith(("2012", "2013")):
410+
elif maya_ver.startswith(
411+
(
412+
"2012",
413+
"2013",
414+
"2014",
415+
"2015",
416+
"2016",
417+
"2017",
418+
"2018",
419+
"2019",
420+
"2020",
421+
)
422+
):
417423
# We won't be able to rely on the warning dialog below, because Maya
418-
# older than 2014 doesn't ship with PySide. Instead, we just have to
419-
# raise an exception so that we bail out here with an error message
420-
# that will hopefully make sense for the user.
424+
# older than 2022 ships Python 2. And older versions come with Qt4.
425+
# Instead, we just have to raise an exception so that we bail out
426+
# here with an error message that will hopefully make sense for the
427+
# user.
421428
msg = (
422-
"PTR integration is not compatible with Maya versions older than 2014."
429+
"PTR integration is not compatible with Maya versions older than 2022."
423430
)
424431
raise sgtk.TankError(msg)
425432
else:

info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ configuration:
2525
it isn't yet fully supported and tested with Toolkit. To disable the warning
2626
dialog for the version you are testing, it is recomended that you set this
2727
value to the current major version + 1."
28-
default_value: 2015
28+
default_value: 2026
2929

3030
debug_logging:
3131
type: bool

startup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MayaLauncher(SoftwareLauncher):
2626
# matching against supplied versions and products. Similar to the glob
2727
# strings, these allow us to alter the regex matching for any of the
2828
# variable components of the path in one place
29-
COMPONENT_REGEX_LOOKUP = {"version": r"[\d.]+", "mach": r"x\d+"}
29+
COMPONENT_REGEX_LOOKUP = {"version": r"[\d\.]+", "mach": r"x\d+"}
3030

3131
# This dictionary defines a list of executable template strings for each
3232
# of the supported operating systems. The templates are used for both
@@ -55,7 +55,7 @@ def minimum_supported_version(self):
5555
"""
5656
The minimum software version that is supported by the launcher.
5757
"""
58-
return "2014"
58+
return "2022"
5959

6060
def prepare_launch(self, exec_path, args, file_to_open=None):
6161
"""

0 commit comments

Comments
 (0)