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

Split Maya module file into separate plugins #731

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

seando-adsk
Copy link
Collaborator

  • Split mod file into three (one for each plugin).
  • When running tests we only need PATH for Windows and not LD_LIBRARY_PATH.

* When running tests we only need PATH for Windows
  and not LD_LIBRARY_PATH.
Comment on lines +190 to +197
if (BUILD_ADSK_PLUGIN)
if (IS_WINDOWS)
configure_file("modules/mayaUSD_Win.mod.template" ${PROJECT_BINARY_DIR}/mayaUSD.mod)
else()
configure_file("modules/mayaUSD.mod.template" ${PROJECT_BINARY_DIR}/mayaUSD.mod)
endif()
install(FILES ${PROJECT_BINARY_DIR}/mayaUSD.mod DESTINATION ${CMAKE_INSTALL_PREFIX})
endif()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each plugin now has its own module file. So configure each one separately.

Comment on lines +142 to +151
if(IS_WINDOWS)
# Put path at the front of the list of env vars.
list(INSERT ALL_PATH_VARS 0
PATH
)
else()
list(APPEND ALL_PATH_VARS
LD_LIBRARY_PATH
)
endif()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env var PATH is only needed and Windows. And on Windows we don't need LD_LIBRARY_PATH.

Comment on lines +1 to +5
+ AL_USDMaya ${AL_USDMAYA_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/al
plug-ins: plugin
PYTHONPATH+:=lib/python
PXR_PLUGINPATH_NAME+:=lib/usd
PXR_PLUGINPATH_NAME+:=plugin
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved here as-is from the mayaUsd.mod.template.

scripts: maya/lib/usd/usdMaya/resources
PYTHONPATH+:=lib/python
PXR_PLUGINPATH_NAME+:=lib/usd
USD_LOCATION:=
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper env variable which will be set to the location where USD is (when running Maya). Inside Maya can then query and use that var.

Comment on lines 27 to +32
+ MTOH ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/lib
icons:
plug-ins: maya
presets:
scripts:
resources:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mtoh doesn't need all these extra vars. This is the syntax to remove them.

Comment on lines +8 to +15
if(BUILD_PXR_PLUGIN)
# This test uses the file "PxrUsdPreviewSurfaceExportTest.ma" which
# requires the plugin "pxrUsdPreviewSurface" that is built by the
# Pixar plugin.
list(APPEND TEST_SCRIPT_FILES
testPxrUsdPreviewSurfaceExport.py
)
endif()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discovered this while building only the MayaUsd plugin (I turned off Pixar and AL). When running the tests this one failed because it need the pxrUsdPreviewSurface plugin built only when building Pixar plugin.

Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks Sean.

@seando-adsk seando-adsk added adsk Related to Autodesk plugin al Related to AnimalLogic plugin pxr Related to Pixar plugin ready-for-merge Development process is finished, PR is ready for merge labels Aug 24, 2020
@kxl-adsk kxl-adsk merged commit a53a6df into dev Aug 24, 2020
@kxl-adsk kxl-adsk deleted the donnels/split_module_file branch August 24, 2020 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin al Related to AnimalLogic plugin pxr Related to Pixar plugin ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants