dreamworksanimation / usdmanager

USD Manager
http://www.usdmanager.org
Apache License 2.0
321 stars 60 forks source link

variable PXR_AR_DEFAULT_SEARCH_PATH not taken into account. #1

Open flord opened 5 years ago

flord commented 5 years ago

When loading a USD file that has paths relative to the PXR_AR_DEFAULT_SEARCH_PATH variable, the USDManager cannot find the files.

I have set my variable to point to a central location where we have USD files, and then loaded a USD file elsewhere that contains references to USD files in the central location by relative path. The paths appear in red in UsdManager and when I hover the mouse over it, the tooltip says "File not found".

The PXR_AR_DEFAULT_SEARCH_PATH is useful to set a location like the project folder and all files within that project don't need to refer to the project location explicitly. USD files befome more portable this way.

mds-dwa commented 5 years ago

Thanks for reporting the issue! This should work. When you launch usdmanager, do you see an error like the following printed to the shell?

WARNING:usdmanager.utils:Unable to create AssetResolver - Asset links may not work correctly

If so, something likely isn't configured properly with your installation. Your python environment will need to be able to "import pxr.Ar" which isn't part of the default setup provided here since many studio environments handle it differently. If that is indeed the issue, we'll work to clarify the setup/installation instructions.

flord commented 5 years ago

No, that error does not appear. In fact there is nothing in the shell. I tested with the command to open the file in usdview from the USDManager, and the file opens with all references working there.

rrrzzz commented 2 years ago

Thanks for reporting the issue! This should work. When you launch usdmanager, do you see an error like the following printed to the shell?

WARNING:usdmanager.utils:Unable to create AssetResolver - Asset links may not work correctly

If so, something likely isn't configured properly with your installation. Your python environment will need to be able to "import pxr.Ar" which isn't part of the default setup provided here since many studio environments handle it differently. If that is indeed the issue, we'll work to clarify the setup/installation instructions.

I have this error appearing after executing all the installation steps when I run usdmanager. You said you would add this info to the instruction but I don't see it anywhere

mds-dwa commented 2 years ago

I'll admit this problem has remained open since we never verified what was missing from the installation for @flord in the first place. Double-check the python path for this tool can import pxr.Ar, and if you can confirm that was missing and adding the USD installation python location to your path fixes it, then we will update the instructions.

rrrzzz commented 2 years ago

there is also no mention of what USD version I should use.. In fact to unknowledgeable person it looks like there is no need for one at all

mds-dwa commented 2 years ago

That's actually correct. Practically every USD version is supported here (though there's an outstanding PR we're just waiting on legal approval for to support Ar 2.0. Though you should use the version that your data is authored in for maximum compatibility.

And like you said, there is no need for a resolver for basic application usability. Despite the USD name, the application works as a general text browser/editor and can still identify file paths in other file types without the need for USD asset resolution. And if your USD data happens to use file paths without variables, it should still work just from normal python-based file system "does this path exist" checks. I hope that makes sense!