Skip to content

Commit

Permalink
Replace parentheses with underscores in USD path names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Sep 20, 2024
1 parent b682b78 commit 38e5797
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion glue_ar/common/usd_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def __init__(self, filepath: str):
self._material_map: Dict[MaterialInfo, UsdShade.Shader] = {}

def _sanitize(self, identifier: str) -> str:
return identifier.replace("-", "_")
# TODO: Do this in a single pass
for char in ("-", "(", ")"):
identifier = identifier.replace(char, "_")
return identifier

def _create_stage(self, filepath: str):
self.stage = Usd.Stage.CreateNew(self._sanitize(filepath))
Expand Down

0 comments on commit 38e5797

Please sign in to comment.