From 0165d2c0326dc39f8c1b0b51c8b4c20f4467b8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 29 Jan 2024 18:48:02 +0100 Subject: [PATCH] Adapt to Magnum Python bindings update. (#1776) 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. --- .../habitat/datasets/rearrange/samplers/receptacle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/habitat-lab/habitat/datasets/rearrange/samplers/receptacle.py b/habitat-lab/habitat/datasets/rearrange/samplers/receptacle.py index 91205b0a33..6bda9904b2 100644 --- a/habitat-lab/habitat/datasets/rearrange/samplers/receptacle.py +++ b/habitat-lab/habitat/datasets/rearrange/samplers/receptacle.py @@ -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. """ @@ -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