Skip to content

Commit 1a96b47

Browse files
committed
obj: Adjust GeomSubset
1 parent db97643 commit 1a96b47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

urdf_usd_converter/_impl/mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _mesh_subsets_obj(
132132

133133
for material_id in unique_material_ids:
134134
face_indices = np.where(material_ids_array == material_id)[0]
135-
face_list_by_material[int(material_id)] = face_indices.tolist()
135+
face_list_by_material[int(material_id)] = Vt.IntArray.FromNumpy(face_indices)
136136

137137
stage = mesh.GetPrim().GetStage()
138138

@@ -144,7 +144,7 @@ def _mesh_subsets_obj(
144144
subset_name = f"GeomSubset_{(i+1):03d}"
145145

146146
geom_subset = UsdGeom.Subset.Define(stage, mesh.GetPrim().GetPath().AppendChild(subset_name))
147-
geom_subset.GetIndicesAttr().Set(Vt.IntArray(face_indices))
147+
geom_subset.GetIndicesAttr().Set(face_indices)
148148
geom_subset.GetElementTypeAttr().Set(UsdGeom.Tokens.face)
149149
geom_subset.GetFamilyNameAttr().Set(UsdShade.Tokens.materialBind)
150150

0 commit comments

Comments
 (0)