From ac95e75aca794e9a64667260f74fb10e0da41b50 Mon Sep 17 00:00:00 2001 From: Sean Donnelly <23455376+seando-adsk@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:11:07 -0500 Subject: [PATCH] Maya is no longer using a Preview Release number Remove code (currently not used) that detected this. --- cmake/modules/FindMaya.cmake | 10 ---------- test/testUtils/mayaUtils.py | 32 -------------------------------- 2 files changed, 42 deletions(-) diff --git a/cmake/modules/FindMaya.cmake b/cmake/modules/FindMaya.cmake index ba0a00c91b..b25458caf7 100644 --- a/cmake/modules/FindMaya.cmake +++ b/cmake/modules/FindMaya.cmake @@ -12,7 +12,6 @@ # MAYA_API_VERSION Maya version (6-8 digits) # MAYA_APP_VERSION Maya app version (4 digits) # MAYA_LIGHTAPI_VERSION Maya light API version (1 or 2 or 3) -# MAYA_PREVIEW_RELEASE_VERSION Preview Release number (3 or more digits) in preview releases, 0 in official releases # # Cache variables: # MAYA_HAS_DEFAULT_MATERIAL_API Presence of a default material API on MRenderItem. @@ -259,15 +258,6 @@ if(MAYA_INCLUDE_DIRS AND EXISTS "${MAYA_INCLUDE_DIR}/maya/MTypes.h") endif() endif() -if(MAYA_INCLUDE_DIRS AND EXISTS "${MAYA_INCLUDE_DIR}/maya/MDefines.h") - file(STRINGS ${MAYA_INCLUDE_DIR}/maya/MDefines.h MAYA_PREVIEW_RELEASE_VERSION REGEX "#define MAYA_PREVIEW_RELEASE_VERSION.*$") - if(MAYA_PREVIEW_RELEASE_VERSION) - string(REGEX MATCHALL "[0-9]+" MAYA_PREVIEW_RELEASE_VERSION ${MAYA_PREVIEW_RELEASE_VERSION}) - else() - set(MAYA_PREVIEW_RELEASE_VERSION 0) - endif() -endif() - # Find mayapy set(MAYAPY_EXE mayapy) set(MAYA_PY_VERSION 3) diff --git a/test/testUtils/mayaUtils.py b/test/testUtils/mayaUtils.py index 49132e2136..263c00457b 100644 --- a/test/testUtils/mayaUtils.py +++ b/test/testUtils/mayaUtils.py @@ -35,13 +35,10 @@ import ufeUtils, testUtils import os -import re import sys mayaSeparator = "|" -prRe = re.compile('Preview Release ([0-9]+)') - def loadPlugin(pluginName): """ Load all given plugins created or needed by maya-ufe-plugin @@ -260,35 +257,6 @@ def createSingleSphereMayaScene(directory=None): cmds.file(save=True, force=True, type='mayaAscii') return tempMayaFile -def previewReleaseVersion(): - '''Return the Maya Preview Release version. - - If the version of Maya is 2019, returns 98. - - If the version of Maya is 2020, returns 110. - - If the version of Maya is 2022, returns 122. - - If the version of Maya is current and is not a Preview Release, returns - sys.maxsize (a very large number). If the environment variable - MAYA_PREVIEW_RELEASE_VERSION_OVERRIDE is defined, return its value instead. - ''' - - if 'MAYA_PREVIEW_RELEASE_VERSION_OVERRIDE' in os.environ: - return int(os.environ['MAYA_PREVIEW_RELEASE_VERSION_OVERRIDE']) - - majorVersion = int(cmds.about(majorVersion=True)) - if majorVersion == 2019: - return 98 - elif majorVersion == 2020: - return 110 - elif majorVersion == 2022: - return 122 - - match = prRe.match(cmds.about(v=True)) - - return int(match.group(1)) if match else sys.maxsize - def mayaMajorVersion(): return int(cmds.about(majorVersion=True))