Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roopavr/hydra 836/add mto a download support in maya hydra #71

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"'
Expand Down Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions cmake/test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
Loading