How "Add USD Reference" using Relative Paths instead of Absolute?

How "Add USD Reference" using Relative Paths instead of Absolute?

sebastianZ4FWN
Contributor Contributor
2,217 Views
4 Replies
Message 1 of 5

How "Add USD Reference" using Relative Paths instead of Absolute?

sebastianZ4FWN
Contributor
Contributor

Hi,

 

I'm working on USD and Maya workflows.

I am not able to create USD References with relative paths.

For example:

- In the 'USD Layer Editor' -> Create -> Stage With New Layer. I save it.

- Right click on the Stage and 'Add New Prim' -> Xform

- Right click the new Xform and 'Add USD Reference...'

- Select a USD model from a certain directory

 

OK Now I can export the .USD file correctly. But it has absolute paths for the reference. If I send to somewhere else it doesn't work anymore.

I am looking for a way to have relative paths.

I don't find anywhere to modify this, even manually, changing the absolute path for something like "./" to indicate 'this folder'.

 

How can it be done with Maya?

 

Thanks.

 

Seba

0 Likes
2,218 Views
4 Replies
Replies (4)
Message 2 of 5

Christoph_Schaedl
Mentor
Mentor

Maya_USD 0.22 does support relative path.
And Bifrost_USD since day one.

 

Or set the path as environment variable.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 3 of 5

sebastianZ4FWN
Contributor
Contributor

Thanks.

*Yes I know in Bifrost it is possible. But how without Bifrots?

 

I have now installed latest MayaUSD plugin v0.22.

I see in the release notes says that it nows supports adding USD references with Relative paths.

 

However I don't see where I can set that in the USD reference at the Attribute Editor.

It doesn't seem to work as source images for textures, for example, where when we Set Project... to specify the project root path, then all the files are relative to that path.

See the screenshot.

 

How can I achieve that? Make a USD reference path relative to the current Maya project path?

 

Thanks,

Screen Shot 2023-03-14 at 14.03.47.jpg

 

0 Likes
Message 4 of 5

sebastianZ4FWN
Contributor
Contributor

Anyone can help?

Should I post a request in the USDMaya plugin Github instead?

Thanks,

0 Likes
Message 5 of 5

santd
Autodesk
Autodesk

Hi @sebastianZ4FWN, The GitHub definitely gets more attention so with future questions it may be best to post them there.
In regards to your question here though. The update that we made to Maya USD in 0.22.0 for relative paths is only to be able to create a stage from a file using a relative path so that when you save the file the usd stage itself will load using a relative path. Paths in the USD file itself such as textures and references are not yet saved as relative. This is something that is in the works though.
-David Santos




David Santos

0 Likes