Skip to content

Commit

Permalink
Merge pull request #62 from Carifio24/usd-sanitize-parentheses
Browse files Browse the repository at this point in the history
Replace parentheses in USD path names
  • Loading branch information
Carifio24 authored Sep 21, 2024
2 parents dd909b7 + 38e5797 commit b70314a
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 b70314a

Please sign in to comment.