Spaces:
Runtime error
Runtime error
File size: 368 Bytes
7629b39 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import numpy as np
def load_vertex_colors(obj_path):
v_colors = []
for line in open(obj_path, "r"):
if line.startswith('#'): continue
values = line.split()
if not values: continue
if values[0] == 'v':
v_colors.append(values[4:7])
else:
continue
return np.asarray(v_colors, dtype=np.float32)
|