Open nhanminhnhat1998 opened 3 years ago
Hello everyone,
I am trying to use your library to open the .obj with the .mtl as the texture file
here is my attempt. I could not find a way to get the faces out of it :((
import pywavefront import logging pywavefront.configure_logging( logging.DEBUG, formatter=logging.Formatter('%(name)s-%(levelname)s: %(message)s') ) file_name = '/home/duma/Documents/RTT_stuffs/camera_calibration/3D_model/scene_mesh_textured.obj' waveFrontObj = pywavefront.Wavefront(file_name, strict=True, encoding="iso-8859-1", parse=False,collect_faces=True) waveFrontObj.parse() # Explicit call to parse() needed when parse=False for name, material in waveFrontObj.materials.items(): print("#### Name: ",name) temp = vars(material) for item in temp: if item== "vertices" : print("vertices : ") continue if item=="texture": print("texture.image : ",type(temp[item].path),temp[item].path) print(item, ':', temp[item]) # print(item, ':') print("----------------------")
Thank you for your help
I'll try to remember to include some info in readme about this. Meanwhile see : https://github.com/pywavefront/PyWavefront/issues/87#issuecomment-464348971
Hello everyone,
I am trying to use your library to open the .obj with the .mtl as the texture file
here is my attempt. I could not find a way to get the faces out of it :((
Thank you for your help