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

HYDRA-1070 - add missing space in resource path for Mac/Linux #137

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

lilike-adsk
Copy link
Collaborator

Add missing space in "resource" path for mayaHydra.mod on Mac/Linux, otherwise, the path of PXR_PLUGINPATH_NAME section won't be recognized correctly by Maya.

This bug leads a problematic case below when deploying mayaHydra cut seperately from mayaUSD,

1.When Maya is loading mayaHydra plugin, the mayaHydraLib from mayaHydra cut folder is loaded and some variables are initializaed and registered to usd (e.g., MAYAHYDRALIB_SCENE_INDEX) as it's a dependency of mayaHydra plugin.

2.When Maya is parsing the mayaHydra.mod and mayaUSD.mod, due to the bug, the path of mayaHydra registered usd plugins (MayaHydra_cut_folder/MayaHydra/lib/usd) inside mayaHydraLib couldn't be added to PXR_PLUGINPATH_NAME correctly, but the plugins path (MayaUSD_folder/MayaUSD/lib/usd) from mayaUSD.mod is added to PXR_PLUGINPATH_NAME correctly, which leads unexpected mayaHydraLib from mayaUSD folder is loaded again during the first calling of MayaHydraAdapterRegistry::LoadAllPlugin() after switch to Hydra Viewport, and introduced double initialization issue for some variables. Note this seems to be a legacy issue, but exposed recently by new USD version.

This also solved a legacy mysterious bug that can cause some error output msg like: // Error: Could not find plugin for 'MayaHydraLightAdapter', when mayaUSD cut (deployed without mayaHydra stuff) and mayaHydra cut seperately.

@lilike-adsk lilike-adsk requested a review from ppt-adsk June 13, 2024 13:24
@lilike-adsk
Copy link
Collaborator Author

@lilike-adsk lilike-adsk self-assigned this Jun 13, 2024
Copy link
Collaborator

@ppt-adsk ppt-adsk left a comment

Choose a reason for hiding this comment

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

Fantastic catch. .mod files are fragile.

@lilike-adsk lilike-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jun 13, 2024
@lilike-adsk lilike-adsk merged commit dc8af2e into dev Jun 13, 2024
10 checks passed
@lilike-adsk lilike-adsk deleted the lilike/HYDRA-1070/fix_resource_path_config branch June 13, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants