Skip to content

Commit

Permalink
Adapt to Magnum Python bindings update. (facebookresearch#1776)
Browse files Browse the repository at this point in the history
This syntax should work with both the original API and the new one.

Also removed a comment that wasn't true -- the code doesn't perform any
modifications of the original instance, it just replaces the instance a
few times.
  • Loading branch information
mosra authored Jan 29, 2024
1 parent 427df3c commit 0165d2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions habitat-lab/habitat/datasets/rearrange/samplers/receptacle.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ def filter_interleave_mesh(mesh: mn.trade.MeshData) -> mn.trade.MeshData:
Filter all but position data and interleave a mesh to reduce overall memory footprint.
Convert triangle like primitives into triangles and assert only triangles remain.
NOTE: Modifies the mesh data in-place
:return: The modified mesh for easy of use.
"""

Expand All @@ -519,7 +518,9 @@ def filter_interleave_mesh(mesh: mn.trade.MeshData) -> mn.trade.MeshData:
)

# reformat the mesh data after filtering
mesh = mn.meshtools.interleave(mesh, mn.meshtools.InterleaveFlags.NONE)
mesh = mn.meshtools.interleave(
mesh, flags=mn.meshtools.InterleaveFlags.NONE
)

return mesh

Expand Down

0 comments on commit 0165d2c

Please sign in to comment.