Exemplo n.º 1
0
 def test_import_all_obj(self):
     tmp = self._get_tmp()
     for x in gather_files(self.root, filter='.obj'):
         try:
             converter = ObjConverter(tmp, x)
             converter.load_model()
             converter.brres.save(overwrite=True)
         except:
             print(f'ERROR importing {x}')
             raise
Exemplo n.º 2
0
 def test_load_map_model(self):
     mdl_file = self._get_test_fname('map_model.obj')
     converter = ObjConverter(self._get_tmp('.brres'), mdl_file)
     converter.load_model()
     map_bone = converter.mdl0.bones[0]
     self.assertEqual('map', map_bone.name)
     pos_ld = map_bone.child
     self.assertEqual('posLD', pos_ld.name)
     pos_ru = pos_ld.next
     self.assertEqual('posRU', pos_ru.name)
     for poly in converter.mdl0.objects:
         self.assertEqual(map_bone, poly.linked_bone)
         self.assertEqual(map_bone, poly.visible_bone)