OpenUSD allows whitespace in applied schema instance names
nvmkuruc opened this issue · comments
nvmkuruc commented
Description of Issue
OpenUSD allows whitespace in applied schema instance names. As whitespace is not allowed in OpenUSD property names, a schema may fail to create properties that include the instance name.
It's been requested that instance names are restricted to only be valid property identifiers to avoid this issue.
https://forum.aousd.org/t/guidance-for-api-schema-instance-names/1498
Steps to Reproduce
from pxr import Usd
s = Usd.Stage.CreateInMemory()
p = s.DefinePrim("/root")
c = Usd.CollectionAPI.Apply(p, 'name with spaces')
print(s.GetRootLayer().ExportToString())
c.CreateIncludesRel()
should produce this exception.
'Cannot create a relationship on /root with invalid name: collection:name with spaces:includes'
System Information (OS, Hardware)
Package Versions
Build Flags
jesschimein commented
Filed as internal issue #USD-9620