Exemplo n.º 1
0
 def execute(self, context):
     if "wow" in self.filepath:
         wow_hashes = popmap.create_wowlist(os.path.dirname(self.filepath))
         popmap.import_wow(self.filepath, context, False, wow_hashes)
         return {'FINISHED'}
     else:
         self.report({'ERROR'}, "Selected file does not contain 'wow'!")
         return {'CANCELLED'}
Exemplo n.º 2
0
 def execute(self, context):
     wow_hashes = popmap.create_wowlist(self.directory)
     for file in os.listdir(self.directory):
         path = os.path.join(self.directory, file)
         if (os.path.isfile(path) and path.endswith(".dec")
                 and "wow" in path):
             try:
                 popmap.import_wow(path, context, self.textures_only,
                                   wow_hashes)
             except:
                 raise RuntimeError("Error while importing '" + file + "'!")
     return {'FINISHED'}