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.
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'
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
should produce this exception.
System Information (OS, Hardware)
Package Versions
Build Flags