-
Notifications
You must be signed in to change notification settings - Fork 201
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
Improved MAYA_PXR_PLUGINPATH_NAME to handle more checks #949
Improved MAYA_PXR_PLUGINPATH_NAME to handle more checks #949
Conversation
…n_check_control_for_plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks good to me.
test/lib/usd/plugin/CMakeLists.txt
Outdated
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${plugName}.py" | ||
RENAME __init__.py | ||
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/TestMayaUsdPlug/${plugName}") | ||
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${plugName}_plugInfo.json" | ||
"${CMAKE_CURRENT_BINARY_DIR}/TestMayaUsdPlug/${plugName}/plugInfo.json" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor - these lines should be indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Fixed now with 892515b
@@ -0,0 +1,30 @@ | |||
# | |||
# Copyright 2016 Pixar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason these test files have this copyright?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I took this test plugin from the Pixar repository.
Plug registry plugins (either pure USD, like render delegates or MayaUsd ones like translators) should never be used with a mismatched version of shared libraries.
When all components are compiled together, there is no chance for version mismatch and PXR_PLUGINPATH_NAME is the proper way to discover and register such plugins.
Plugins distributed separately from MayaUSD should use the
MAYA_PXR_PLUGINPATH_NAME
env variable to point to a folder with themayaUsdPlugInfo.json
file. The JSON file is used to discover plugin paths to register after running requested version checks at runtime. Here is an example file:The plugin must decide which validation checks are needed by listing them in the
VersionCheck
object. Supported checks are:Every plugin passing version check will get registered in plug registry via
PlugRegistry::GetInstance().RegisterPlugins
method.