diff --git a/build.py b/build.py index 0ebc464ec0..feb8fd63a8 100755 --- a/build.py +++ b/build.py @@ -496,11 +496,15 @@ def BuildAndInstall(context, buildArgs, stages): stagesArgs = [] if context.mayaLocation: extraArgs.append('-DMAYA_LOCATION="{mayaLocation}"' - .format(mayaLocation=context.mayaLocation)) + .format(mayaLocation=context.mayaLocation)) if context.mayaUsdLocation: extraArgs.append('-DMAYAUSD_LOCATION="{mayaUsdLocation}"' - .format(mayaUsdLocation=context.mayaUsdLocation.replace("\\","/"))) + .format(mayaUsdLocation=context.mayaUsdLocation)) + + if context.mtoaLocation: + extraArgs.append('-DMTOAUSD_LOCATION="{mtoaLocation}"' + .format(mtoaLocation=context.mtoaLocation)) if context.pxrUsdLocation: extraArgs.append('-DPXR_USD_LOCATION="{pxrUsdLocation}"' @@ -571,6 +575,9 @@ def Package(context): parser.add_argument("--mayausd-location", type=str, help="Directory where MayaUsd is installed.") + +parser.add_argument("--mtoa-location", type=str, + help="Directory where MtoA is installed.") parser.add_argument("--pxrusd-location", type=str, help="Directory where Pixar USD is installed.") @@ -664,6 +671,10 @@ def __init__(self, args): # MayaUsd Location self.mayaUsdLocation = (os.path.abspath(args.mayausd_location).replace("\\","/") if args.mayausd_location else None) + + # MtoA Location + self.mtoaLocation = (os.path.abspath(args.mtoa_location).replace("\\","/") + if args.mtoa_location else None) # PXR USD Location self.pxrUsdLocation = (os.path.abspath(args.pxrusd_location) diff --git a/cmake/test.cmake b/cmake/test.cmake index 9a6e633683..718c8ab226 100644 --- a/cmake/test.cmake +++ b/cmake/test.cmake @@ -281,6 +281,22 @@ finally: list(APPEND MAYAUSD_VARNAME_PXR_MTLX_STDLIB_SEARCH_PATHS "${MAYAUSD_LOCATION}/libraries") endif() + + # mtoa + if(DEFINED MTOA_LOCATION) + list(APPEND MAYAUSD_VARNAME_PATH + "${MTOA_LOCATION}/bin") + list(APPEND MAYAUSD_VARNAME_MAYA_SCRIPT_PATH + "${MTOA_LOCATION}/scripts/mtoa/mel") + list(APPEND MAYAUSD_VARNAME_MAYA_PXR_PLUGINPATH_NAME + "${MTOA_LOCATION}/usd") + list(APPEND MAYAUSD_VARNAME_MAYA_RENDER_DESC_PATH + "${MTOA_LOCATION}/") + list(APPEND MAYAUSD_MATERIALX_SEARCH_PATH + "${MTOA_LOCATION}/materialx/arnold") + list(APPEND MAYAUSD_MATERIALX_SEARCH_PATH + "${MTOA_LOCATION}/materialx/targets") + endif() if(IS_WINDOWS AND DEFINED ENV{PYTHONHOME})