@@ -179,7 +179,7 @@ def testObjColors(self):
179
179
self .assertEqual (self .mesh2 .materials [0 ].vertex_format , "T2F_C3F_N3F_V3F" )
180
180
181
181
def test_undefined_uvs (self ):
182
- """obj file were some uv entries are undefiend """
182
+ """obj file were some uv entries are undefined """
183
183
meshes = pywavefront .Wavefront (fixture ('simple_missing_uv.obj' ))
184
184
self .mesh2 = meshes .mesh_list [1 ]
185
185
@@ -199,6 +199,27 @@ def test_undefined_uvs(self):
199
199
200
200
self .assertEqual (self .mesh2 .materials [0 ].vertex_format , "T2F_N3F_V3F" )
201
201
202
+ def test_undefined_normals (self ):
203
+ """obj file were some uv entries are undefined"""
204
+ meshes = pywavefront .Wavefront (fixture ('simple_missing_normal.obj' ))
205
+ self .mesh2 = meshes .mesh_list [1 ]
206
+
207
+ self .assertEqual (self .mesh2 .materials [0 ].vertices , [
208
+ 1.0 , 0.0 , 0.0 , 1.0 , 0.0 , - 1.0 , 0.0 , 1.0 ,
209
+ 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 1.0 , 0.0 , 1.0 ,
210
+ 0.0 , 1.0 , 0.0 , 1.0 , 0.0 , 1.0 , 0.0 , - 1.0 ,
211
+
212
+ 1.0 , 0.0 , 20 , 21 , 22 , - 1.0 , 0.0 , 1.0 ,
213
+ 0.0 , 0.0 , 20 , 21 , 22 , 1.0 , 0.0 , 1.0 ,
214
+ 0.0 , 1.0 , 20 , 21 , 22 , 1.0 , 0.0 , - 1.0 ,
215
+
216
+ 1.0 , 0.0 , 0.0 , 1.0 , - 0.0 , - 1.0 , 0.0 , 1.0 ,
217
+ 0.0 , 0.0 , 0.0 , 1.0 , - 0.0 , 1.0 , 0.0 , 1.0 ,
218
+ 0.0 , 1.0 , 0.0 , 1.0 , - 0.0 , 1.0 , 0.0 , - 1.0 ,
219
+ ])
220
+
221
+ self .assertEqual (self .mesh2 .materials [0 ].vertex_format , "T2F_N3F_V3F" )
222
+
202
223
203
224
class TestMtlParser (unittest .TestCase ):
204
225
def setUp (self ):
0 commit comments