コード例 #1
0
ファイル: factory.py プロジェクト: miglopst/models
 def load_building_meshes(self, building):
   dir_name = os.path.join(building['data_dir'], 'mesh', building['name'])
   mesh_file_name = glob.glob1(dir_name, '*.obj')[0]
   mesh_file_name_full = os.path.join(dir_name, mesh_file_name)
   logging.error('Loading building from obj file: %s', mesh_file_name_full)
   shape = renderer.Shape(mesh_file_name_full, load_materials=True,
                          name_prefix=building['name']+'_')
   return [shape]
コード例 #2
0
 def load_building_meshes(self, building, materials_scale=1.0):
     dir_name = os.path.join(building['data_dir'], 'mesh', building['name'])
     print("DIRECTORY" + dir_name)
     mesh_file_name = glob.glob1(dir_name, '*.obj')[0]
     mesh_file_name_full = os.path.join(dir_name, mesh_file_name)
     # logging.error('Loading building from obj file: %s', mesh_file_name_full)
     print('\033[36m', "Loading building from obj file:",
           mesh_file_name_full, '\033[0m')
     shape = renderer.Shape(mesh_file_name_full,
                            load_materials=True,
                            name_prefix=building['name'] + '_',
                            materials_scale=materials_scale)
     return [shape]