View Single Post
# 2 13-04-2010 , 06:33 PM
elephantinc's Avatar
Level 32 pachyderm
Join Date: Dec 2007
Location: England
Posts: 1,859
I've finished my class to load and display .obj files. It works on some models but doesn't work on anything I export and I get a rather strange error:
Code:
Traceback (most recent call last):
  File "/Users/Elephant_Inc/Desktop/bpwpapcode/Chapter11/tankdemo.py", line 92, in <module>
    run()
  File "/Users/Elephant_Inc/Desktop/bpwpapcode/Chapter11/tankdemo.py", line 64, in run
    tank_model.read_obj('elephanilla.obj')
  File "/Users/Elephant_Inc/Desktop/bpwpapcode/Chapter11/model3d.py", line 120, in read_obj
    texture_path = os.path.join(model_path, material.texture_fname)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", line 60, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
I've triangulated the mesh (I have a thing in the program to check for that anyway). Does anyone know what the cause could be?


https://users.ecs.soton.ac.uk/as28g11/