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

Usda ascii parser is too restrictive for asset paths #73

Closed
spiffmon opened this issue Sep 30, 2016 · 3 comments
Closed

Usda ascii parser is too restrictive for asset paths #73

spiffmon opened this issue Sep 30, 2016 · 3 comments

Comments

@spiffmon
Copy link
Member

Paste the following to a text file named asset.usda (which was generated without error using the python API), and attempt to usdcat or usdedit it. You will get something like:

Failed to open 'asset.usda' -
Error in 'textFileFormatYyerror' at line 3074 in file pxr/pxr/usd/sdf/textFileFormat.yy : 'syntax error at 'fr' in </root.assAttr> on line 11 in file /scratch/asset.usda
'
Error: Failed to open file asset.usda, exiting.

The ascii parser is very restrictive in what it allows in asset paths... partly due to some internal tricks we play for fast dependency analysis, partly because we were over-fitting for filesystem-based paths. People want to use UIR's that require many non-alnum characters, and we need to provide for being able to parse them out of ascii robustly.

@spiffmon
Copy link
Member Author

#usda 1.0
(
doc = """Generated from Composed Stage of root layer
"""
)

def "root"
{
custom asset assAttr = @foo@.bar@
asset assAttr.timeSamples = {
10: @fd@42@fr@,
20: @fd@42?fr@,
}
}

@jtran56
Copy link

jtran56 commented Oct 1, 2016

Filed as internal issue #138165.

@murphyeoin
Copy link
Contributor

Great - this has been a problem for us to which we patched, and were going to put a PR in for once we'd gotten our fork of the public github repo working properly. Our uri syntax is along the lines of:
ams:/JOB(name)/ASSETTYPE(foo)/ASSET(bar)?version=vXXX&file=blah.txt
Thanks!
Eoin

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

3 participants