Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
763 stars 202 forks source link

plugin doesn't load if mod file is missing trailing whitespace #2841

Open jhultgre opened 1 year ago

jhultgre commented 1 year ago

While trying to package up 0.21.0 from the provided installer for maya 2023.2 I couldn't get the plugin to load with my mod file even though it showed up in the plugin manager with the correct paths. I kept getting Unable to dynamically load: .../plug-ins/MayaUSD/0.21.0/mayausd/MayaUSD/plugin/adsk/plugin/mayaUsdPlugin.mll even though the file existed there.

When I diffed my mod file to the one the installer created the only difference besides paths was trailing whitespace on the empty values.

When I added the trailing whitespace the plugin loaded.

My text editor is probably setup to strip trailing whitespace

Steps to reproduce Steps to reproduce the behavior:

  1. install usd
  2. edit `C:\Program Files\Common Files\Autodesk Shared\Modules\Maya\2023\mayausd.mod to remove trailing whitespace
  3. open maya 2023
  4. try to load usd plugin

Expected behavior plugin should still work if white space is missing

Attachments If applicable, add screenshots, sample files, etc to help explain your problem.

Specs (if applicable):

Additional context There should at least be a comment in the provided mod file saying the spaces are required. image

santosg87 commented 1 year ago

hi @jhultgre thanks for logging this, I don't think we caught on that ourselves.

I will investigate and see if there is anything missing. my initial reaction is that this might be something specific to the text editor you are using and the encoding? I will try to reproduce and recommend the update to docs!

seando-adsk commented 1 year ago

@jhultgre Joe the override separator ": " with trailing space is required on these lines to account for parsing of windows absolute paths. Consider parsing: scripts: C:/some_folder

I'm not sure if going back to Maya 2020 supports comments in the module file. @santosg87 This would be something we would have to testing internally. If all supported versions of Maya support comments in module files, then we could add one about the required trailing space.

Sean

maya-usd-git-sync[bot] commented 11 months ago

Issue synced internally to EMSUSD-747