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

Path Expression parser fails for Expression References with relative paths (unless starting with the parent path element '..') #3502

Open
danlea opened this issue Jan 29, 2025 · 1 comment

Comments

@danlea
Copy link

danlea commented Jan 29, 2025

Constructing an Sdf.PathExpression with the following Expression Reference strings fails with parser errors:
"%child:collection"
"%./child:collection"

Starting the path with the parent path element '..' works around this bug, but requires the base Prim name:
"%../base/child:collection"

The use of "./" in a PathPattern (i.e. outside of an Expression Reference) also causes a parser error:
"./child"

Note that the expected result of Sdf.PathExpression("%child:collection") can be constructed as follows:

expressionRef = Sdf.PathExpression.ExpressionReference()
expressionRef.path = "child"
expressionRef.name = "collection"
pathExpression = Sdf.PathExpression.MakeAtom(expressionRef)
print(pathExpression.GetText())

%child:collection

While these expressions will be made absolute when used in an Path Expression Attribute, path expressions provided as strings (through API or in usda) should accept all of these examples.

Reproduced with OpenUSD 24.05 and 24.08.

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10614

(This is an automated message. See here for more information.)

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