mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Fix parsing array of payload
This commit is contained in:
@@ -2110,7 +2110,11 @@ bool AsciiParser::ParseBasicTypeArray(std::vector<Payload> *result) {
|
||||
Rewind(1);
|
||||
}
|
||||
|
||||
if (!SepBy1BasicType(',', result)) {
|
||||
if (!SepBy1BasicType(',', ']', result)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SkipCommentAndWhitespaceAndNewline()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2159,6 +2163,10 @@ bool AsciiParser::ParseBasicTypeArray(std::vector<Path> *result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SkipCommentAndWhitespaceAndNewline()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Expect(']')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
10
tests/usda/payload-array-001.usda
Normal file
10
tests/usda/payload-array-001.usda
Normal file
@@ -0,0 +1,10 @@
|
||||
#usda 1.0
|
||||
|
||||
def "sphere1" (
|
||||
payload = [@sphere.usda@,
|
||||
@suzanne.usda@,
|
||||
]
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user