MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / _compiler_dirs

Function _compiler_dirs

Scripts/clean_meshes.py:123–132  ·  view source on GitHub ↗

Return (meshdir, texturedir, assetdir) declared by any directly under ``root``. MuJoCo allows several compiler elements; later ones win for a given attribute, matching the C++ importer's last-writer behaviour.

(root)

Source from the content-addressed store, hash-verified

121
122
123def _compiler_dirs(root) -> tuple:
124 """Return (meshdir, texturedir, assetdir) declared by any <compiler> directly
125 under ``root``. MuJoCo allows several compiler elements; later ones win for a
126 given attribute, matching the C++ importer&#x27;s last-writer behaviour."""
127 md = txd = ad = ""
128 for comp in root.findall("compiler"):
129 md = comp.get("meshdir", md)
130 txd = comp.get("texturedir", txd)
131 ad = comp.get("assetdir", ad)
132 return md, txd, ad
133
134
135def _rewrite_asset_path(elem, src_dir: Path, root_dir: Path,

Callers 2

_append_expandedFunction · 0.85
flatten_includesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected