Skip to content

Commit dac816d

Browse files
committed
options: Add Maya major version subfolder to USD_LIB_PATH
1 parent 6a0316d commit dac816d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config/ie/options

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,15 @@ if targetApp=="maya" :
336336
if usdReg :
337337
USD_INCLUDE_PATH = os.path.join( usdReg["location"], targetApp, compatibilityVersion, "include" )
338338

339+
mayaMajorVersion = mayaVersion.split(".")[0]
339340
mayaLooseVersion = distutils.version.LooseVersion(mayaVersion)
340341
if mayaLooseVersion >= "2022" and mayaLooseVersion < "2023":
341342
# Maya 2022 installs the USD libs and the maya plugin itself for python 2 and 3. This is not the case for the 2020 version
342343
# We make the assumption, that the python version suffix is for Maya 2022 only, because Maya 2023 will be python 3 exclusively.
343344
mayaPythonMajorVersion = mayaReg["pythonVersion"].split(".")[0]
344-
USD_LIB_PATH = os.path.join( mayaUsdReg["location"], "mayausd/USD{}/lib".format( mayaPythonMajorVersion ) )
345+
USD_LIB_PATH = os.path.join( mayaUsdReg["location"], mayaMajorVersion, "mayausd/USD{}/lib".format( mayaPythonMajorVersion ) )
345346
else:
346-
USD_LIB_PATH = os.path.join( mayaUsdReg["location"], "mayausd/USD/lib" )
347+
USD_LIB_PATH = os.path.join( mayaUsdReg["location"], mayaMajorVersion, "mayausd/USD/lib" )
347348

348349
# Pixar introduced a library prefix `usd_` in USD v21.11, which Autodesk does not use yet, so we have to reset the prefix.
349350
# See https://github.com/Autodesk/maya-usd/issues/2108 for reference

0 commit comments

Comments
 (0)