Remove getdir from mjpResourceProvider.

All known implementations were effectively the same as the default fallback. It was just adding unneeded complexity. Removing this now will help with upcoming improvements to resource providers.

PiperOrigin-RevId: 855163273
Change-Id: I529fc18d0d03a8dc676c909ec9e4b1da1454d414
This commit is contained in:
Haroon Qureshi
2026-01-12 04:06:33 -08:00
committed by Copybara-Service
parent d7e4038be8
commit cb9a9c159c
9 changed files with 159 additions and 64 deletions
+3
View File
@@ -16,6 +16,9 @@ Upcoming version (not yet released)
**Migration:** Replace ``orthographic = "false/true"`` with ``projection="perspective/orthographic"``,
respectively.
- Removed ``getdir`` from the ``mjpResourceProvider`` struct. All Resource Providers now use the same shared
implementation.
General
^^^^^^^
-1
View File
@@ -1628,7 +1628,6 @@ struct mjpResourceProvider {
mjfOpenResource open; // opening callback
mjfReadResource read; // reading callback
mjfCloseResource close; // closing callback
mjfGetResourceDir getdir; // get directory callback (optional)
mjfResourceModified modified; // resource modified callback (optional)
void* data; // opaque data pointer (resource invariant)
};
-1
View File
@@ -449,7 +449,6 @@ Next we create the resource provider and register it with MuJoCo:
.open = str_open_callback,
.read = str_read_callback,
.close = str_close_callback,
.getdir = NULL
};
// return positive number on success