pywavefront / PyWavefront

Python library for importing Wavefront .obj files
BSD 3-Clause "New" or "Revised" License
299 stars 79 forks source link

access raw uv coordinates from obj #145

Open mshooter opened 1 year ago

mshooter commented 1 year ago

Hi,

I liked that I could access the raw vertices from the obj file, however, is it also possible to access the raw uvs?

scene = pywavefront.Wavefront(os.path.join(data_dir, "smal_data/barc.obj"), parse=True) scene.vertices

einarf commented 1 year ago

https://github.com/pywavefront/PyWavefront/issues/87#issuecomment-464348971

mshooter commented 1 year ago

I think you misunderstood my question, I want the uv's in the order that the uv's are in the obj file.

einarf commented 1 year ago

I don't think there is a simple way unless you extend the current parser. Maybe trimesh have something for this? https://github.com/mikedh/trimesh