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

Unable to show merged USDA files on Windows and Ubuntu #27

Open
AstraBert opened this issue Sep 30, 2024 · 1 comment
Open

Unable to show merged USDA files on Windows and Ubuntu #27

AstraBert opened this issue Sep 30, 2024 · 1 comment

Comments

@AstraBert
Copy link

AstraBert commented Sep 30, 2024

Issue description

I'm trying to display a USDA file which represents the merging of two other .usd* files, according to this logic:

#usda 1.0
(
    defaultPrim = "World"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "World"
{
    def Xform "Object1" (
        references = @/path/to/obj1@
    )
    {
        float3 xformOp:translate = (0, 0, 0)
        uniform token[] xformOpOrder = ["xformOp:translate"]
    }

    def Xform "Object2" (
        references = @/path/to/obj2@
    )
    {
        float3 xformOp:translate = (10, 0, 0)
        float3 xformOp:scale = (2, 2, 2)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"]
    }
}

When I try to load them inside the viewer, the console logs this:

Warning: in _ReportErrors at line 3172 of /Users/andrewbeers/git/needle/OpenUSD/pxr/usd/usd/stage.cpp -- In </World/Object2>: Could not open asset @/path/to/obj1@ for reference introduced by @/merged.usda@</World/Object2>. (instantiating stage on stage @/merged.usda@ <0x297445d0>)

emHdBindings.js:1523 Warning: in _ReportErrors at line 3172 of /Users/andrewbeers/git/needle/OpenUSD/pxr/usd/usd/stage.cpp -- In </World/Object1>: Could not open asset  @/path/to/obj2@ for reference introduced by @/merged.usda@</World/Object1>. (instantiating stage on stage @/merged.usda@ <0x297445d0>)

I would expect that the viewer would be able to load each of the two files, given that I provided both of their absolute paths. I also tried relative paths and I tried to put the usd files both under the same directory, but nothing seemed to work. This issue persists with both Linux and Windows.

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run start to start the viewer
  2. Open the viewer on http://127.0.0.1:3003
  3. Load the a USDA file that merges two files following the syntaxis reported above
  4. CTRL+SHIFT+C opens the console, in which you'll see the error as reported above.

Expected behavior
The viewer should load the file without problems.

Device (please complete the following information):

  • OS: Ubuntu 22.04.3 and Windows 10.0.22631
  • npm version: 10.8.2 (both Ubuntu and Windows)
  • Node version: 18.20.4 (Ubuntu) and 20.17.0 (Windows)
@hybridherbst
Copy link
Contributor

Hey there, thanks for opening an issue!
To load multiple files, you need to drop all of them or the folder they are in. Browsers can't access your file system directly – so they can't "find" the files if you don't drop them all in one go.

We could definitely improve that in the UI at some point (for example telling you that a reference can't be found instead of just logging to the console)!

Let me know if that solves the issue for you, otherwise would be great if you attach an example that reproduces the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants