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)
| 121 | |
| 122 | |
| 123 | def _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'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 | |
| 135 | def _rewrite_asset_path(elem, src_dir: Path, root_dir: Path, |
no outgoing calls
no test coverage detected