-- Quake 1 BSP Importer for Blender --
by Andrew Palmer 2013.06 (Quake was released in 1996.06, so I'm a bit late)

Usage -------------------------------------------------------------------------
1. Extract to blender scripts/addons/
2. In user settings go to addons and enable 'Import-Export: Import Quake BSP format'
3. from the File menu, select import>Quake BSP (.bsp)
4. Choose a valid Quake 1 .bsp file
5. Assuming everything worked, your scene should contain all the models in the bsp,
   though you may need to zoom out to see them.

Known bugs --------------------------------------------------------------------
Due to my own lack of knowledge of Python and the Blender scene hierarchy, this script
is VERY slow. On large maps expect it to take a few minutes. This is something I hope to
improve.
- texture name lookup for each face is stupid
- there is probably a more efficient way to extract the mesh to memory
- too much fudging the vert and uv lists to get them to look right

Features to add ---------------------------------------------------------------
+ optimise import speed
+ auto weld vertices
+ scale option
+ import models (range)
+ import models if (num faces > n etc.)

History -----------------------------------------------------------------------
0.0.2
+ now imports textures from the bsp as materials
+ uvs and materials are applied to faces
0.0.1
+ import bsp imports all models in a bsp file as objects in a blender scene

Legal crap --------------------------------------------------------------------
NOTE: This addon contains palette.lmp, which is the palette file for the game
Quake, by id software. This file is in the public domain.

#  ***** GPL LICENSE BLOCK *****
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  All rights reserved.
#  ***** GPL LICENSE BLOCK *****