Skip to content

Commit

Permalink
Rename store to add
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Chernyadev committed Apr 4, 2024
1 parent f9f7922 commit 88d2877
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mojo/elements/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def remove(self, path: str) -> None:
asset = self._store.pop(path)
self._unload_asset(asset)

def store(self, path: str, asset_mjcf: mjcf.Element) -> None:
def add(self, path: str, asset_mjcf: mjcf.Element) -> None:
"""Add new MJCF asset."""
self._store[path] = asset_mjcf
if self._capacity and len(self._store) > self._capacity:
Expand Down
4 changes: 2 additions & 2 deletions mojo/mojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def get_material(self, path: str) -> Optional[mjcf.Element]:
return self._texture_store.get(path)

def store_material(self, path: str, material_mjcf: mjcf.Element) -> None:
self._texture_store.store(path, material_mjcf)
self._texture_store.add(path, material_mjcf)

def get_mesh(self, path: str) -> Optional[mjcf.Element]:
return self._mesh_store.get(path)

def store_mesh(self, path: str, mesh_mjcf: mjcf.Element) -> None:
self._mesh_store.store(path, mesh_mjcf)
self._mesh_store.add(path, mesh_mjcf)

def load_model(
self,
Expand Down

0 comments on commit 88d2877

Please sign in to comment.