Skip to content

Commit ccae0ed

Browse files
committed
add additional attribute check
1 parent 20f0036 commit ccae0ed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_paths.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,14 @@ def test_path_to_gltf_with_line():
151151
path.vertex_attributes = {"_test": g.np.array([0, 0, 0, 1, 1, 1], dtype=g.np.float32)}
152152

153153
tree, _ = g.trimesh.exchange.gltf._create_gltf_structure(g.trimesh.Scene([path]))
154+
# should have included the attribute by name
155+
assert set(tree["meshes"][0]["primitives"][0]["attributes"].keys()) == {
156+
"POSITION",
157+
"_test",
158+
}
154159

155160
assert len(tree["accessors"]) == 2
156-
157161
acc = tree["accessors"]
158-
159162
assert acc[0]["count"] == acc[1]["count"]
160163

161164

0 commit comments

Comments
 (0)