Do not strip the path when compiling an mjSpec.
The path has already been stripped while parsing. This will enable prefixes that contain a `/` while attaching. Also use `spec.meshdir` for asset paths in `spec.to_zip()`. PiperOrigin-RevId: 794573523 Change-Id: Ic36bb641c3d72848399006cf718afd8542e91ed4
This commit is contained in:
committed by
Copybara-Service
parent
6a9e68a542
commit
cc52d0242b
@@ -98,8 +98,7 @@ raw::MjModel* MjSpec::Compile() {
|
||||
mjVFS vfs;
|
||||
mj_defaultVFS(&vfs);
|
||||
for (const auto& asset : assets) {
|
||||
std::string buffer_name =
|
||||
_impl::StripPath(py::cast<std::string>(asset.first).c_str());
|
||||
std::string buffer_name = py::cast<std::string>(asset.first).c_str();
|
||||
std::string buffer = py::cast<std::string>(asset.second);
|
||||
const int vfs_error = InterceptMjErrors(mj_addBufferVFS)(
|
||||
&vfs, buffer_name.c_str(), buffer.c_str(), buffer.size());
|
||||
|
||||
Reference in New Issue
Block a user