Refactor user codebase to use LoadResource helper method.
* Fix small bug when registering resource providers. * Add test cases for OS filesystem fallback with VFS. * Rewrite LoadModelFromString using a resource provider (now can pass custom VFSs). PiperOrigin-RevId: 526959705 Change-Id: Iee1773e5584535d868aab6b206d1bf362e600c8a
This commit is contained in:
committed by
Copybara-Service
parent
c2115a1f51
commit
23961e24b7
+1
-1
@@ -52,7 +52,7 @@ const std::string GetModelPath(absl::string_view path);
|
||||
// Returns a newly-allocated mjModel, loaded from the contents of xml.
|
||||
// On failure returns nullptr and populates the error array if present.
|
||||
mjModel* LoadModelFromString(absl::string_view xml, char* error = nullptr,
|
||||
int error_size = 0);
|
||||
int error_size = 0, mjVFS* vfs = nullptr);
|
||||
|
||||
// Returns a newly-allocated mjModel, loaded from the contents in model_path.
|
||||
// On failure it asserts that model is null.
|
||||
|
||||
Reference in New Issue
Block a user