Maya USD 2023 - Running usdview from a shell command on Windows 10

Maya USD 2023 - Running usdview from a shell command on Windows 10

pixelwash
Enthusiast Enthusiast
1,331 Views
1 Reply
Message 1 of 2

Maya USD 2023 - Running usdview from a shell command on Windows 10

pixelwash
Enthusiast
Enthusiast

I'm trying to get the Activision windows explorer shell usd preview software to run, so I can preview usd files in Windows Explorer.

 

There are installers of the software for Python 2.7, 3.6 and 3.7 are available on GitHUB to download. I installed the one for 3.7.

 

It didn't appear to work, and to debug it, the first thing I need to do is to make sure that usdview is working properly. And to do that I followed the instructions on the Autodesk website for running usdview from a windows shell: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2022/ENU/Maya-USD...

 

When I do that, I get an error:

 

import pxr.Usdviewq as Usdviewq
ModuleNotFoundError: No module named 'pxr'

 

And I'm not wedded to using the Activision software to get preview of USD files working in Windows Explorer if there is a better way of doing it!

0 Likes
1,332 Views
1 Reply
Reply (1)
Message 2 of 2

tkaap2
Autodesk
Autodesk

We've found that sometimes we need to add the path to USD\lib\python to the PYTHONPATH for standalone standalone usdview to launch correctly (line 4 below):  

Also, note that since Maya 2023 has only python 3, the path only has "USD", not "USD2" or "USD3" like Maya 2022 had.

C:\Program Files\Autodesk\MayaUSD\Maya2023\<pluginVersion>\mayausd\USD
set PATH=C:\Program Files\Autodesk\Maya2023\bin;C:\Program Files\Autodesk\MayaUSD\Maya2023\<pluginVersion>\mayausd\USD\bin;C:\Program Files\Autodesk\MayaUSD\Maya2023\<pluginVersion>\mayausd\USD\lib;%PATH%

set PYTHONPATH=C:\Program Files\Autodesk\MayaUSD\Maya2023\<pluginVersion>\mayausd\USD\lib\python

mayapy -m pip install PyOpenGL==3.1.0
mayapy "C:\Program Files\Autodesk\MayaUSD\Maya2023\<pluginVersion>\mayausd\USD\bin\usdview" "Path\To\File.usda"

 

0 Likes